Package com.rabbitmq.client.impl
Class StrictExceptionHandler
- java.lang.Object
-
- com.rabbitmq.client.impl.ForgivingExceptionHandler
-
- com.rabbitmq.client.impl.StrictExceptionHandler
-
- All Implemented Interfaces:
ExceptionHandler
- Direct Known Subclasses:
DefaultExceptionHandler
public class StrictExceptionHandler extends ForgivingExceptionHandler implements ExceptionHandler
An implementation ofExceptionHandler
that does close channels on unhandled consumer exception. Used byAMQConnection
.
-
-
Constructor Summary
Constructors Constructor Description StrictExceptionHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
handleBlockedListenerException(Connection connection, Throwable exception)
Perform any required exception processing for the situation when the driver thread for the connection has called a BlockedListener's method, and that method has thrown an exception.protected void
handleChannelKiller(Channel channel, Throwable exception, String what)
protected void
handleChannelKiller(Channel channel, Throwable exception, String logMessage, String closeMessage)
void
handleConfirmListenerException(Channel channel, Throwable exception)
Perform any required exception processing for the situation when the driver thread for the connection has called a ConfirmListener's handleAck or handleNack method, and that method has thrown an exception.void
handleConsumerException(Channel channel, Throwable exception, Consumer consumer, String consumerTag, String methodName)
Perform any required exception processing for the situation when the driver thread for the connection has called a method on a Consumer, and that method has thrown an exception.void
handleFlowListenerException(Channel channel, Throwable exception)
Perform any required exception processing for the situation when the driver thread for the connection has called a FlowListener's handleFlow method, and that method has thrown an exception.void
handleReturnListenerException(Channel channel, Throwable exception)
Perform any required exception processing for the situation when the driver thread for the connection has called a ReturnListener's handleReturn method, and that method has thrown an exception.-
Methods inherited from class com.rabbitmq.client.impl.ForgivingExceptionHandler
handleChannelRecoveryException, handleConnectionKiller, handleConnectionRecoveryException, handleTopologyRecoveryException, handleUnexpectedConnectionDriverException, log
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.rabbitmq.client.ExceptionHandler
handleChannelRecoveryException, handleConnectionRecoveryException, handleTopologyRecoveryException, handleUnexpectedConnectionDriverException
-
-
-
-
Method Detail
-
handleReturnListenerException
public void handleReturnListenerException(Channel channel, Throwable exception)
Description copied from interface:ExceptionHandler
Perform any required exception processing for the situation when the driver thread for the connection has called a ReturnListener's handleReturn method, and that method has thrown an exception.- Specified by:
handleReturnListenerException
in interfaceExceptionHandler
- Overrides:
handleReturnListenerException
in classForgivingExceptionHandler
- Parameters:
channel
- the ChannelN that held the ReturnListenerexception
- the exception thrown by ReturnListener.handleReturn
-
handleFlowListenerException
public void handleFlowListenerException(Channel channel, Throwable exception)
Description copied from interface:ExceptionHandler
Perform any required exception processing for the situation when the driver thread for the connection has called a FlowListener's handleFlow method, and that method has thrown an exception.- Specified by:
handleFlowListenerException
in interfaceExceptionHandler
- Overrides:
handleFlowListenerException
in classForgivingExceptionHandler
- Parameters:
channel
- the ChannelN that held the FlowListenerexception
- the exception thrown by FlowListener.handleFlow
-
handleConfirmListenerException
public void handleConfirmListenerException(Channel channel, Throwable exception)
Description copied from interface:ExceptionHandler
Perform any required exception processing for the situation when the driver thread for the connection has called a ConfirmListener's handleAck or handleNack method, and that method has thrown an exception.- Specified by:
handleConfirmListenerException
in interfaceExceptionHandler
- Overrides:
handleConfirmListenerException
in classForgivingExceptionHandler
- Parameters:
channel
- the ChannelN that held the ConfirmListenerexception
- the exception thrown by ConfirmListener.handleAck
-
handleBlockedListenerException
public void handleBlockedListenerException(Connection connection, Throwable exception)
Description copied from interface:ExceptionHandler
Perform any required exception processing for the situation when the driver thread for the connection has called a BlockedListener's method, and that method has thrown an exception.- Specified by:
handleBlockedListenerException
in interfaceExceptionHandler
- Overrides:
handleBlockedListenerException
in classForgivingExceptionHandler
- Parameters:
connection
- the Connection that held the BlockedListenerexception
- the exception thrown by the BlockedListener
-
handleConsumerException
public void handleConsumerException(Channel channel, Throwable exception, Consumer consumer, String consumerTag, String methodName)
Description copied from interface:ExceptionHandler
Perform any required exception processing for the situation when the driver thread for the connection has called a method on a Consumer, and that method has thrown an exception.- Specified by:
handleConsumerException
in interfaceExceptionHandler
- Overrides:
handleConsumerException
in classForgivingExceptionHandler
- Parameters:
channel
- the ChannelN that held the Consumerexception
- the exception thrown by the Consumerconsumer
- the Consumer that caused the faultconsumerTag
- the Consumer's consumerTagmethodName
- the name of the method on the Consumer that threw the exception
-
handleChannelKiller
protected void handleChannelKiller(Channel channel, Throwable exception, String what)
- Overrides:
handleChannelKiller
in classForgivingExceptionHandler
-
-