Class ShutdownSignalException

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean _hardError
      True if the connection is shut down, or false if this signal refers to a channel
      private boolean _initiatedByApplication
      True if this exception is caused by explicit application action; false if it originated with the broker or as a result of detectable non-deliberate application failure
      private Method _reason
      Possible explanation
      private java.lang.Object _ref
      Either Channel or Connection instance, depending on _hardError
      private static long serialVersionUID
      Default for non-checking.
    • Constructor Summary

      Constructors 
      Constructor Description
      ShutdownSignalException​(boolean hardError, boolean initiatedByApplication, Method reason, java.lang.Object ref)
      Construct a ShutdownSignalException from the arguments.
      ShutdownSignalException​(boolean hardError, boolean initiatedByApplication, Method reason, java.lang.Object ref, java.lang.String messagePrefix, java.lang.Throwable cause)
      Construct a ShutdownSignalException from the arguments.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private static java.lang.String composeMessage​(boolean hardError, boolean initiatedByApplication, Method reason, java.lang.String messagePrefix, java.lang.Throwable cause)  
      Method getReason()  
      java.lang.Object getReference()  
      boolean isHardError()  
      boolean isInitiatedByApplication()  
      ShutdownSignalException sensibleClone()
      Like Object.clone but sensible; in particular, public and declared to return the right type.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        Default for non-checking.
        See Also:
        Constant Field Values
      • _hardError

        private final boolean _hardError
        True if the connection is shut down, or false if this signal refers to a channel
      • _initiatedByApplication

        private final boolean _initiatedByApplication
        True if this exception is caused by explicit application action; false if it originated with the broker or as a result of detectable non-deliberate application failure
      • _reason

        private final Method _reason
        Possible explanation
      • _ref

        private final java.lang.Object _ref
        Either Channel or Connection instance, depending on _hardError
    • Constructor Detail

      • ShutdownSignalException

        public ShutdownSignalException​(boolean hardError,
                                       boolean initiatedByApplication,
                                       Method reason,
                                       java.lang.Object ref)
        Construct a ShutdownSignalException from the arguments.
        Parameters:
        hardError - the relevant hard error
        initiatedByApplication - if the shutdown was client-initiated
        reason - AMQP method describing the exception reason
        ref - Reference to Connection or Channel that fired the signal
      • ShutdownSignalException

        public ShutdownSignalException​(boolean hardError,
                                       boolean initiatedByApplication,
                                       Method reason,
                                       java.lang.Object ref,
                                       java.lang.String messagePrefix,
                                       java.lang.Throwable cause)
        Construct a ShutdownSignalException from the arguments.
        Parameters:
        hardError - the relevant hard error
        initiatedByApplication - if the shutdown was client-initiated
        reason - AMQP method describing the exception reason
        ref - Reference to Connection or Channel that fired the signal
        messagePrefix - prefix to add to exception message
    • Method Detail

      • composeMessage

        private static java.lang.String composeMessage​(boolean hardError,
                                                       boolean initiatedByApplication,
                                                       Method reason,
                                                       java.lang.String messagePrefix,
                                                       java.lang.Throwable cause)
      • 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 Method getReason()
        Returns:
        the reason, if any
      • getReference

        public java.lang.Object getReference()
        Returns:
        Reference to Connection or Channel object that fired the signal