b3.entrypoint.fixp.sbe.TerminationCode Maven / Gradle / Ivy
/* Generated SBE (Simple Binary Encoding) message codec. */
package b3.entrypoint.fixp.sbe;
/**
* Identifies the code of termination.
*/
@SuppressWarnings("all")
public enum TerminationCode
{
UNSPECIFIED((short)0),
FINISHED((short)1),
UNNEGOTIATED((short)2),
NOT_ESTABLISHED((short)3),
SESSION_BLOCKED((short)4),
NEGOTIATION_IN_PROGRESS((short)5),
ESTABLISH_IN_PROGRESS((short)7),
KEEPALIVE_INTERVAL_LAPSED((short)10),
TERMINATE_NOT_ALLOWED((short)20),
TERMINATE_IN_PROGRESS((short)24),
BACKUP_TAKEOVER_IN_PROGRESS((short)27),
/**
* To be used to represent not present or null.
*/
NULL_VAL((short)255);
private final short value;
TerminationCode(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 TerminationCode get(final short value)
{
switch (value)
{
case 0: return UNSPECIFIED;
case 1: return FINISHED;
case 2: return UNNEGOTIATED;
case 3: return NOT_ESTABLISHED;
case 4: return SESSION_BLOCKED;
case 5: return NEGOTIATION_IN_PROGRESS;
case 7: return ESTABLISH_IN_PROGRESS;
case 10: return KEEPALIVE_INTERVAL_LAPSED;
case 20: return TERMINATE_NOT_ALLOWED;
case 24: return TERMINATE_IN_PROGRESS;
case 27: return BACKUP_TAKEOVER_IN_PROGRESS;
case 255: return NULL_VAL;
}
throw new IllegalArgumentException("Unknown value: " + value);
}
}