Package com.rabbitmq.client
Interface ExceptionHandler
-
- All Known Implementing Classes:
DefaultExceptionHandler
,ForgivingExceptionHandler
,StrictExceptionHandler
public interface ExceptionHandler
Interface to an exception-handling object.
-
-
Method Summary
All Methods Instance Methods Abstract 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.void
handleChannelRecoveryException(Channel ch, Throwable exception)
Perform any required exception processing for the situation when the driver thread for the connection has an exception during channel recovery that it can't otherwise deal with.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
handleConnectionRecoveryException(Connection conn, Throwable exception)
Perform any required exception processing for the situation when the driver thread for the connection has an exception during connection recovery that it can't otherwise deal with.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.void
handleTopologyRecoveryException(Connection conn, Channel ch, TopologyRecoveryException exception)
Perform any required exception processing for the situation when the driver thread for the connection has an exception during topology (exchanges, queues, bindings, consumers) recovery that it can't otherwise deal with.void
handleUnexpectedConnectionDriverException(Connection conn, Throwable exception)
Perform any required exception processing for the situation when the driver thread for the connection has an exception signalled to it that it can't otherwise deal with.
-
-
-
Method Detail
-
handleUnexpectedConnectionDriverException
void handleUnexpectedConnectionDriverException(Connection conn, Throwable exception)
Perform any required exception processing for the situation when the driver thread for the connection has an exception signalled to it that it can't otherwise deal with.- Parameters:
conn
- the Connection that caught the exceptionexception
- the exception caught in the driver thread
-
handleReturnListenerException
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.- Parameters:
channel
- the ChannelN that held the ReturnListenerexception
- the exception thrown by ReturnListener.handleReturn
-
handleFlowListenerException
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.- Parameters:
channel
- the ChannelN that held the FlowListenerexception
- the exception thrown by FlowListener.handleFlow
-
handleConfirmListenerException
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.- Parameters:
channel
- the ChannelN that held the ConfirmListenerexception
- the exception thrown by ConfirmListener.handleAck
-
handleBlockedListenerException
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.- Parameters:
connection
- the Connection that held the BlockedListenerexception
- the exception thrown by the BlockedListener
-
handleConsumerException
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.- 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
-
handleConnectionRecoveryException
void handleConnectionRecoveryException(Connection conn, Throwable exception)
Perform any required exception processing for the situation when the driver thread for the connection has an exception during connection recovery that it can't otherwise deal with.- Parameters:
conn
- the Connection that caught the exceptionexception
- the exception caught in the driver thread
-
handleChannelRecoveryException
void handleChannelRecoveryException(Channel ch, Throwable exception)
Perform any required exception processing for the situation when the driver thread for the connection has an exception during channel recovery that it can't otherwise deal with.- Parameters:
ch
- the Channel that caught the exceptionexception
- the exception caught in the driver thread
-
handleTopologyRecoveryException
void handleTopologyRecoveryException(Connection conn, Channel ch, TopologyRecoveryException exception)
Perform any required exception processing for the situation when the driver thread for the connection has an exception during topology (exchanges, queues, bindings, consumers) recovery that it can't otherwise deal with.- Parameters:
conn
- the Connection that caught the exceptionch
- the Channel that caught the exception. May be null.exception
- the exception caught in the driver thread
-
-