Package com.rabbitmq.client.impl
Class ForgivingExceptionHandler
- java.lang.Object
-
- com.rabbitmq.client.impl.ForgivingExceptionHandler
-
- All Implemented Interfaces:
ExceptionHandler
- Direct Known Subclasses:
StrictExceptionHandler
public class ForgivingExceptionHandler extends Object implements ExceptionHandler
An implementation ofExceptionHandlerthat does not close channels on unhandled consumer and listener exception. Used byAMQConnection.
-
-
Constructor Summary
Constructors Constructor Description ForgivingExceptionHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandleBlockedListenerException(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 voidhandleChannelKiller(Channel channel, Throwable exception, String what)voidhandleChannelRecoveryException(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.voidhandleConfirmListenerException(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.protected voidhandleConnectionKiller(Connection connection, Throwable exception, String what)voidhandleConnectionRecoveryException(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.voidhandleConsumerException(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.voidhandleFlowListenerException(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.voidhandleReturnListenerException(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.voidhandleTopologyRecoveryException(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.voidhandleUnexpectedConnectionDriverException(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.protected voidlog(String message, Throwable e)
-
-
-
Method Detail
-
handleUnexpectedConnectionDriverException
public void handleUnexpectedConnectionDriverException(Connection conn, Throwable exception)
Description copied from interface:ExceptionHandlerPerform 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.- Specified by:
handleUnexpectedConnectionDriverExceptionin interfaceExceptionHandler- Parameters:
conn- the Connection that caught the exceptionexception- the exception caught in the driver thread
-
handleReturnListenerException
public void handleReturnListenerException(Channel channel, Throwable exception)
Description copied from interface:ExceptionHandlerPerform 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:
handleReturnListenerExceptionin interfaceExceptionHandler- 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:ExceptionHandlerPerform 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:
handleFlowListenerExceptionin interfaceExceptionHandler- 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:ExceptionHandlerPerform 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:
handleConfirmListenerExceptionin interfaceExceptionHandler- 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:ExceptionHandlerPerform 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:
handleBlockedListenerExceptionin interfaceExceptionHandler- 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:ExceptionHandlerPerform 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:
handleConsumerExceptionin interfaceExceptionHandler- 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
public void handleConnectionRecoveryException(Connection conn, Throwable exception)
Description copied from interface:ExceptionHandlerPerform 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.- Specified by:
handleConnectionRecoveryExceptionin interfaceExceptionHandler- Parameters:
conn- the Connection that caught the exceptionexception- the exception caught in the driver thread- Since:
- 3.3.0
-
handleChannelRecoveryException
public void handleChannelRecoveryException(Channel ch, Throwable exception)
Description copied from interface:ExceptionHandlerPerform 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.- Specified by:
handleChannelRecoveryExceptionin interfaceExceptionHandler- Parameters:
ch- the Channel that caught the exceptionexception- the exception caught in the driver thread- Since:
- 3.3.0
-
handleTopologyRecoveryException
public void handleTopologyRecoveryException(Connection conn, Channel ch, TopologyRecoveryException exception)
Description copied from interface:ExceptionHandlerPerform 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.- Specified by:
handleTopologyRecoveryExceptionin interfaceExceptionHandler- 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- Since:
- 3.3.0
-
handleChannelKiller
protected void handleChannelKiller(Channel channel, Throwable exception, String what)
-
handleConnectionKiller
protected void handleConnectionKiller(Connection connection, Throwable exception, String what)
-
-