uk.co.real_logic.artio.messages.GatewayError Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of artio-codecs Show documentation
Show all versions of artio-codecs Show documentation
High-Performance FIX Gateway
/* Generated SBE (Simple Binary Encoding) message codec. */
package uk.co.real_logic.artio.messages;
@SuppressWarnings("all")
public enum GatewayError
{
EXCEPTION(0),
DUPLICATE_SESSION(1),
UNABLE_TO_CONNECT(2),
UNKNOWN_LIBRARY(3),
DUPLICATE_LIBRARY_ID(4),
DUPLICATE_ACCEPTOR(5),
UNKNOWN_SESSION(6),
UNABLE_TO_LOGON(7),
INVALID_CONFIGURATION(8),
/**
* To be used to represent not present or null.
*/
NULL_VAL(65535);
private final int value;
GatewayError(final int value)
{
this.value = value;
}
/**
* The raw encoded value in the Java type representation.
*
* @return the raw value encoded.
*/
public int 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 GatewayError get(final int value)
{
switch (value)
{
case 0: return EXCEPTION;
case 1: return DUPLICATE_SESSION;
case 2: return UNABLE_TO_CONNECT;
case 3: return UNKNOWN_LIBRARY;
case 4: return DUPLICATE_LIBRARY_ID;
case 5: return DUPLICATE_ACCEPTOR;
case 6: return UNKNOWN_SESSION;
case 7: return UNABLE_TO_LOGON;
case 8: return INVALID_CONFIGURATION;
case 65535: return NULL_VAL;
}
throw new IllegalArgumentException("Unknown value: " + value);
}
}