com.rabbitmq.client.impl
Class DefaultExceptionHandler

java.lang.Object
  extended by com.rabbitmq.client.impl.DefaultExceptionHandler
All Implemented Interfaces:
ExceptionHandler

public class DefaultExceptionHandler
extends java.lang.Object
implements ExceptionHandler

Default implementation of ExceptionHandler used by AMQConnection.


Constructor Summary
DefaultExceptionHandler()
           
 
Method Summary
protected  void handleChannelKiller(Channel channel, java.lang.Throwable exception, java.lang.String what)
           
 void handleConfirmListenerException(Channel channel, java.lang.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, java.lang.Throwable exception, Consumer consumer, java.lang.String consumerTag, java.lang.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, java.lang.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 exeption.
 void handleReturnListenerException(Channel channel, java.lang.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 handleUnexpectedConnectionDriverException(Connection conn, java.lang.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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultExceptionHandler

public DefaultExceptionHandler()
Method Detail

handleUnexpectedConnectionDriverException

public void handleUnexpectedConnectionDriverException(Connection conn,
                                                      java.lang.Throwable exception)
Description copied from interface: ExceptionHandler
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.

Specified by:
handleUnexpectedConnectionDriverException in interface ExceptionHandler
Parameters:
conn - the Connection that caught the exception
exception - the exception caught in the driver thread

handleReturnListenerException

public void handleReturnListenerException(Channel channel,
                                          java.lang.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 interface ExceptionHandler
Parameters:
channel - the ChannelN that held the ReturnListener
exception - the exception thrown by ReturnListener.handleReturn

handleFlowListenerException

public void handleFlowListenerException(Channel channel,
                                        java.lang.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 exeption.

Specified by:
handleFlowListenerException in interface ExceptionHandler
Parameters:
channel - the ChannelN that held the FlowListener
exception - the exception thrown by FlowListener.handleFlow

handleConfirmListenerException

public void handleConfirmListenerException(Channel channel,
                                           java.lang.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 interface ExceptionHandler
Parameters:
channel - the ChannelN that held the ConfirmListener
exception - the exception thrown by ConfirmListener.handleAck

handleConsumerException

public void handleConsumerException(Channel channel,
                                    java.lang.Throwable exception,
                                    Consumer consumer,
                                    java.lang.String consumerTag,
                                    java.lang.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 interface ExceptionHandler
Parameters:
channel - the ChannelN that held the Consumer
exception - the exception thrown by the Consumer
consumer - the Consumer that caused the fault
consumerTag - the Consumer's consumerTag
methodName - the name of the method on the Consumer that threw the exception

handleChannelKiller

protected void handleChannelKiller(Channel channel,
                                   java.lang.Throwable exception,
                                   java.lang.String what)