Class ErrorCode


  • public final class ErrorCode
    extends Object
    This interface contains the reserved error codes that are used for errors that occur within the messagebus.
    Author:
    Simon Thoresen Hult
    • 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 occurred while decoding the message.
        See Also:
        Constant Field Values
      • TIMEOUT

        public static final int TIMEOUT
        A timeout occurred 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 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)