You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rg...@apache.org on 2015/07/08 15:50:18 UTC
svn commit: r1689876 [4/6] - in /qpid/java/trunk:
bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/upgrade/
broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/
broker-plugins/amqp-0-8-protocol/src/test/jav...
Modified: qpid/java/trunk/client/src/main/java/org/apache/qpid/client/message/JMSMapMessage.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/client/src/main/java/org/apache/qpid/client/message/JMSMapMessage.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/client/src/main/java/org/apache/qpid/client/message/JMSMapMessage.java (original)
+++ qpid/java/trunk/client/src/main/java/org/apache/qpid/client/message/JMSMapMessage.java Wed Jul 8 13:50:16 2015
@@ -29,7 +29,7 @@ import java.util.Map;
import javax.jms.JMSException;
import javax.jms.MessageEOFException;
import javax.jms.MessageFormatException;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import org.apache.qpid.typedmessage.TypedBytesContentReader;
import org.apache.qpid.typedmessage.TypedBytesContentWriter;
import org.apache.qpid.typedmessage.TypedBytesFormatException;
@@ -60,7 +60,7 @@ public class JMSMapMessage extends Abstr
}
- JMSMapMessage(AMQMessageDelegate delegate, ByteBuffer data) throws AMQException
+ JMSMapMessage(AMQMessageDelegate delegate, ByteBuffer data) throws QpidException
{
super(delegate, data != null);
@@ -70,7 +70,7 @@ public class JMSMapMessage extends Abstr
}
catch (JMSException je)
{
- throw new AMQException(null, "Error populating MapMessage from ByteBuffer", je);
+ throw new QpidException("Error populating MapMessage from ByteBuffer", je);
}
Modified: qpid/java/trunk/client/src/main/java/org/apache/qpid/client/message/JMSMapMessageFactory.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/client/src/main/java/org/apache/qpid/client/message/JMSMapMessageFactory.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/client/src/main/java/org/apache/qpid/client/message/JMSMapMessageFactory.java (original)
+++ qpid/java/trunk/client/src/main/java/org/apache/qpid/client/message/JMSMapMessageFactory.java Wed Jul 8 13:50:16 2015
@@ -20,14 +20,15 @@
*/
package org.apache.qpid.client.message;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import java.nio.ByteBuffer;
public class JMSMapMessageFactory extends AbstractJMSMessageFactory
{
- protected AbstractJMSMessage createMessage(AbstractAMQMessageDelegate delegate, ByteBuffer data) throws AMQException
+ protected AbstractJMSMessage createMessage(AbstractAMQMessageDelegate delegate, ByteBuffer data) throws
+ QpidException
{
return new JMSMapMessage(delegate, data);
Modified: qpid/java/trunk/client/src/main/java/org/apache/qpid/client/message/JMSObjectMessage.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/client/src/main/java/org/apache/qpid/client/message/JMSObjectMessage.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/client/src/main/java/org/apache/qpid/client/message/JMSObjectMessage.java (original)
+++ qpid/java/trunk/client/src/main/java/org/apache/qpid/client/message/JMSObjectMessage.java Wed Jul 8 13:50:16 2015
@@ -20,7 +20,7 @@
*/
package org.apache.qpid.client.message;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import org.apache.qpid.client.util.ClassLoadingAwareObjectInputStream;
import org.apache.qpid.client.util.JMSExceptionHelper;
import org.apache.qpid.util.ByteBufferInputStream;
@@ -60,7 +60,7 @@ public class JMSObjectMessage extends Ab
* Creates read only message for delivery to consumers
*/
- JMSObjectMessage(AMQMessageDelegate delegate, final ByteBuffer data) throws AMQException
+ JMSObjectMessage(AMQMessageDelegate delegate, final ByteBuffer data) throws QpidException
{
super(delegate, data!=null);
Modified: qpid/java/trunk/client/src/main/java/org/apache/qpid/client/message/JMSObjectMessageFactory.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/client/src/main/java/org/apache/qpid/client/message/JMSObjectMessageFactory.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/client/src/main/java/org/apache/qpid/client/message/JMSObjectMessageFactory.java (original)
+++ qpid/java/trunk/client/src/main/java/org/apache/qpid/client/message/JMSObjectMessageFactory.java Wed Jul 8 13:50:16 2015
@@ -20,13 +20,14 @@
*/
package org.apache.qpid.client.message;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import java.nio.ByteBuffer;
public class JMSObjectMessageFactory extends AbstractJMSMessageFactory
{
- protected AbstractJMSMessage createMessage(AbstractAMQMessageDelegate delegate, ByteBuffer data) throws AMQException
+ protected AbstractJMSMessage createMessage(AbstractAMQMessageDelegate delegate, ByteBuffer data) throws
+ QpidException
{
return new JMSObjectMessage(delegate, data);
}
Modified: qpid/java/trunk/client/src/main/java/org/apache/qpid/client/message/JMSStreamMessage.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/client/src/main/java/org/apache/qpid/client/message/JMSStreamMessage.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/client/src/main/java/org/apache/qpid/client/message/JMSStreamMessage.java (original)
+++ qpid/java/trunk/client/src/main/java/org/apache/qpid/client/message/JMSStreamMessage.java Wed Jul 8 13:50:16 2015
@@ -26,7 +26,7 @@ import javax.jms.JMSException;
import javax.jms.MessageEOFException;
import javax.jms.MessageFormatException;
import javax.jms.StreamMessage;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import org.apache.qpid.typedmessage.TypedBytesContentReader;
import org.apache.qpid.typedmessage.TypedBytesContentWriter;
import org.apache.qpid.typedmessage.TypedBytesFormatException;
@@ -49,14 +49,14 @@ public class JMSStreamMessage extends Ab
}
- JMSStreamMessage(AMQMessageDelegateFactory delegateFactory, ByteBuffer data) throws AMQException
+ JMSStreamMessage(AMQMessageDelegateFactory delegateFactory, ByteBuffer data) throws QpidException
{
super(delegateFactory, data!=null);
_typedBytesContentWriter = new TypedBytesContentWriter();
}
- JMSStreamMessage(AMQMessageDelegate delegate, ByteBuffer data) throws AMQException
+ JMSStreamMessage(AMQMessageDelegate delegate, ByteBuffer data) throws QpidException
{
super(delegate, data!=null);
_typedBytesContentReader = new TypedBytesContentReader(data);
Modified: qpid/java/trunk/client/src/main/java/org/apache/qpid/client/message/JMSStreamMessageFactory.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/client/src/main/java/org/apache/qpid/client/message/JMSStreamMessageFactory.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/client/src/main/java/org/apache/qpid/client/message/JMSStreamMessageFactory.java (original)
+++ qpid/java/trunk/client/src/main/java/org/apache/qpid/client/message/JMSStreamMessageFactory.java Wed Jul 8 13:50:16 2015
@@ -20,13 +20,14 @@
*/
package org.apache.qpid.client.message;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import java.nio.ByteBuffer;
public class JMSStreamMessageFactory extends AbstractJMSMessageFactory
{
- protected AbstractJMSMessage createMessage(AbstractAMQMessageDelegate delegate, ByteBuffer data) throws AMQException
+ protected AbstractJMSMessage createMessage(AbstractAMQMessageDelegate delegate, ByteBuffer data) throws
+ QpidException
{
return new JMSStreamMessage(delegate, data);
}
Modified: qpid/java/trunk/client/src/main/java/org/apache/qpid/client/message/JMSTextMessage.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/client/src/main/java/org/apache/qpid/client/message/JMSTextMessage.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/client/src/main/java/org/apache/qpid/client/message/JMSTextMessage.java (original)
+++ qpid/java/trunk/client/src/main/java/org/apache/qpid/client/message/JMSTextMessage.java Wed Jul 8 13:50:16 2015
@@ -20,7 +20,7 @@
*/
package org.apache.qpid.client.message;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import org.apache.qpid.client.CustomJMSXProperty;
import org.apache.qpid.client.util.JMSExceptionHelper;
@@ -57,7 +57,7 @@ public class JMSTextMessage extends Abst
}
JMSTextMessage(AMQMessageDelegate delegate, ByteBuffer data)
- throws AMQException
+ throws QpidException
{
super(delegate, data!=null);
Modified: qpid/java/trunk/client/src/main/java/org/apache/qpid/client/message/JMSTextMessageFactory.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/client/src/main/java/org/apache/qpid/client/message/JMSTextMessageFactory.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/client/src/main/java/org/apache/qpid/client/message/JMSTextMessageFactory.java (original)
+++ qpid/java/trunk/client/src/main/java/org/apache/qpid/client/message/JMSTextMessageFactory.java Wed Jul 8 13:50:16 2015
@@ -20,14 +20,15 @@
*/
package org.apache.qpid.client.message;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import java.nio.ByteBuffer;
public class JMSTextMessageFactory extends AbstractJMSMessageFactory
{
- protected AbstractJMSMessage createMessage(AbstractAMQMessageDelegate delegate, ByteBuffer data) throws AMQException
+ protected AbstractJMSMessage createMessage(AbstractAMQMessageDelegate delegate, ByteBuffer data) throws
+ QpidException
{
return new JMSTextMessage(delegate, data);
}
Modified: qpid/java/trunk/client/src/main/java/org/apache/qpid/client/message/MessageFactoryRegistry.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/client/src/main/java/org/apache/qpid/client/message/MessageFactoryRegistry.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/client/src/main/java/org/apache/qpid/client/message/MessageFactoryRegistry.java (original)
+++ qpid/java/trunk/client/src/main/java/org/apache/qpid/client/message/MessageFactoryRegistry.java Wed Jul 8 13:50:16 2015
@@ -29,7 +29,7 @@ import javax.jms.JMSException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import org.apache.qpid.client.AMQQueue;
import org.apache.qpid.client.AMQSession;
import org.apache.qpid.client.AMQSession_0_8;
@@ -111,7 +111,7 @@ public class MessageFactoryRegistry
AMQSession_0_8.DestinationCache<AMQQueue> queueDestinationCache,
AMQSession_0_8.DestinationCache<AMQTopic> topicDestinationCache,
final int addressType)
- throws AMQException, JMSException
+ throws QpidException, JMSException
{
BasicContentHeaderProperties properties = contentHeader.getProperties();
@@ -135,7 +135,7 @@ public class MessageFactoryRegistry
return mf;
}
- public AbstractJMSMessage createMessage(MessageTransfer transfer) throws AMQException, JMSException
+ public AbstractJMSMessage createMessage(MessageTransfer transfer) throws QpidException, JMSException
{
MessageProperties mprop = transfer.getHeader().getMessageProperties();
Modified: qpid/java/trunk/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java (original)
+++ qpid/java/trunk/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java Wed Jul 8 13:50:16 2015
@@ -35,6 +35,7 @@ import org.slf4j.LoggerFactory;
import org.apache.qpid.AMQConnectionClosedException;
import org.apache.qpid.AMQDisconnectedException;
+import org.apache.qpid.QpidException;
import org.apache.qpid.AMQException;
import org.apache.qpid.AMQTimeoutException;
import org.apache.qpid.client.AMQConnection;
@@ -382,7 +383,7 @@ public class AMQProtocolHandler implemen
// we notify the state manager of the error in case we have any clients waiting on a state
// change. Those "waiters" will be interrupted and can handle the exception
- AMQException amqe = new AMQException("Protocol handler error: " + cause, cause);
+ QpidException amqe = new QpidException("Protocol handler error: " + cause, cause);
propagateExceptionToAllWaiters(amqe);
_connection.exceptionReceived(cause);
}
@@ -524,7 +525,7 @@ public class AMQProtocolHandler implemen
}
public void methodBodyReceived(final int channelId, final AMQBody bodyFrame)
- throws AMQException
+ throws QpidException
{
if (_logger.isDebugEnabled())
@@ -555,11 +556,11 @@ public class AMQProtocolHandler implemen
}
if (!wasAnyoneInterested)
{
- throw new AMQException(null, "AMQMethodEvent " + evt + " was not processed by any listener. Listeners:"
+ throw new QpidException("AMQMethodEvent " + evt + " was not processed by any listener. Listeners:"
+ _frameListeners, null);
}
}
- catch (AMQException e)
+ catch (QpidException e)
{
propagateExceptionToFrameListeners(e);
@@ -568,7 +569,7 @@ public class AMQProtocolHandler implemen
}
- public StateWaiter createWaiter(Set<AMQState> states) throws AMQException
+ public StateWaiter createWaiter(Set<AMQState> states) throws QpidException
{
return getStateManager().createWaiter(states);
}
@@ -664,7 +665,7 @@ public class AMQProtocolHandler implemen
* @param listener the blocking listener. Note the calling thread will block.
*/
public AMQMethodEvent writeCommandFrameAndWaitForReply(AMQDataBlock frame, BlockingMethodFrameListener listener)
- throws AMQException, FailoverException
+ throws QpidException, FailoverException
{
return writeCommandFrameAndWaitForReply(frame, listener, DEFAULT_SYNC_TIMEOUT);
}
@@ -677,7 +678,7 @@ public class AMQProtocolHandler implemen
* @param listener the blocking listener. Note the calling thread will block.
*/
public AMQMethodEvent writeCommandFrameAndWaitForReply(AMQDataBlock frame, BlockingMethodFrameListener listener,
- long timeout) throws AMQException, FailoverException
+ long timeout) throws QpidException, FailoverException
{
try
{
@@ -694,10 +695,9 @@ public class AMQProtocolHandler implemen
Exception e = _stateManager.getLastException();
if (e != null)
{
- if (e instanceof AMQException)
+ if (e instanceof QpidException)
{
- AMQException amqe = (AMQException) e;
-
+ QpidException amqe = (QpidException) e;
throw amqe.cloneForCurrentThread();
}
else
@@ -727,19 +727,19 @@ public class AMQProtocolHandler implemen
}
/** More convenient method to write a frame and wait for it's response. */
- public AMQMethodEvent syncWrite(AMQFrame frame, Class responseClass) throws AMQException, FailoverException
+ public AMQMethodEvent syncWrite(AMQFrame frame, Class responseClass) throws QpidException, FailoverException
{
return syncWrite(frame, responseClass, DEFAULT_SYNC_TIMEOUT);
}
/** More convenient method to write a frame and wait for it's response. */
- public AMQMethodEvent syncWrite(AMQFrame frame, Class responseClass, long timeout) throws AMQException, FailoverException
+ public AMQMethodEvent syncWrite(AMQFrame frame, Class responseClass, long timeout) throws QpidException, FailoverException
{
return writeCommandFrameAndWaitForReply(frame, new SpecificMethodFrameListener(frame.getChannel(), responseClass),
timeout);
}
- public void closeSession(AMQSession session) throws AMQException
+ public void closeSession(AMQSession session) throws QpidException
{
_protocolSession.closeSession(session);
}
@@ -752,9 +752,9 @@ public class AMQProtocolHandler implemen
*
* @param timeout The timeout to wait for an acknowledgment to the close request.
*
- * @throws AMQException If the close fails for any reason.
+ * @throws QpidException If the close fails for any reason.
*/
- public void closeConnection(long timeout) throws AMQException
+ public void closeConnection(long timeout) throws QpidException
{
if (!getStateManager().getCurrentState().equals(AMQState.CONNECTION_CLOSED))
{
Modified: qpid/java/trunk/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolSession.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolSession.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolSession.java (original)
+++ qpid/java/trunk/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolSession.java Wed Jul 8 13:50:16 2015
@@ -29,6 +29,7 @@ import javax.security.sasl.SaslClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.apache.qpid.QpidException;
import org.apache.qpid.AMQException;
import org.apache.qpid.client.AMQConnection;
import org.apache.qpid.client.AMQSession;
@@ -197,9 +198,9 @@ public class AMQProtocolSession implemen
*
* @param message
*
- * @throws AMQException if this was not expected
+ * @throws QpidException if this was not expected
*/
- public void unprocessedMessageReceived(final int channelId, UnprocessedMessage message) throws AMQException
+ public void unprocessedMessageReceived(final int channelId, UnprocessedMessage message) throws QpidException
{
if ((channelId & FAST_CHANNEL_ACCESS_MASK) == 0)
{
@@ -211,19 +212,19 @@ public class AMQProtocolSession implemen
}
}
- public void contentHeaderReceived(int channelId, ContentHeaderBody contentHeader) throws AMQException
+ public void contentHeaderReceived(int channelId, ContentHeaderBody contentHeader) throws QpidException
{
final UnprocessedMessage_0_8 msg = (UnprocessedMessage_0_8) ((channelId & FAST_CHANNEL_ACCESS_MASK) == 0 ? _channelId2UnprocessedMsgArray[channelId]
: _channelId2UnprocessedMsgMap.get(channelId));
if (msg == null)
{
- throw new AMQException(null, "Error: received content header without having received a BasicDeliver frame first on session:" + this, null);
+ throw new QpidException("Error: received content header without having received a BasicDeliver frame first on session:" + this, null);
}
if (msg.getContentHeader() != null)
{
- throw new AMQException(null, "Error: received duplicate content header or did not receive correct number of content body frames on session:" + this, null);
+ throw new QpidException("Error: received duplicate content header or did not receive correct number of content body frames on session:" + this, null);
}
msg.setContentHeader(contentHeader);
@@ -233,7 +234,7 @@ public class AMQProtocolSession implemen
}
}
- public void contentBodyReceived(final int channelId, ContentBody contentBody) throws AMQException
+ public void contentBodyReceived(final int channelId, ContentBody contentBody) throws QpidException
{
UnprocessedMessage_0_8 msg;
final boolean fastAccess = (channelId & FAST_CHANNEL_ACCESS_MASK) == 0;
@@ -248,7 +249,7 @@ public class AMQProtocolSession implemen
if (msg == null)
{
- throw new AMQException(null, "Error: received content body without having received a JMSDeliver frame first", null);
+ throw new QpidException("Error: received content body without having received a JMSDeliver frame first", null);
}
if (msg.getContentHeader() == null)
@@ -261,7 +262,7 @@ public class AMQProtocolSession implemen
{
_channelId2UnprocessedMsgMap.remove(channelId);
}
- throw new AMQException(null, "Error: received content body without having received a ContentHeader frame first", null);
+ throw new QpidException("Error: received content body without having received a ContentHeader frame first", null);
}
msg.receiveBody(contentBody);
@@ -272,7 +273,7 @@ public class AMQProtocolSession implemen
}
}
- public void heartbeatBodyReceived(int channelId, HeartbeatBody body) throws AMQException
+ public void heartbeatBodyReceived(int channelId, HeartbeatBody body) throws QpidException
{
_protocolHandler.heartbeatBodyReceived();
}
@@ -339,7 +340,7 @@ public class AMQProtocolSession implemen
* @return true if the client must respond to the server, i.e. if the server initiated the channel close, false if
* the channel close is just the server responding to the client's earlier request to close the channel.
*/
- public boolean channelClosed(int channelId, AMQConstant code, String text) throws AMQException
+ public boolean channelClosed(int channelId, AMQConstant code, String text) throws QpidException
{
// if this is not a response to an earlier request to close the channel
@@ -352,7 +353,7 @@ public class AMQProtocolSession implemen
}
catch (JMSException e)
{
- throw new AMQException(null, "JMSException received while closing session", e);
+ throw new QpidException("JMSException received while closing session", e);
}
return true;
@@ -368,7 +369,7 @@ public class AMQProtocolSession implemen
return _connection;
}
- public void closeProtocolSession() throws AMQException
+ public void closeProtocolSession() throws QpidException
{
try
{
@@ -460,7 +461,7 @@ public class AMQProtocolSession implemen
session.setFlowControl(active);
}
- public void methodFrameReceived(final int channel, final AMQMethodBody amqMethodBody) throws AMQException
+ public void methodFrameReceived(final int channel, final AMQMethodBody amqMethodBody) throws QpidException
{
_protocolHandler.methodBodyReceived(channel, amqMethodBody);
}
Modified: qpid/java/trunk/client/src/main/java/org/apache/qpid/client/protocol/BlockingMethodFrameListener.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/client/src/main/java/org/apache/qpid/client/protocol/BlockingMethodFrameListener.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/client/src/main/java/org/apache/qpid/client/protocol/BlockingMethodFrameListener.java (original)
+++ qpid/java/trunk/client/src/main/java/org/apache/qpid/client/protocol/BlockingMethodFrameListener.java Wed Jul 8 13:50:16 2015
@@ -20,7 +20,7 @@
*/
package org.apache.qpid.client.protocol;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import org.apache.qpid.client.failover.FailoverException;
import org.apache.qpid.client.util.BlockingWaiter;
import org.apache.qpid.framing.AMQMethodBody;
@@ -105,10 +105,10 @@ public abstract class BlockingMethodFram
*
* @return The AMQP method that was received.
*
- * @throws AMQException
+ * @throws QpidException
* @throws FailoverException
*/
- public AMQMethodEvent blockForFrame(long timeout) throws AMQException, FailoverException
+ public AMQMethodEvent blockForFrame(long timeout) throws QpidException, FailoverException
{
try
{
Modified: qpid/java/trunk/client/src/main/java/org/apache/qpid/client/state/AMQMethodNotImplementedException.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/client/src/main/java/org/apache/qpid/client/state/AMQMethodNotImplementedException.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/client/src/main/java/org/apache/qpid/client/state/AMQMethodNotImplementedException.java (original)
+++ qpid/java/trunk/client/src/main/java/org/apache/qpid/client/state/AMQMethodNotImplementedException.java Wed Jul 8 13:50:16 2015
@@ -20,13 +20,13 @@
*/
package org.apache.qpid.client.state;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import org.apache.qpid.framing.AMQMethodBody;
-public class AMQMethodNotImplementedException extends AMQException
+public class AMQMethodNotImplementedException extends QpidException
{
public AMQMethodNotImplementedException(AMQMethodBody body)
{
- super(null, "Unexpected Method Received: " + body.getClass().getName(), null);
+ super("Unexpected Method Received: " + body.getClass().getName(), null);
}
}
Modified: qpid/java/trunk/client/src/main/java/org/apache/qpid/client/state/AMQStateManager.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/client/src/main/java/org/apache/qpid/client/state/AMQStateManager.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/client/src/main/java/org/apache/qpid/client/state/AMQStateManager.java (original)
+++ qpid/java/trunk/client/src/main/java/org/apache/qpid/client/state/AMQStateManager.java Wed Jul 8 13:50:16 2015
@@ -27,6 +27,7 @@ import java.util.concurrent.CopyOnWriteA
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.apache.qpid.QpidException;
import org.apache.qpid.AMQException;
import org.apache.qpid.client.protocol.AMQProtocolSession;
import org.apache.qpid.framing.AMQMethodBody;
@@ -109,7 +110,7 @@ public class AMQStateManager implements
}
}
- public <B extends AMQMethodBody> boolean methodReceived(AMQMethodEvent<B> evt) throws AMQException
+ public <B extends AMQMethodBody> boolean methodReceived(AMQMethodEvent<B> evt) throws QpidException
{
B method = evt.getMethod();
@@ -141,12 +142,14 @@ public class AMQStateManager implements
*/
public void error(Exception error)
{
- if (error instanceof AMQException)
+ // TODO - this logic seems particularly strange and the assumptions it relies upon around the difference between
+ // QpidException and non-QpidException have probably not been true for a while.
+ if (error instanceof QpidException)
{
// AMQException should be being notified before closing the
// ProtocolSession. Which will change the State to CLOSED.
// if we have a hard error.
- if (((AMQException)error).isHardError())
+ if (!(error instanceof AMQException && !((AMQException)error).isHardError()))
{
changeState(AMQState.CONNECTION_CLOSING);
}
Modified: qpid/java/trunk/client/src/main/java/org/apache/qpid/client/state/StateAwareMethodListener.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/client/src/main/java/org/apache/qpid/client/state/StateAwareMethodListener.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/client/src/main/java/org/apache/qpid/client/state/StateAwareMethodListener.java (original)
+++ qpid/java/trunk/client/src/main/java/org/apache/qpid/client/state/StateAwareMethodListener.java Wed Jul 8 13:50:16 2015
@@ -20,7 +20,7 @@
*/
package org.apache.qpid.client.state;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import org.apache.qpid.client.protocol.AMQProtocolSession;
import org.apache.qpid.framing.AMQMethodBody;
@@ -32,6 +32,6 @@ import org.apache.qpid.framing.AMQMethod
public interface StateAwareMethodListener<B extends AMQMethodBody>
{
- void methodReceived(AMQProtocolSession session, B body, int channelId) throws AMQException;
+ void methodReceived(AMQProtocolSession session, B body, int channelId) throws QpidException;
}
Modified: qpid/java/trunk/client/src/main/java/org/apache/qpid/client/state/StateWaiter.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/client/src/main/java/org/apache/qpid/client/state/StateWaiter.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/client/src/main/java/org/apache/qpid/client/state/StateWaiter.java (original)
+++ qpid/java/trunk/client/src/main/java/org/apache/qpid/client/state/StateWaiter.java Wed Jul 8 13:50:16 2015
@@ -23,7 +23,7 @@ package org.apache.qpid.client.state;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import org.apache.qpid.client.failover.FailoverException;
import org.apache.qpid.client.util.BlockingWaiter;
@@ -84,9 +84,9 @@ public class StateWaiter extends Blockin
/**
* Await for the required State to be achieved within the default timeout.
* @return The achieved state that was requested.
- * @throws AMQException The exception that prevented the required state from being achieved.
+ * @throws QpidException The exception that prevented the required state from being achieved.
*/
- public AMQState await() throws AMQException
+ public AMQState await() throws QpidException
{
return await(_stateManager.getWaitTimeout());
}
@@ -98,9 +98,9 @@ public class StateWaiter extends Blockin
*
* @param timeout The time in milliseconds to wait for any of the states to be achieved.
* @return The achieved state that was requested.
- * @throws AMQException The exception that prevented the required state from being achieved.
+ * @throws QpidException The exception that prevented the required state from being achieved.
*/
- public AMQState await(long timeout) throws AMQException
+ public AMQState await(long timeout) throws QpidException
{
try
{
Modified: qpid/java/trunk/client/src/main/java/org/apache/qpid/client/util/BlockingWaiter.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/client/src/main/java/org/apache/qpid/client/util/BlockingWaiter.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/client/src/main/java/org/apache/qpid/client/util/BlockingWaiter.java (original)
+++ qpid/java/trunk/client/src/main/java/org/apache/qpid/client/util/BlockingWaiter.java Wed Jul 8 13:50:16 2015
@@ -28,7 +28,7 @@ import java.util.concurrent.locks.Reentr
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import org.apache.qpid.AMQTimeoutException;
import org.apache.qpid.client.failover.FailoverException;
@@ -134,10 +134,10 @@ public abstract class BlockingWaiter<T>
*
* @return The object that resolved the blocking.
*
- * @throws AMQException
+ * @throws QpidException
* @throws FailoverException
*/
- public Object block(long timeout) throws AMQException, FailoverException
+ public Object block(long timeout) throws QpidException, FailoverException
{
if (timeout < 0)
{
@@ -181,9 +181,9 @@ public abstract class BlockingWaiter<T>
if (_error != null)
{
- if (_error instanceof AMQException)
+ if (_error instanceof QpidException)
{
- throw (AMQException) _error;
+ throw (QpidException) _error;
}
else if (_error instanceof FailoverException)
{
@@ -192,7 +192,7 @@ public abstract class BlockingWaiter<T>
}
else
{
- throw new AMQException("Woken up due to " + _error.getClass(), _error);
+ throw new QpidException("Woken up due to " + _error.getClass(), _error);
}
}
@@ -328,9 +328,9 @@ public abstract class BlockingWaiter<T>
*
* @return AMQException to throw to waiters when the Waiter is closed.
*/
- private AMQException throwClosedException()
+ private QpidException throwClosedException()
{
- return new AMQException(null, "Waiter was closed.", null);
+ return new QpidException("Waiter was closed.", null);
}
}
Modified: qpid/java/trunk/client/src/main/java/org/apache/qpid/jms/TopicSubscriber.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/client/src/main/java/org/apache/qpid/jms/TopicSubscriber.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/client/src/main/java/org/apache/qpid/jms/TopicSubscriber.java (original)
+++ qpid/java/trunk/client/src/main/java/org/apache/qpid/jms/TopicSubscriber.java Wed Jul 8 13:50:16 2015
@@ -21,12 +21,12 @@
package org.apache.qpid.jms;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import javax.jms.Topic;
public interface TopicSubscriber extends javax.jms.TopicSubscriber
{
- void addBindingKey(Topic topic, String bindingKey) throws AMQException;
+ void addBindingKey(Topic topic, String bindingKey) throws QpidException;
}
Modified: qpid/java/trunk/client/src/test/java/org/apache/qpid/client/AMQSession_0_8Test.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/client/src/test/java/org/apache/qpid/client/AMQSession_0_8Test.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/client/src/test/java/org/apache/qpid/client/AMQSession_0_8Test.java (original)
+++ qpid/java/trunk/client/src/test/java/org/apache/qpid/client/AMQSession_0_8Test.java Wed Jul 8 13:50:16 2015
@@ -20,7 +20,7 @@
*/
package org.apache.qpid.client;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import org.apache.qpid.client.transport.TestNetworkConnection;
import org.apache.qpid.framing.AMQShortString;
import org.apache.qpid.framing.QueueDeclareOkBody;
@@ -52,7 +52,7 @@ public class AMQSession_0_8Test extends
{
_connection.getProtocolHandler().methodBodyReceived(1, new QueueDeclareOkBody(AMQShortString.valueOf(testQueueName), 0, 0));
}
- catch (AMQException e)
+ catch (QpidException e)
{
throw new RuntimeException(e);
}
Modified: qpid/java/trunk/client/src/test/java/org/apache/qpid/client/DispatcherDaemonTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/client/src/test/java/org/apache/qpid/client/DispatcherDaemonTest.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/client/src/test/java/org/apache/qpid/client/DispatcherDaemonTest.java (original)
+++ qpid/java/trunk/client/src/test/java/org/apache/qpid/client/DispatcherDaemonTest.java Wed Jul 8 13:50:16 2015
@@ -20,7 +20,7 @@ package org.apache.qpid.client;
import javax.jms.Session;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import org.apache.qpid.configuration.ClientProperties;
import org.apache.qpid.test.utils.QpidTestCase;
import org.apache.qpid.url.URLSyntaxException;
@@ -55,7 +55,7 @@ public class DispatcherDaemonTest extend
_session.getDispatcherThread().isDaemon());
}
- private AMQSession<?,?> createSession() throws AMQException, URLSyntaxException
+ private AMQSession<?,?> createSession() throws QpidException, URLSyntaxException
{
AMQConnection amqConnection = new MockAMQConnection(
"amqp://guest:guest@client/test?brokerlist='tcp://localhost:1'&maxprefetch='0'");
Modified: qpid/java/trunk/client/src/test/java/org/apache/qpid/client/MockAMQConnection.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/client/src/test/java/org/apache/qpid/client/MockAMQConnection.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/client/src/test/java/org/apache/qpid/client/MockAMQConnection.java (original)
+++ qpid/java/trunk/client/src/test/java/org/apache/qpid/client/MockAMQConnection.java Wed Jul 8 13:50:16 2015
@@ -22,7 +22,7 @@ package org.apache.qpid.client;
import java.io.IOException;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import org.apache.qpid.client.state.AMQState;
import org.apache.qpid.framing.ProtocolVersion;
import org.apache.qpid.url.URLSyntaxException;
@@ -30,19 +30,19 @@ import org.apache.qpid.url.URLSyntaxExce
public class MockAMQConnection extends AMQConnection
{
public MockAMQConnection(String broker, String username, String password, String clientName, String virtualHost)
- throws AMQException, URLSyntaxException
+ throws QpidException, URLSyntaxException
{
super(broker, username, password, clientName, virtualHost);
}
public MockAMQConnection(String host, int port, String username, String password, String clientName, String virtualHost)
- throws AMQException, URLSyntaxException
+ throws QpidException, URLSyntaxException
{
super(host, port, username, password, clientName, virtualHost);
}
public MockAMQConnection(String connection)
- throws AMQException, URLSyntaxException
+ throws QpidException, URLSyntaxException
{
super(connection);
}
Modified: qpid/java/trunk/client/src/test/java/org/apache/qpid/client/handler/PooledConnectionFactoryTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/client/src/test/java/org/apache/qpid/client/handler/PooledConnectionFactoryTest.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/client/src/test/java/org/apache/qpid/client/handler/PooledConnectionFactoryTest.java (original)
+++ qpid/java/trunk/client/src/test/java/org/apache/qpid/client/handler/PooledConnectionFactoryTest.java Wed Jul 8 13:50:16 2015
@@ -41,7 +41,7 @@ import org.mockito.ArgumentCaptor;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import org.apache.qpid.client.CommonConnection;
import org.apache.qpid.client.PooledConnectionFactory;
import org.apache.qpid.jms.ConnectionURL;
@@ -67,7 +67,7 @@ public class PooledConnectionFactoryTest
_connectionFactory = new PooledConnectionFactory()
{
@Override
- protected CommonConnection newConnectionInstance(final ConnectionURL connectionDetails) throws AMQException
+ protected CommonConnection newConnectionInstance(final ConnectionURL connectionDetails) throws QpidException
{
return _connectionCreator.newConnection(connectionDetails);
}
Modified: qpid/java/trunk/client/src/test/java/org/apache/qpid/client/protocol/AMQProtocolHandlerTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/client/src/test/java/org/apache/qpid/client/protocol/AMQProtocolHandlerTest.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/client/src/test/java/org/apache/qpid/client/protocol/AMQProtocolHandlerTest.java (original)
+++ qpid/java/trunk/client/src/test/java/org/apache/qpid/client/protocol/AMQProtocolHandlerTest.java Wed Jul 8 13:50:16 2015
@@ -23,11 +23,12 @@ package org.apache.qpid.client.protocol;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
+import org.apache.qpid.AMQException;
import org.apache.qpid.test.utils.QpidTestCase;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import org.apache.qpid.client.AMQAuthenticationException;
import org.apache.qpid.client.MockAMQConnection;
import org.apache.qpid.client.state.AMQState;
@@ -95,19 +96,19 @@ public class AMQProtocolHandlerTest exte
*/
public void testFrameListenerUpdateWithAMQException() throws InterruptedException
{
- AMQException trigger = new AMQAuthenticationException(AMQConstant.ACCESS_REFUSED,
+ AMQAuthenticationException trigger = new AMQAuthenticationException(AMQConstant.ACCESS_REFUSED,
"AMQPHTest", new RuntimeException());
performWithException(trigger);
- AMQException receivedException = (AMQException) _listener.getReceivedException();
+ Exception receivedException = _listener.getReceivedException();
assertEquals("Return exception was not the expected type",
AMQAuthenticationException.class, receivedException.getClass());
assertEquals("The _Listener did not receive the correct error code",
- trigger.getErrorCode(), receivedException.getErrorCode());
+ trigger.getErrorCode(), ((AMQAuthenticationException)receivedException).getErrorCode());
}
/**
@@ -218,9 +219,9 @@ public class AMQProtocolHandlerTest exte
assertNotNull("The _Listener did not receive the exception", _listener.getReceivedException());
assertTrue("Received exception not an AMQException",
- _listener.getReceivedException() instanceof AMQException);
+ _listener.getReceivedException() instanceof QpidException);
- AMQException receivedException = (AMQException) _listener.getReceivedException();
+ QpidException receivedException = (QpidException) _listener.getReceivedException();
assertTrue("The _Listener did not receive the correct message",
receivedException.getMessage().startsWith(trigger.getMessage()));
Modified: qpid/java/trunk/client/src/test/java/org/apache/qpid/test/unit/client/channelclose/ChannelCloseMethodHandlerNoCloseOk.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/client/src/test/java/org/apache/qpid/test/unit/client/channelclose/ChannelCloseMethodHandlerNoCloseOk.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/client/src/test/java/org/apache/qpid/test/unit/client/channelclose/ChannelCloseMethodHandlerNoCloseOk.java (original)
+++ qpid/java/trunk/client/src/test/java/org/apache/qpid/test/unit/client/channelclose/ChannelCloseMethodHandlerNoCloseOk.java Wed Jul 8 13:50:16 2015
@@ -24,7 +24,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.qpid.AMQChannelClosedException;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import org.apache.qpid.AMQInvalidArgumentException;
import org.apache.qpid.AMQInvalidRoutingKeyException;
import org.apache.qpid.client.AMQNoConsumersException;
@@ -47,7 +47,7 @@ public class ChannelCloseMethodHandlerNo
}
public void methodReceived(AMQProtocolSession session, ChannelCloseBody method, int channelId)
- throws AMQException
+ throws QpidException
{
_logger.debug("ChannelClose method received");
Modified: qpid/java/trunk/client/src/test/java/org/apache/qpid/test/unit/message/TestAMQSession.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/client/src/test/java/org/apache/qpid/test/unit/message/TestAMQSession.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/client/src/test/java/org/apache/qpid/test/unit/message/TestAMQSession.java (original)
+++ qpid/java/trunk/client/src/test/java/org/apache/qpid/test/unit/message/TestAMQSession.java Wed Jul 8 13:50:16 2015
@@ -20,7 +20,7 @@
*/
package org.apache.qpid.test.unit.message;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import org.apache.qpid.client.AMQConnection;
import org.apache.qpid.client.AMQDestination;
import org.apache.qpid.client.AMQSession_0_8;
@@ -54,17 +54,17 @@ public class TestAMQSession extends AMQS
public void sendQueueBind(AMQShortString queueName, AMQShortString routingKey, FieldTable arguments,
AMQShortString exchangeName, AMQDestination destination,
- boolean nowait) throws AMQException, FailoverException
+ boolean nowait) throws QpidException, FailoverException
{
}
- public void sendClose(long timeout) throws AMQException, FailoverException
+ public void sendClose(long timeout) throws QpidException, FailoverException
{
}
- public void commitImpl() throws AMQException, FailoverException
+ public void commitImpl() throws QpidException, FailoverException
{
}
@@ -79,7 +79,8 @@ public class TestAMQSession extends AMQS
return null;
}
- public void sendCreateQueue(AMQShortString name, boolean autoDelete, boolean durable, boolean exclusive, Map<String, Object> arguments) throws AMQException, FailoverException
+ public void sendCreateQueue(AMQShortString name, boolean autoDelete, boolean durable, boolean exclusive, Map<String, Object> arguments) throws
+ QpidException, FailoverException
{
}
@@ -89,7 +90,7 @@ public class TestAMQSession extends AMQS
return null;
}
- public void sendRecover() throws AMQException, FailoverException
+ public void sendRecover() throws QpidException, FailoverException
{
}
@@ -104,7 +105,7 @@ public class TestAMQSession extends AMQS
}
- public void sendRollback() throws AMQException, FailoverException
+ public void sendRollback() throws QpidException, FailoverException
{
}
@@ -124,7 +125,8 @@ public class TestAMQSession extends AMQS
return false;
}
- public void sendConsume(BasicMessageConsumer_0_8 consumer, AMQShortString queueName, boolean nowait, int tag) throws AMQException, FailoverException
+ public void sendConsume(BasicMessageConsumer_0_8 consumer, AMQShortString queueName, boolean nowait, int tag) throws
+ QpidException, FailoverException
{
}
@@ -134,28 +136,29 @@ public class TestAMQSession extends AMQS
return null;
}
- protected Long requestQueueDepth(AMQDestination amqd) throws AMQException, FailoverException
+ protected Long requestQueueDepth(AMQDestination amqd) throws QpidException, FailoverException
{
return null;
}
- public void sendExchangeDeclare(AMQShortString name, AMQShortString type, boolean nowait, boolean durable, boolean autoDelete, boolean internal) throws AMQException, FailoverException
+ public void sendExchangeDeclare(AMQShortString name, AMQShortString type, boolean nowait, boolean durable, boolean autoDelete, boolean internal) throws
+ QpidException, FailoverException
{
}
public void sendQueueDeclare(AMQDestination amqd, AMQProtocolHandler protocolHandler,
- boolean passive) throws AMQException, FailoverException
+ boolean passive) throws QpidException, FailoverException
{
}
- public void sendQueueDelete(AMQShortString queueName) throws AMQException, FailoverException
+ public void sendQueueDelete(AMQShortString queueName) throws QpidException, FailoverException
{
}
- public void sendSuspendChannel(boolean suspend) throws AMQException, FailoverException
+ public void sendSuspendChannel(boolean suspend) throws QpidException, FailoverException
{
}
@@ -201,7 +204,7 @@ public class TestAMQSession extends AMQS
}
@Override
- public AMQException getLastException()
+ public QpidException getLastException()
{
return null;
}
Modified: qpid/java/trunk/common/src/main/java/org/apache/qpid/AMQChannelException.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/common/src/main/java/org/apache/qpid/AMQChannelException.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/common/src/main/java/org/apache/qpid/AMQChannelException.java (original)
+++ qpid/java/trunk/common/src/main/java/org/apache/qpid/AMQChannelException.java Wed Jul 8 13:50:16 2015
@@ -40,7 +40,7 @@ public class AMQChannelException extends
int methodId,
MethodRegistry methodRegistry)
{
- super(errorCode, msg);
+ super(errorCode, msg, null);
_classId = classId;
_methodId = methodId;
_methodRegistry = methodRegistry;
Modified: qpid/java/trunk/common/src/main/java/org/apache/qpid/AMQConnectionFailureException.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/common/src/main/java/org/apache/qpid/AMQConnectionFailureException.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/common/src/main/java/org/apache/qpid/AMQConnectionFailureException.java (original)
+++ qpid/java/trunk/common/src/main/java/org/apache/qpid/AMQConnectionFailureException.java Wed Jul 8 13:50:16 2015
@@ -20,36 +20,15 @@
*/
package org.apache.qpid;
-import org.apache.qpid.protocol.AMQConstant;
-
-import java.util.Collection;
-
/**
* AMQConnectionFailureException indicates that a connection to a broker could not be formed.
*/
-public class AMQConnectionFailureException extends AMQException
+public class AMQConnectionFailureException extends QpidException
{
- private Collection<Exception> _exceptions;
-
- public AMQConnectionFailureException(String message, Throwable cause)
+
+ public AMQConnectionFailureException(String message, Throwable cause)
{
- super(cause instanceof AMQException ? ((AMQException) cause).getErrorCode() : null, message, cause);
+ super(message, cause);
}
- public AMQConnectionFailureException(AMQConstant errorCode, String message, Throwable cause)
- {
- super(errorCode, message, cause);
- }
-
- public AMQConnectionFailureException(String message, Collection<Exception> exceptions)
- {
- // Blah, I hate ? but java won't let super() be anything other than the first thing, sorry...
- super (null, message, exceptions.isEmpty() ? null : exceptions.iterator().next());
- this._exceptions = exceptions;
- }
-
- public Collection<Exception> getLinkedExceptions()
- {
- return _exceptions;
- }
}
Modified: qpid/java/trunk/common/src/main/java/org/apache/qpid/AMQDisconnectedException.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/common/src/main/java/org/apache/qpid/AMQDisconnectedException.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/common/src/main/java/org/apache/qpid/AMQDisconnectedException.java (original)
+++ qpid/java/trunk/common/src/main/java/org/apache/qpid/AMQDisconnectedException.java Wed Jul 8 13:50:16 2015
@@ -23,10 +23,10 @@ package org.apache.qpid;
/**
* AMQDisconnectedException indicates that a broker disconnected without failover.
*/
-public class AMQDisconnectedException extends AMQException
+public class AMQDisconnectedException extends QpidException
{
public AMQDisconnectedException(String msg, Throwable cause)
{
- super(null, msg, cause);
+ super(msg, cause);
}
}
Copied: qpid/java/trunk/common/src/main/java/org/apache/qpid/AMQException.java (from r1689874, qpid/java/trunk/common/src/main/java/org/apache/qpid/AMQProtocolException.java)
URL: http://svn.apache.org/viewvc/qpid/java/trunk/common/src/main/java/org/apache/qpid/AMQException.java?p2=qpid/java/trunk/common/src/main/java/org/apache/qpid/AMQException.java&p1=qpid/java/trunk/common/src/main/java/org/apache/qpid/AMQProtocolException.java&r1=1689874&r2=1689876&rev=1689876&view=diff
==============================================================================
--- qpid/java/trunk/common/src/main/java/org/apache/qpid/AMQProtocolException.java (original)
+++ qpid/java/trunk/common/src/main/java/org/apache/qpid/AMQException.java Wed Jul 8 13:50:16 2015
@@ -21,19 +21,80 @@ package org.apache.qpid;
import org.apache.qpid.protocol.AMQConstant;
-public class AMQProtocolException extends AMQException
+public class AMQException extends QpidException
{
+ private final AMQConstant _errorCode;
+
+ private final boolean _isHardError;
+
+ public AMQException(final AMQConstant errorCode, final String message)
+ {
+ this(errorCode, message, null);
+ }
+
/**
* Constructor for a Protocol Exception
- * <p> This is the only provided constructor and the parameters have to be
- * set to null when they are unknown.
*
* @param msg A description of the reason of this exception .
- * @param errorCode A string specifyin the error code of this exception.
+ * @param errorCode A string specifying the error code of this exception.
* @param cause The linked Execption.
*/
- public AMQProtocolException(AMQConstant errorCode, String msg, Throwable cause)
+ public AMQException(AMQConstant errorCode, String msg, Throwable cause)
+ {
+ this(errorCode, true, msg, cause);
+ }
+
+ public AMQException(final AMQConstant errorCode,
+ final boolean isHardError,
+ final String message,
+ final Throwable cause)
+ {
+ super(message, cause);
+ _errorCode = errorCode;
+ _isHardError = isHardError;
+ }
+
+
+ @Override
+ public String toString()
+ {
+ return getClass().getName() + ": " + getMessage() + (_errorCode == null ? "" : " [error code " + _errorCode + "]");
+ }
+
+ /**
+ * Gets the AMQ protocol exception code associated with this exception.
+ *
+ * @return The AMQ protocol exception code associated with this exception.
+ */
+ public AMQConstant getErrorCode()
+ {
+ return _errorCode;
+ }
+
+ public boolean isHardError()
{
- super(errorCode, msg, cause);
+ return _isHardError;
}
+
+ @Override
+ public AMQException cloneForCurrentThread()
+ {
+ Class amqeClass = this.getClass();
+ Class<?>[] paramClasses = {AMQConstant.class, String.class, Throwable.class};
+ Object[] params = {_errorCode, getMessage(), this};
+
+ AMQException newAMQE;
+
+ try
+ {
+ newAMQE = (AMQException) amqeClass.getConstructor(paramClasses).newInstance(params);
+ }
+ catch (Exception creationException)
+ {
+ newAMQE = new AMQException(_errorCode, _isHardError, getMessage(), this);
+ }
+
+ return newAMQE;
+ }
+
}
Added: qpid/java/trunk/common/src/main/java/org/apache/qpid/AMQProtocolException.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/common/src/main/java/org/apache/qpid/AMQProtocolException.java?rev=1689876&view=auto
==============================================================================
--- qpid/java/trunk/common/src/main/java/org/apache/qpid/AMQProtocolException.java (added)
+++ qpid/java/trunk/common/src/main/java/org/apache/qpid/AMQProtocolException.java Wed Jul 8 13:50:16 2015
@@ -0,0 +1,40 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid;
+
+import org.apache.qpid.protocol.AMQConstant;
+
+public class AMQProtocolException extends AMQException
+{
+ /**
+ * Constructor for a Protocol Exception
+ * <p> This is the only provided constructor and the parameters have to be
+ * set to null when they are unknown.
+ *
+ * @param msg A description of the reason of this exception .
+ * @param errorCode A string specifyin the error code of this exception.
+ * @param cause The linked Execption.
+ */
+ public AMQProtocolException(AMQConstant errorCode, String msg, Throwable cause)
+ {
+ super(errorCode, msg, cause);
+ }
+}
Propchange: qpid/java/trunk/common/src/main/java/org/apache/qpid/AMQProtocolException.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: qpid/java/trunk/common/src/main/java/org/apache/qpid/AMQSecurityException.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/common/src/main/java/org/apache/qpid/AMQSecurityException.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/common/src/main/java/org/apache/qpid/AMQSecurityException.java (original)
+++ qpid/java/trunk/common/src/main/java/org/apache/qpid/AMQSecurityException.java Wed Jul 8 13:50:16 2015
@@ -41,14 +41,5 @@ public class AMQSecurityException extend
{
super(AMQConstant.ACCESS_REFUSED, ((msg == null) ? "Permission denied" : msg), cause);
}
-
- public AMQSecurityException(String msg)
- {
- this(msg, null);
- }
-
- public AMQSecurityException()
- {
- this(null);
- }
+
}
Modified: qpid/java/trunk/common/src/main/java/org/apache/qpid/AMQUnresolvedAddressException.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/common/src/main/java/org/apache/qpid/AMQUnresolvedAddressException.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/common/src/main/java/org/apache/qpid/AMQUnresolvedAddressException.java (original)
+++ qpid/java/trunk/common/src/main/java/org/apache/qpid/AMQUnresolvedAddressException.java Wed Jul 8 13:50:16 2015
@@ -28,13 +28,13 @@ package org.apache.qpid;
* TODO Why replace java.nio.UnresolvedAddressException with this? This is checked, which may explain why, but it
* doesn't wrap the underlying exception.
*/
-public class AMQUnresolvedAddressException extends AMQException
+public class AMQUnresolvedAddressException extends QpidException
{
private String _broker;
public AMQUnresolvedAddressException(String message, String broker, Throwable cause)
{
- super(null, message, cause);
+ super(message, cause);
_broker = broker;
}
Copied: qpid/java/trunk/common/src/main/java/org/apache/qpid/QpidException.java (from r1689639, qpid/java/trunk/common/src/main/java/org/apache/qpid/AMQException.java)
URL: http://svn.apache.org/viewvc/qpid/java/trunk/common/src/main/java/org/apache/qpid/QpidException.java?p2=qpid/java/trunk/common/src/main/java/org/apache/qpid/QpidException.java&p1=qpid/java/trunk/common/src/main/java/org/apache/qpid/AMQException.java&r1=1689639&r2=1689876&rev=1689876&view=diff
==============================================================================
--- qpid/java/trunk/common/src/main/java/org/apache/qpid/AMQException.java (original)
+++ qpid/java/trunk/common/src/main/java/org/apache/qpid/QpidException.java Wed Jul 8 13:50:16 2015
@@ -20,87 +20,26 @@
*/
package org.apache.qpid;
-import org.apache.qpid.protocol.AMQConstant;
-
/**
* AMQException forms the root exception of all exceptions relating to the AMQ protocol. It provides space to associate
* a required AMQ error code with the exception, which is a numeric value, with a meaning defined by the protocol.
*/
-public class AMQException extends Exception
+public class QpidException extends Exception
{
- /** Holds the AMQ error code constant associated with this exception. */
- private AMQConstant _errorCode;
-
- private boolean _isHardError;
-
- /**
- * Creates an exception with an optional error code, optional message and optional underlying cause.
- *
- * @param errorCode The error code. May be null if not to be set.
- * @param msg The exception message. May be null if not to be set.
- * @param cause The underlying cause of the exception. May be null if not to be set.
- */
- public AMQException(AMQConstant errorCode, String msg, Throwable cause)
- {
- // isHardError is defaulted to true to avoid unnessacery modification to
- // existing code.
- this(errorCode,true,msg,cause);
- }
-
- /**
- * Creates an exception with an optional error code, optional message and optional underlying cause.
- *
- * @param errorCode The error code. May be null if not to be set.
- * @param isHardError Denotes if the underlying error is considered a hard error.
- * @param msg The exception message. May be null if not to be set.
- * @param cause The underlying cause of the exception. May be null if not to be set.
- */
- public AMQException(AMQConstant errorCode, boolean isHardError, String msg, Throwable cause)
- {
- super(((msg == null) ? "" : msg), cause);
- _errorCode = errorCode;
- _isHardError = isHardError;
- }
-
- /*
- * Deprecated constructors brought from M2.1
- */
- @Deprecated
- public AMQException(String msg)
- {
- this(null, (msg == null) ? "" : msg);
- }
-
- public AMQException(AMQConstant errorCode, String msg)
+ public QpidException(String msg)
{
- this(errorCode, (msg == null) ? "" : msg, null);
+ this(msg, null);
}
- @Deprecated
- public AMQException(String msg, Throwable cause)
+ public QpidException(String msg, Throwable cause)
{
- this(null, msg, cause);
+ super(msg == null ? "" : msg, cause);
}
@Override
public String toString()
{
- return getClass().getName() + ": " + getMessage() + (_errorCode == null ? "" : " [error code " + _errorCode + "]");
- }
-
- /**
- * Gets the AMQ protocol exception code associated with this exception.
- *
- * @return The AMQ protocol exception code associated with this exception.
- */
- public AMQConstant getErrorCode()
- {
- return _errorCode;
- }
-
- public boolean isHardError()
- {
- return _isHardError;
+ return getClass().getName() + ": " + getMessage();
}
/**
@@ -111,24 +50,28 @@ public class AMQException extends Except
*
* @return cloned exception
*/
- public AMQException cloneForCurrentThread()
+ public QpidException cloneForCurrentThread()
{
Class amqeClass = this.getClass();
- Class<?>[] paramClasses = {AMQConstant.class, String.class, Throwable.class};
- Object[] params = {getErrorCode(), getMessage(), this};
+ Class<?>[] paramClasses = {String.class, Throwable.class};
+ Object[] params = {getMessage(), this};
- AMQException newAMQE;
+ QpidException newAMQE;
try
{
- newAMQE = (AMQException) amqeClass.getConstructor(paramClasses).newInstance(params);
+ newAMQE = (QpidException) amqeClass.getConstructor(paramClasses).newInstance(params);
}
catch (Exception creationException)
{
- newAMQE = new AMQException(getErrorCode(), getMessage(), this);
+ newAMQE = new QpidException(getMessage(), this);
}
return newAMQE;
}
+ public QpidException clone()
+ {
+ return null;
+ }
}
Modified: qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/AMQBody.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/AMQBody.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/AMQBody.java (original)
+++ qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/AMQBody.java Wed Jul 8 13:50:16 2015
@@ -23,7 +23,7 @@ package org.apache.qpid.framing;
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import org.apache.qpid.protocol.AMQVersionAwareProtocolSession;
import org.apache.qpid.transport.ByteBufferSender;
@@ -39,7 +39,7 @@ public interface AMQBody
public void writePayload(DataOutput buffer) throws IOException;
- void handle(final int channelId, final AMQVersionAwareProtocolSession amqProtocolSession) throws AMQException;
+ void handle(final int channelId, final AMQVersionAwareProtocolSession amqProtocolSession) throws QpidException;
long writePayload(ByteBufferSender sender) throws IOException;
}
Modified: qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/AMQMethodBody.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/AMQMethodBody.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/AMQMethodBody.java (original)
+++ qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/AMQMethodBody.java Wed Jul 8 13:50:16 2015
@@ -25,7 +25,7 @@ import java.io.IOException;
import org.apache.qpid.AMQChannelException;
import org.apache.qpid.AMQConnectionException;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import org.apache.qpid.protocol.AMQConstant;
public interface AMQMethodBody extends AMQBody
@@ -70,5 +70,5 @@ public interface AMQMethodBody extends A
final MethodRegistry methodRegistry);
- public boolean execute(MethodDispatcher methodDispatcher, int channelId) throws AMQException;
+ public boolean execute(MethodDispatcher methodDispatcher, int channelId) throws QpidException;
}
Modified: qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyImpl.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyImpl.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyImpl.java (original)
+++ qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyImpl.java Wed Jul 8 13:50:16 2015
@@ -28,7 +28,7 @@ import java.nio.ByteBuffer;
import org.apache.qpid.AMQChannelException;
import org.apache.qpid.AMQConnectionException;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import org.apache.qpid.protocol.AMQConstant;
import org.apache.qpid.protocol.AMQVersionAwareProtocolSession;
import org.apache.qpid.transport.ByteBufferSender;
@@ -91,7 +91,7 @@ public abstract class AMQMethodBodyImpl
return new AMQConnectionException(code, message, this, methodRegistry);
}
- public void handle(final int channelId, final AMQVersionAwareProtocolSession session) throws AMQException
+ public void handle(final int channelId, final AMQVersionAwareProtocolSession session) throws QpidException
{
session.methodFrameReceived(channelId, this);
}
Modified: qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/AccessRequestBody.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/AccessRequestBody.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/AccessRequestBody.java (original)
+++ qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/AccessRequestBody.java Wed Jul 8 13:50:16 2015
@@ -30,7 +30,7 @@ package org.apache.qpid.framing;
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import org.apache.qpid.codec.MarkableDataInput;
public class AccessRequestBody extends AMQMethodBodyImpl implements EncodableAMQDataBlock, AMQMethodBody
@@ -136,7 +136,7 @@ public class AccessRequestBody extends A
writeBitfield( buffer, _bitfield0 );
}
- public boolean execute(MethodDispatcher dispatcher, int channelId) throws AMQException
+ public boolean execute(MethodDispatcher dispatcher, int channelId) throws QpidException
{
return dispatcher.dispatchAccessRequest(this, channelId);
}
Modified: qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/AccessRequestOkBody.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/AccessRequestOkBody.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/AccessRequestOkBody.java (original)
+++ qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/AccessRequestOkBody.java Wed Jul 8 13:50:16 2015
@@ -30,7 +30,7 @@ package org.apache.qpid.framing;
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import org.apache.qpid.codec.MarkableDataInput;
public class AccessRequestOkBody extends AMQMethodBodyImpl implements EncodableAMQDataBlock, AMQMethodBody
@@ -81,7 +81,7 @@ public class AccessRequestOkBody extends
writeUnsignedShort( buffer, _ticket );
}
- public boolean execute(MethodDispatcher dispatcher, int channelId) throws AMQException
+ public boolean execute(MethodDispatcher dispatcher, int channelId) throws QpidException
{
return dispatcher.dispatchAccessRequestOk(this, channelId);
}
Modified: qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicAckBody.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicAckBody.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicAckBody.java (original)
+++ qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicAckBody.java Wed Jul 8 13:50:16 2015
@@ -30,7 +30,7 @@ package org.apache.qpid.framing;
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import org.apache.qpid.codec.MarkableDataInput;
public class BasicAckBody extends AMQMethodBodyImpl implements EncodableAMQDataBlock, AMQMethodBody
@@ -95,7 +95,7 @@ public class BasicAckBody extends AMQMet
writeBitfield( buffer, _bitfield0 );
}
- public boolean execute(MethodDispatcher dispatcher, int channelId) throws AMQException
+ public boolean execute(MethodDispatcher dispatcher, int channelId) throws QpidException
{
return dispatcher.dispatchBasicAck(this, channelId);
}
Modified: qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicCancelBody.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicCancelBody.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicCancelBody.java (original)
+++ qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicCancelBody.java Wed Jul 8 13:50:16 2015
@@ -30,7 +30,7 @@ package org.apache.qpid.framing;
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import org.apache.qpid.codec.MarkableDataInput;
public class BasicCancelBody extends AMQMethodBodyImpl implements EncodableAMQDataBlock, AMQMethodBody
@@ -96,7 +96,7 @@ public class BasicCancelBody extends AMQ
writeBitfield( buffer, _bitfield0 );
}
- public boolean execute(MethodDispatcher dispatcher, int channelId) throws AMQException
+ public boolean execute(MethodDispatcher dispatcher, int channelId) throws QpidException
{
return dispatcher.dispatchBasicCancel(this, channelId);
}
Modified: qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicCancelOkBody.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicCancelOkBody.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicCancelOkBody.java (original)
+++ qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicCancelOkBody.java Wed Jul 8 13:50:16 2015
@@ -30,7 +30,7 @@ package org.apache.qpid.framing;
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import org.apache.qpid.codec.MarkableDataInput;
public class BasicCancelOkBody extends AMQMethodBodyImpl implements EncodableAMQDataBlock, AMQMethodBody
@@ -82,7 +82,7 @@ public class BasicCancelOkBody extends A
writeAMQShortString( buffer, _consumerTag );
}
- public boolean execute(MethodDispatcher dispatcher, int channelId) throws AMQException
+ public boolean execute(MethodDispatcher dispatcher, int channelId) throws QpidException
{
return dispatcher.dispatchBasicCancelOk(this, channelId);
}
Modified: qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicConsumeBody.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicConsumeBody.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicConsumeBody.java (original)
+++ qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicConsumeBody.java Wed Jul 8 13:50:16 2015
@@ -30,7 +30,7 @@ package org.apache.qpid.framing;
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import org.apache.qpid.codec.MarkableDataInput;
public class BasicConsumeBody extends AMQMethodBodyImpl implements EncodableAMQDataBlock, AMQMethodBody
@@ -156,7 +156,7 @@ public class BasicConsumeBody extends AM
writeFieldTable( buffer, _arguments );
}
- public boolean execute(MethodDispatcher dispatcher, int channelId) throws AMQException
+ public boolean execute(MethodDispatcher dispatcher, int channelId) throws QpidException
{
return dispatcher.dispatchBasicConsume(this, channelId);
}
Modified: qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicConsumeOkBody.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicConsumeOkBody.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicConsumeOkBody.java (original)
+++ qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicConsumeOkBody.java Wed Jul 8 13:50:16 2015
@@ -30,7 +30,7 @@ package org.apache.qpid.framing;
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import org.apache.qpid.codec.MarkableDataInput;
public class BasicConsumeOkBody extends AMQMethodBodyImpl implements EncodableAMQDataBlock, AMQMethodBody
@@ -82,7 +82,7 @@ public class BasicConsumeOkBody extends
writeAMQShortString( buffer, _consumerTag );
}
- public boolean execute(MethodDispatcher dispatcher, int channelId) throws AMQException
+ public boolean execute(MethodDispatcher dispatcher, int channelId) throws QpidException
{
return dispatcher.dispatchBasicConsumeOk(this, channelId);
}
Modified: qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicDeliverBody.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicDeliverBody.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicDeliverBody.java (original)
+++ qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicDeliverBody.java Wed Jul 8 13:50:16 2015
@@ -30,7 +30,7 @@ package org.apache.qpid.framing;
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import org.apache.qpid.codec.MarkableDataInput;
public class BasicDeliverBody extends AMQMethodBodyImpl implements EncodableAMQDataBlock, AMQMethodBody
@@ -126,7 +126,7 @@ public class BasicDeliverBody extends AM
writeAMQShortString( buffer, _routingKey );
}
- public boolean execute(MethodDispatcher dispatcher, int channelId) throws AMQException
+ public boolean execute(MethodDispatcher dispatcher, int channelId) throws QpidException
{
return dispatcher.dispatchBasicDeliver(this, channelId);
}
Modified: qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicGetBody.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicGetBody.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicGetBody.java (original)
+++ qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicGetBody.java Wed Jul 8 13:50:16 2015
@@ -30,7 +30,7 @@ package org.apache.qpid.framing;
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import org.apache.qpid.codec.MarkableDataInput;
public class BasicGetBody extends AMQMethodBodyImpl implements EncodableAMQDataBlock, AMQMethodBody
@@ -105,7 +105,7 @@ public class BasicGetBody extends AMQMet
writeBitfield( buffer, _bitfield0 );
}
- public boolean execute(MethodDispatcher dispatcher, int channelId) throws AMQException
+ public boolean execute(MethodDispatcher dispatcher, int channelId) throws QpidException
{
return dispatcher.dispatchBasicGet(this, channelId);
}
Modified: qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicGetEmptyBody.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicGetEmptyBody.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicGetEmptyBody.java (original)
+++ qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicGetEmptyBody.java Wed Jul 8 13:50:16 2015
@@ -30,7 +30,7 @@ package org.apache.qpid.framing;
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import org.apache.qpid.codec.MarkableDataInput;
public class BasicGetEmptyBody extends AMQMethodBodyImpl implements EncodableAMQDataBlock, AMQMethodBody
@@ -82,7 +82,7 @@ public class BasicGetEmptyBody extends A
writeAMQShortString( buffer, _clusterId );
}
- public boolean execute(MethodDispatcher dispatcher, int channelId) throws AMQException
+ public boolean execute(MethodDispatcher dispatcher, int channelId) throws QpidException
{
return dispatcher.dispatchBasicGetEmpty(this, channelId);
}
Modified: qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicGetOkBody.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicGetOkBody.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicGetOkBody.java (original)
+++ qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicGetOkBody.java Wed Jul 8 13:50:16 2015
@@ -30,7 +30,7 @@ package org.apache.qpid.framing;
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import org.apache.qpid.codec.MarkableDataInput;
public class BasicGetOkBody extends AMQMethodBodyImpl implements EncodableAMQDataBlock, AMQMethodBody
@@ -125,7 +125,7 @@ public class BasicGetOkBody extends AMQM
writeUnsignedInteger( buffer, _messageCount );
}
- public boolean execute(MethodDispatcher dispatcher, int channelId) throws AMQException
+ public boolean execute(MethodDispatcher dispatcher, int channelId) throws QpidException
{
return dispatcher.dispatchBasicGetOk(this, channelId);
}
Modified: qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicNackBody.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicNackBody.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicNackBody.java (original)
+++ qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicNackBody.java Wed Jul 8 13:50:16 2015
@@ -30,7 +30,7 @@ package org.apache.qpid.framing;
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import org.apache.qpid.codec.MarkableDataInput;
public class BasicNackBody extends AMQMethodBodyImpl implements EncodableAMQDataBlock, AMQMethodBody
@@ -107,7 +107,7 @@ public class BasicNackBody extends AMQMe
writeBitfield( buffer, _bitfield0 );
}
- public boolean execute(MethodDispatcher dispatcher, int channelId) throws AMQException
+ public boolean execute(MethodDispatcher dispatcher, int channelId) throws QpidException
{
return dispatcher.dispatchBasicNack(this, channelId);
}
Modified: qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicPublishBody.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicPublishBody.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicPublishBody.java (original)
+++ qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicPublishBody.java Wed Jul 8 13:50:16 2015
@@ -30,7 +30,7 @@ package org.apache.qpid.framing;
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import org.apache.qpid.codec.MarkableDataInput;
public class BasicPublishBody extends AMQMethodBodyImpl implements EncodableAMQDataBlock, AMQMethodBody
@@ -125,7 +125,7 @@ public class BasicPublishBody extends AM
writeBitfield( buffer, _bitfield0 );
}
- public boolean execute(MethodDispatcher dispatcher, int channelId) throws AMQException
+ public boolean execute(MethodDispatcher dispatcher, int channelId) throws QpidException
{
return dispatcher.dispatchBasicPublish(this, channelId);
}
Modified: qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicQosBody.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicQosBody.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicQosBody.java (original)
+++ qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicQosBody.java Wed Jul 8 13:50:16 2015
@@ -30,7 +30,7 @@ package org.apache.qpid.framing;
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import org.apache.qpid.codec.MarkableDataInput;
public class BasicQosBody extends AMQMethodBodyImpl implements EncodableAMQDataBlock, AMQMethodBody
@@ -104,7 +104,7 @@ public class BasicQosBody extends AMQMet
writeBitfield( buffer, _bitfield0 );
}
- public boolean execute(MethodDispatcher dispatcher, int channelId) throws AMQException
+ public boolean execute(MethodDispatcher dispatcher, int channelId) throws QpidException
{
return dispatcher.dispatchBasicQos(this, channelId);
}
Modified: qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicQosOkBody.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicQosOkBody.java?rev=1689876&r1=1689875&r2=1689876&view=diff
==============================================================================
--- qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicQosOkBody.java (original)
+++ qpid/java/trunk/common/src/main/java/org/apache/qpid/framing/BasicQosOkBody.java Wed Jul 8 13:50:16 2015
@@ -30,7 +30,7 @@ package org.apache.qpid.framing;
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.QpidException;
import org.apache.qpid.codec.MarkableDataInput;
public class BasicQosOkBody extends AMQMethodBodyImpl implements EncodableAMQDataBlock, AMQMethodBody
@@ -72,7 +72,7 @@ public class BasicQosOkBody extends AMQM
{
}
- public boolean execute(MethodDispatcher dispatcher, int channelId) throws AMQException
+ public boolean execute(MethodDispatcher dispatcher, int channelId) throws QpidException
{
return dispatcher.dispatchBasicQosOk(this, channelId);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org