All Downloads are FREE. Search and download functionalities are using the official Maven repository.

uk.co.real_logic.artio.messages.DisconnectReason Maven / Gradle / Ivy

/* Generated SBE (Simple Binary Encoding) message codec. */
package uk.co.real_logic.artio.messages;

@SuppressWarnings("all")
public enum DisconnectReason
{

    /**
     * The TCP connection was disconnected remotely
     */
    REMOTE_DISCONNECT((short)0),


    /**
     * We disconnected due an application level request
     */
    APPLICATION_DISCONNECT((short)1),


    /**
     * We disconnected due to its library disconnecting
     */
    LIBRARY_DISCONNECT((short)2),


    /**
     * We disconnected the connection due to the engine shutting down
     */
    ENGINE_SHUTDOWN((short)3),


    /**
     * We disconnected due to the engine receiving an IOException
     */
    EXCEPTION((short)4),


    /**
     * We disconnected due to the consumer being too slow at reading the connection
     */
    SLOW_CONSUMER((short)5),


    /**
     * We disconnected due to no logon message being sent after a timeout
     */
    NO_LOGON((short)6),


    /**
     * We disconnected due the session id being the same as one already connected
     */
    DUPLICATE_SESSION((short)7),


    /**
     * We disconnected due a message having an invalid body length field
     */
    INVALID_BODY_LENGTH((short)8),


    /**
     * We disconnected due to receiving a logout message
     */
    LOGOUT((short)9),


    /**
     * We disconnected due to the first message that we received not being a logon
     */
    FIRST_MESSAGE_NOT_LOGON((short)10),


    /**
     * We disconnected due begin string field was invalid
     */
    INCORRECT_BEGIN_STRING((short)11),


    /**
     * We disconnected due to the message sequence number being too low
     */
    MSG_SEQ_NO_TOO_LOW((short)12),


    /**
     * We disconnected due to the message sequence number field being missing
     */
    MSG_SEQ_NO_MISSING((short)13),


    /**
     * We disconnected due an invalid sending time field in the fix message
     */
    INVALID_SENDING_TIME((short)14),


    /**
     * We disconnected due to a negative heartbeat interval field
     */
    NEGATIVE_HEARTBEAT_INTERVAL((short)15),


    /**
     * We disconnected due to the authentication strategy returning false
     */
    FAILED_AUTHENTICATION((short)16),


    /**
     * We disconnected due to codec validation failing
     */
    INVALID_FIX_MESSAGE((short)17),


    /**
     * Persistence Strategy specified INDEXED but EngineConfiguration has disabled required logging of messages
     */
    INVALID_CONFIGURATION_NOT_LOGGING_MESSAGES((short)18),


    /**
     * We disconnected due to the authentication strategy not responding within the timeout
     */
    AUTHENTICATION_TIMEOUT((short)19),


    /**
     * We disconnected due to an error in framing FIXP messages
     */
    INVALID_FIXP_MESSAGE((short)20),


    /**
     * Disconnected due to an explicit administrative API operation from a user
     */
    ADMIN_API_DISCONNECT((short)21),


    /**
     * Disconnected due to a sender or target comp id field missing from the Logon message
     */
    MISSING_LOGON_COMP_ID((short)22),


    /**
     * Disconnected due to an exception being thrown by a callback from application code. Exception will be passed to the application's ErrorHandler unless it is in response to an initiate() call in which case it will be given to the reply.
     */
    CALLBACK_EXCEPTION((short)23),


    /**
     * We disconnected because an inbound message timeout whilst a replay was going on
     */
    REPLAY_BACK_PRESSURE_DISCONNECT((short)24),


    /**
     * Regular Fix heartbeat timeout
     */
    FIX_HEARTBEAT_TIMEOUT((short)25),

    /**
     * To be used to represent not present or null.
     */
    NULL_VAL((short)255);

    private final short value;

    DisconnectReason(final short value)
    {
        this.value = value;
    }

    /**
     * The raw encoded value in the Java type representation.
     *
     * @return the raw value encoded.
     */
    public short value()
    {
        return value;
    }

    /**
     * Lookup the enum value representing the value.
     *
     * @param value encoded to be looked up.
     * @return the enum value representing the value.
     */
    public static DisconnectReason get(final short value)
    {
        switch (value)
        {
            case 0: return REMOTE_DISCONNECT;
            case 1: return APPLICATION_DISCONNECT;
            case 2: return LIBRARY_DISCONNECT;
            case 3: return ENGINE_SHUTDOWN;
            case 4: return EXCEPTION;
            case 5: return SLOW_CONSUMER;
            case 6: return NO_LOGON;
            case 7: return DUPLICATE_SESSION;
            case 8: return INVALID_BODY_LENGTH;
            case 9: return LOGOUT;
            case 10: return FIRST_MESSAGE_NOT_LOGON;
            case 11: return INCORRECT_BEGIN_STRING;
            case 12: return MSG_SEQ_NO_TOO_LOW;
            case 13: return MSG_SEQ_NO_MISSING;
            case 14: return INVALID_SENDING_TIME;
            case 15: return NEGATIVE_HEARTBEAT_INTERVAL;
            case 16: return FAILED_AUTHENTICATION;
            case 17: return INVALID_FIX_MESSAGE;
            case 18: return INVALID_CONFIGURATION_NOT_LOGGING_MESSAGES;
            case 19: return AUTHENTICATION_TIMEOUT;
            case 20: return INVALID_FIXP_MESSAGE;
            case 21: return ADMIN_API_DISCONNECT;
            case 22: return MISSING_LOGON_COMP_ID;
            case 23: return CALLBACK_EXCEPTION;
            case 24: return REPLAY_BACK_PRESSURE_DISCONNECT;
            case 25: return FIX_HEARTBEAT_TIMEOUT;
            case 255: return NULL_VAL;
        }

        throw new IllegalArgumentException("Unknown value: " + value);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy