com.rabbitmq.client
Class ShutdownSignalException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.rabbitmq.client.ShutdownSignalException
All Implemented Interfaces:
java.io.Serializable

public class ShutdownSignalException
extends java.lang.Exception

Encapsulates a shutdown condition for a connection to an AMQP broker.

See Also:
Serialized Form

Constructor Summary
ShutdownSignalException(boolean hardError, boolean initiatedByApplication, java.lang.Object reason)
          Construct a ShutdownSignalException from the arguments.
 
Method Summary
 java.lang.Object getReason()
           
 boolean isHardError()
           
 boolean isInitiatedByApplication()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ShutdownSignalException

public ShutdownSignalException(boolean hardError,
                               boolean initiatedByApplication,
                               java.lang.Object reason)
Construct a ShutdownSignalException from the arguments.

Parameters:
hardError - the relevant hard error
initiatedByApplication - if the shutdown was client-initiated
reason - Object describing the origin of the exception
Method Detail

isHardError

public boolean isHardError()
Returns:
true if this signals a connection error, or false if a channel error

isInitiatedByApplication

public boolean isInitiatedByApplication()
Returns:
true if this exception was caused by explicit application action; false if it originated with the broker or as a result of detectable non-deliberate application failure

getReason

public java.lang.Object getReason()
Returns:
the reason object, if any

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Throwable