[jboss-remoting-commits] JBoss Remoting SVN: r6132 - remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote.
jboss-remoting-commits at lists.jboss.org
jboss-remoting-commits at lists.jboss.org
Thu Nov 11 22:37:45 EST 2010
Author: ron.sigal at jboss.com
Date: 2010-11-11 22:37:45 -0500 (Thu, 11 Nov 2010)
New Revision: 6132
Modified:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/RemoteMessageHandler.java
Log:
JBREM-1257: The appropriate InboundClient is retrieved by RemoteMessageHandler instead of in a separate thread running InboundRequestTask.
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/RemoteMessageHandler.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/RemoteMessageHandler.java 2010-11-12 03:34:38 UTC (rev 6131)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/RemoteMessageHandler.java 2010-11-12 03:37:45 UTC (rev 6132)
@@ -234,9 +234,14 @@
log.trace("Received request for unknown request ID %d", Integer.valueOf(rid));
}
}
+ final IntKeyMap<InboundClient> inboundClients = connectionHandler.getInboundClients();
+ final InboundClient inboundClient;
+ synchronized (inboundClients) {
+ inboundClient = inboundClients.get(cid);
+ }
synchronized (inboundRequest) {
if (start) {
- connectionHandler.getConnectionContext().getConnectionProviderContext().getExecutor().execute(new InboundRequestTask(connectionHandler, inboundRequest, rid, cid));
+ connectionHandler.getConnectionContext().getConnectionProviderContext().getExecutor().execute(new InboundRequestTask(connectionHandler, inboundRequest, inboundClient, rid));
}
byteInput = inboundRequest.getByteInput();
}
@@ -473,6 +478,21 @@
inboundStream.getReceiver().pushException();
return;
}
+ case RemoteProtocol.STREAM_FLUSH: {
+ log.info(this + " got STREAM_FLUSH");
+ final int sid = buffer.getInt();
+ final IntKeyMap<InboundStream> inboundStreams = connectionHandler.getInboundStreams();
+ final InboundStream inboundStream;
+ synchronized (inboundStreams) {
+ inboundStream = inboundStreams.get(sid);
+ }
+ if (inboundStream == null) {
+ log.warn("Received stream-flush for unknown stream ID %d", Integer.valueOf(sid));
+ return;
+ }
+ inboundStream.getReceiver().flush();
+ return;
+ }
default: {
log.error("Received invalid packet type on %s, closing", connectionHandler);
IoUtils.safeClose(connectionHandler);
More information about the jboss-remoting-commits
mailing list