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

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

There is a newer version: 0.160
Show newest version
/* Generated SBE (Simple Binary Encoding) message codec. */
package uk.co.real_logic.artio.messages;

@SuppressWarnings("all")
public enum MessageStatus
{

    /**
     * Content is a valid Message, passing Framer validation
     */
    OK((short)0),


    /**
     * Message has an invalid FIX checksum and hasn't been processed
     */
    INVALID_CHECKSUM((short)1),


    /**
     * Message has an invalid FIX body length field and hasn't been processed
     */
    INVALID_BODYLENGTH((short)2),


    /**
     * Message is invalid. This might either be a severely malformed FIX or, in the case of an Acceptor, it might be an arbitrary TCP connection with a possibly unrenderable payload.
     */
    INVALID((short)3),


    /**
     * This message has been sent from the FixEngine to the FixLibrary as a result of a Catchup Replay (ie in response to a fixLibrary.requestSession() call), rather than being sent directly over TCP.
     */
    CATCHUP_REPLAY((short)4),


    /**
     * This is a Logon message that has been rejected by your authentication strategy in the case of an Acceptor.
     */
    AUTH_REJECT((short)5),

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

    private final short value;

    MessageStatus(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 MessageStatus get(final short value)
    {
        switch (value)
        {
            case 0: return OK;
            case 1: return INVALID_CHECKSUM;
            case 2: return INVALID_BODYLENGTH;
            case 3: return INVALID;
            case 4: return CATCHUP_REPLAY;
            case 5: return AUTH_REJECT;
            case 255: return NULL_VAL;
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy