diff options
| author | Rafael H. Schloming <rhs@apache.org> | 2007-01-23 20:31:10 +0000 |
|---|---|---|
| committer | Rafael H. Schloming <rhs@apache.org> | 2007-01-23 20:31:10 +0000 |
| commit | 4eb87d127edb3dc44512eb63318638f91a2f0f2d (patch) | |
| tree | 795628bf73a23dca8e562cefed41f3926609399e /java/client/src/main | |
| parent | 11870d0fb76e74b6994ee9d2cfdae9df671673b1 (diff) | |
| download | qpid-python-4eb87d127edb3dc44512eb63318638f91a2f0f2d.tar.gz | |
removed XXX from resend, centralized message deliver, cleaned up exception handling, added per channel max frame size
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@499121 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/client/src/main')
| -rw-r--r-- | java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolSession.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolSession.java b/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolSession.java index 5ea2e66b35..2980a86374 100644 --- a/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolSession.java +++ b/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolSession.java @@ -46,6 +46,7 @@ import org.apache.qpid.framing.MessageAppendBody; import org.apache.qpid.framing.ProtocolInitiation; import org.apache.qpid.framing.ProtocolVersionList; import org.apache.qpid.framing.RequestManager; +import org.apache.qpid.framing.RequestResponseMappingException; import org.apache.qpid.framing.ResponseManager; import org.apache.qpid.protocol.AMQMethodEvent; import org.apache.qpid.protocol.AMQMethodListener; @@ -314,25 +315,26 @@ public class AMQProtocolSession implements AMQProtocolWriter, ProtocolVersionLis public long writeRequest(int channelNum, AMQMethodBody methodBody, AMQMethodListener methodListener) - throws AMQException { RequestManager requestManager = (RequestManager)_channelId2RequestMgrMap.get(channelNum); if (requestManager == null) - throw new AMQException("Unable to find RequestManager for channel " + channelNum); + throw new IllegalArgumentException("Unable to find RequestManager for channel " + channelNum); return requestManager.sendRequest(methodBody, methodListener); } public void writeResponse(int channelNum, long requestId, AMQMethodBody methodBody) - throws AMQException { ResponseManager responseManager = (ResponseManager)_channelId2ResponseMgrMap.get(channelNum); if (responseManager == null) - throw new AMQException("Unable to find ResponseManager for channel " + channelNum); - responseManager.sendResponse(requestId, methodBody); + throw new IllegalArgumentException("Unable to find ResponseManager for channel " + channelNum); + try { + responseManager.sendResponse(requestId, methodBody); + } catch (RequestResponseMappingException e) { + throw new RuntimeException(e); + } } public void writeResponse(AMQMethodEvent evt, AMQMethodBody response) - throws AMQException { writeResponse(evt.getChannelId(), evt.getRequestId(), response); } |
