Class ErrorCode


  • public final class ErrorCode
    extends java.lang.Object
    This interface contains the reserved error codes that are used for errors that occur within the messagebus.
    Author:
    Simon Thoresen Hult
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int APP_FATAL_ERROR
      An application specific non-recoverable error.
      static int APP_TRANSIENT_ERROR
      An application specific transient error.
      static int CONNECTION_ERROR
      A connection problem occured while sending.
      static int DECODE_ERROR
      An error occured while decoding the message.
      static int ENCODE_ERROR
      An error occured while encoding the message.
      static int ERROR_LIMIT
      No error codes are allowed to be this big.
      static int FATAL_ERROR
      A general non-recoverable error, resending is not possible.
      static int HANDSHAKE_FAILED
      Version handshake failed for any reason.
      static int ILLEGAL_ROUTE
      The route of the message is illegal.
      static int INCOMPATIBLE_VERSION
      The target is running an incompatible version.
      static int NETWORK_ERROR
      A fatal network error occured while sending.
      static int NETWORK_SHUTDOWN
      The network was shut down when attempting to send.
      static int NO_ADDRESS_FOR_SERVICE
      No addresses found for the services of the message route.
      static int NO_SERVICES_FOR_ROUTE
      No services found for the message route.
      static int NONE
      The code is here for completeness.
      static int POLICY_ERROR
      Exception thrown by routing policy.
      static int SEND_ABORTED
      Sending aborted by route verification.
      static int SEND_QUEUE_CLOSED
      Sending was rejected because throttler is closed.
      static int SEND_QUEUE_FULL
      Sending was rejected because throttler capacity is full.
      static int SEQUENCE_ERROR
      An error occured while sequencing a message.
      static int SESSION_BUSY
      The recipient session is busy.
      static int TIMEOUT
      A timeout occured while sending.
      static int TRANSIENT_ERROR
      A general transient error, resending is possible.
      static int UNKNOWN_POLICY
      The policy specified in a route is unknown.
      static int UNKNOWN_PROTOCOL
      The protocol specified for the message is unknown.
      static int UNKNOWN_SESSION
      The session specified for the message is unknown.
    • Constructor Summary

      Constructors 
      Constructor Description
      ErrorCode()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getName​(int error)
      Translates the given error code into its symbolic name.
      static boolean isFatal​(int code)  
      static boolean isMBusError​(int code)  
      static boolean isTransient​(int code)  
      • Methods inherited from class java.lang.Object

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

      • TRANSIENT_ERROR

        public static final int TRANSIENT_ERROR
        A general transient error, resending is possible.
        See Also:
        Constant Field Values
      • SEND_QUEUE_FULL

        public static final int SEND_QUEUE_FULL
        Sending was rejected because throttler capacity is full.
        See Also:
        Constant Field Values
      • NO_ADDRESS_FOR_SERVICE

        public static final int NO_ADDRESS_FOR_SERVICE
        No addresses found for the services of the message route.
        See Also:
        Constant Field Values
      • CONNECTION_ERROR

        public static final int CONNECTION_ERROR
        A connection problem occured while sending.
        See Also:
        Constant Field Values
      • UNKNOWN_SESSION

        public static final int UNKNOWN_SESSION
        The session specified for the message is unknown.
        See Also:
        Constant Field Values
      • SESSION_BUSY

        public static final int SESSION_BUSY
        The recipient session is busy.
        See Also:
        Constant Field Values
      • SEND_ABORTED

        public static final int SEND_ABORTED
        Sending aborted by route verification.
        See Also:
        Constant Field Values
      • HANDSHAKE_FAILED

        public static final int HANDSHAKE_FAILED
        Version handshake failed for any reason.
        See Also:
        Constant Field Values
      • APP_TRANSIENT_ERROR

        public static final int APP_TRANSIENT_ERROR
        An application specific transient error.
        See Also:
        Constant Field Values
      • FATAL_ERROR

        public static final int FATAL_ERROR
        A general non-recoverable error, resending is not possible.
        See Also:
        Constant Field Values
      • SEND_QUEUE_CLOSED

        public static final int SEND_QUEUE_CLOSED
        Sending was rejected because throttler is closed.
        See Also:
        Constant Field Values
      • ILLEGAL_ROUTE

        public static final int ILLEGAL_ROUTE
        The route of the message is illegal.
        See Also:
        Constant Field Values
      • NO_SERVICES_FOR_ROUTE

        public static final int NO_SERVICES_FOR_ROUTE
        No services found for the message route.
        See Also:
        Constant Field Values
      • ENCODE_ERROR

        public static final int ENCODE_ERROR
        An error occured while encoding the message.
        See Also:
        Constant Field Values
      • NETWORK_ERROR

        public static final int NETWORK_ERROR
        A fatal network error occured while sending.
        See Also:
        Constant Field Values
      • UNKNOWN_PROTOCOL

        public static final int UNKNOWN_PROTOCOL
        The protocol specified for the message is unknown.
        See Also:
        Constant Field Values
      • DECODE_ERROR

        public static final int DECODE_ERROR
        An error occured while decoding the message.
        See Also:
        Constant Field Values
      • TIMEOUT

        public static final int TIMEOUT
        A timeout occured while sending.
        See Also:
        Constant Field Values
      • INCOMPATIBLE_VERSION

        public static final int INCOMPATIBLE_VERSION
        The target is running an incompatible version.
        See Also:
        Constant Field Values
      • UNKNOWN_POLICY

        public static final int UNKNOWN_POLICY
        The policy specified in a route is unknown.
        See Also:
        Constant Field Values
      • NETWORK_SHUTDOWN

        public static final int NETWORK_SHUTDOWN
        The network was shut down when attempting to send.
        See Also:
        Constant Field Values
      • POLICY_ERROR

        public static final int POLICY_ERROR
        Exception thrown by routing policy.
        See Also:
        Constant Field Values
      • SEQUENCE_ERROR

        public static final int SEQUENCE_ERROR
        An error occured while sequencing a message.
        See Also:
        Constant Field Values
      • APP_FATAL_ERROR

        public static final int APP_FATAL_ERROR
        An application specific non-recoverable error.
        See Also:
        Constant Field Values
      • ERROR_LIMIT

        public static final int ERROR_LIMIT
        No error codes are allowed to be this big.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ErrorCode

        public ErrorCode()
    • Method Detail

      • getName

        public static java.lang.String getName​(int error)
        Translates the given error code into its symbolic name.
        Parameters:
        error - The error code to translate.
        Returns:
        The symbolic name.
      • isFatal

        public static boolean isFatal​(int code)
      • isTransient

        public static boolean isTransient​(int code)
      • isMBusError

        public static boolean isMBusError​(int code)