Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/* Generated SBE (Simple Binary Encoding) message codec. */
package b3.entrypoint.fixp.sbe;
import org.agrona.DirectBuffer;
import org.agrona.sbe.*;
/**
* The SecurityDefinitioresponse message is sent in response to an attempt to create a new security definition.
*/
@SuppressWarnings("all")
public final class SecurityDefinitionResponseDecoder implements MessageDecoderFlyweight
{
public static final int BLOCK_LENGTH = 54;
public static final int TEMPLATE_ID = 301;
public static final int SCHEMA_ID = 1;
public static final int SCHEMA_VERSION = 5;
public static final java.nio.ByteOrder BYTE_ORDER = java.nio.ByteOrder.LITTLE_ENDIAN;
private final SecurityDefinitionResponseDecoder parentMessage = this;
private DirectBuffer buffer;
private int initialOffset;
private int offset;
private int limit;
int actingBlockLength;
int actingVersion;
public int sbeBlockLength()
{
return BLOCK_LENGTH;
}
public int sbeTemplateId()
{
return TEMPLATE_ID;
}
public int sbeSchemaId()
{
return SCHEMA_ID;
}
public int sbeSchemaVersion()
{
return SCHEMA_VERSION;
}
public String sbeSemanticType()
{
return "";
}
public DirectBuffer buffer()
{
return buffer;
}
public int initialOffset()
{
return initialOffset;
}
public int offset()
{
return offset;
}
public SecurityDefinitionResponseDecoder wrap(
final DirectBuffer buffer,
final int offset,
final int actingBlockLength,
final int actingVersion)
{
if (buffer != this.buffer)
{
this.buffer = buffer;
}
this.initialOffset = offset;
this.offset = offset;
this.actingBlockLength = actingBlockLength;
this.actingVersion = actingVersion;
limit(offset + actingBlockLength);
return this;
}
public SecurityDefinitionResponseDecoder wrapAndApplyHeader(
final DirectBuffer buffer,
final int offset,
final MessageHeaderDecoder headerDecoder)
{
headerDecoder.wrap(buffer, offset);
final int templateId = headerDecoder.templateId();
if (TEMPLATE_ID != templateId)
{
throw new IllegalStateException("Invalid TEMPLATE_ID: " + templateId);
}
return wrap(
buffer,
offset + MessageHeaderDecoder.ENCODED_LENGTH,
headerDecoder.blockLength(),
headerDecoder.version());
}
public SecurityDefinitionResponseDecoder sbeRewind()
{
return wrap(buffer, initialOffset, actingBlockLength, actingVersion);
}
public int sbeDecodedLength()
{
final int currentLimit = limit();
sbeSkip();
final int decodedLength = encodedLength();
limit(currentLimit);
return decodedLength;
}
public int encodedLength()
{
return limit - offset;
}
public int limit()
{
return limit;
}
public void limit(final int limit)
{
this.limit = limit;
}
public static int messageTypeId()
{
return 35;
}
public static int messageTypeSinceVersion()
{
return 0;
}
public static int messageTypeEncodingOffset()
{
return 0;
}
public static int messageTypeEncodingLength()
{
return 1;
}
public static String messageTypeMetaAttribute(final MetaAttribute metaAttribute)
{
if (MetaAttribute.PRESENCE == metaAttribute)
{
return "constant";
}
return "";
}
public short messageTypeRaw()
{
return MessageType.SecurityDefinitionResponse.value();
}
public MessageType messageType()
{
return MessageType.SecurityDefinitionResponse;
}
public static int securityReqIDId()
{
return 320;
}
public static int securityReqIDSinceVersion()
{
return 0;
}
public static int securityReqIDEncodingOffset()
{
return 0;
}
public static int securityReqIDEncodingLength()
{
return 8;
}
public static String securityReqIDMetaAttribute(final MetaAttribute metaAttribute)
{
if (MetaAttribute.PRESENCE == metaAttribute)
{
return "required";
}
return "";
}
public static long securityReqIDNullValue()
{
return 0xffffffffffffffffL;
}
public static long securityReqIDMinValue()
{
return 0x0L;
}
public static long securityReqIDMaxValue()
{
return 0xfffffffffffffffeL;
}
public long securityReqID()
{
return buffer.getLong(offset + 0, java.nio.ByteOrder.LITTLE_ENDIAN);
}
public static int securityResponseIDId()
{
return 322;
}
public static int securityResponseIDSinceVersion()
{
return 0;
}
public static int securityResponseIDEncodingOffset()
{
return 8;
}
public static int securityResponseIDEncodingLength()
{
return 8;
}
public static String securityResponseIDMetaAttribute(final MetaAttribute metaAttribute)
{
if (MetaAttribute.PRESENCE == metaAttribute)
{
return "required";
}
return "";
}
public static long securityResponseIDNullValue()
{
return 0xffffffffffffffffL;
}
public static long securityResponseIDMinValue()
{
return 0x0L;
}
public static long securityResponseIDMaxValue()
{
return 0xfffffffffffffffeL;
}
public long securityResponseID()
{
return buffer.getLong(offset + 8, java.nio.ByteOrder.LITTLE_ENDIAN);
}
public static int securityResponseTypeId()
{
return 323;
}
public static int securityResponseTypeSinceVersion()
{
return 0;
}
public static int securityResponseTypeEncodingOffset()
{
return 16;
}
public static int securityResponseTypeEncodingLength()
{
return 1;
}
public static String securityResponseTypeMetaAttribute(final MetaAttribute metaAttribute)
{
if (MetaAttribute.PRESENCE == metaAttribute)
{
return "required";
}
return "";
}
public short securityResponseTypeRaw()
{
return ((short)(buffer.getByte(offset + 16) & 0xFF));
}
public SecurityResponseType securityResponseType()
{
return SecurityResponseType.get(((short)(buffer.getByte(offset + 16) & 0xFF)));
}
public static int enteringTraderId()
{
return 35502;
}
public static int enteringTraderSinceVersion()
{
return 0;
}
public static int enteringTraderEncodingOffset()
{
return 17;
}
public static int enteringTraderEncodingLength()
{
return 5;
}
public static String enteringTraderMetaAttribute(final MetaAttribute metaAttribute)
{
if (MetaAttribute.PRESENCE == metaAttribute)
{
return "required";
}
return "";
}
public static byte enteringTraderNullValue()
{
return (byte)0;
}
public static byte enteringTraderMinValue()
{
return (byte)32;
}
public static byte enteringTraderMaxValue()
{
return (byte)126;
}
public static int enteringTraderLength()
{
return 5;
}
public byte enteringTrader(final int index)
{
if (index < 0 || index >= 5)
{
throw new IndexOutOfBoundsException("index out of range: index=" + index);
}
final int pos = offset + 17 + (index * 1);
return buffer.getByte(pos);
}
public static String enteringTraderCharacterEncoding()
{
return java.nio.charset.StandardCharsets.US_ASCII.name();
}
public int getEnteringTrader(final byte[] dst, final int dstOffset)
{
final int length = 5;
if (dstOffset < 0 || dstOffset > (dst.length - length))
{
throw new IndexOutOfBoundsException("Copy will go out of range: offset=" + dstOffset);
}
buffer.getBytes(offset + 17, dst, dstOffset, length);
return length;
}
public String enteringTrader()
{
final byte[] dst = new byte[5];
buffer.getBytes(offset + 17, dst, 0, 5);
int end = 0;
for (; end < 5 && dst[end] != 0; ++end);
return new String(dst, 0, end, java.nio.charset.StandardCharsets.US_ASCII);
}
public int getEnteringTrader(final Appendable value)
{
for (int i = 0; i < 5; ++i)
{
final int c = buffer.getByte(offset + 17 + i) & 0xFF;
if (c == 0)
{
return i;
}
try
{
value.append(c > 127 ? '?' : (char)c);
}
catch (final java.io.IOException ex)
{
throw new java.io.UncheckedIOException(ex);
}
}
return 5;
}
public static int securityIDId()
{
return 48;
}
public static int securityIDSinceVersion()
{
return 0;
}
public static int securityIDEncodingOffset()
{
return 22;
}
public static int securityIDEncodingLength()
{
return 8;
}
public static String securityIDMetaAttribute(final MetaAttribute metaAttribute)
{
if (MetaAttribute.PRESENCE == metaAttribute)
{
return "required";
}
return "";
}
public static long securityIDNullValue()
{
return 0xffffffffffffffffL;
}
public static long securityIDMinValue()
{
return 0x0L;
}
public static long securityIDMaxValue()
{
return 0xfffffffffffffffeL;
}
public long securityID()
{
return buffer.getLong(offset + 22, java.nio.ByteOrder.LITTLE_ENDIAN);
}
public static int securityIDSourceId()
{
return 22;
}
public static int securityIDSourceSinceVersion()
{
return 0;
}
public static int securityIDSourceEncodingOffset()
{
return 30;
}
public static int securityIDSourceEncodingLength()
{
return 0;
}
public static String securityIDSourceMetaAttribute(final MetaAttribute metaAttribute)
{
if (MetaAttribute.PRESENCE == metaAttribute)
{
return "constant";
}
return "";
}
public static byte securityIDSourceNullValue()
{
return (byte)0;
}
public static byte securityIDSourceMinValue()
{
return (byte)32;
}
public static byte securityIDSourceMaxValue()
{
return (byte)126;
}
private static final byte[] SECURITYIDSOURCE_VALUE = { 56 };
public static int securityIDSourceLength()
{
return 1;
}
public byte securityIDSource(final int index)
{
return SECURITYIDSOURCE_VALUE[index];
}
public int getSecurityIDSource(final byte[] dst, final int offset, final int length)
{
final int bytesCopied = Math.min(length, 1);
System.arraycopy(SECURITYIDSOURCE_VALUE, 0, dst, offset, bytesCopied);
return bytesCopied;
}
public byte securityIDSource()
{
return (byte)56;
}
public static int securityExchangeId()
{
return 207;
}
public static int securityExchangeSinceVersion()
{
return 0;
}
public static int securityExchangeEncodingOffset()
{
return 30;
}
public static int securityExchangeEncodingLength()
{
return 0;
}
public static String securityExchangeMetaAttribute(final MetaAttribute metaAttribute)
{
if (MetaAttribute.PRESENCE == metaAttribute)
{
return "constant";
}
return "";
}
public static byte securityExchangeNullValue()
{
return (byte)0;
}
public static byte securityExchangeMinValue()
{
return (byte)32;
}
public static byte securityExchangeMaxValue()
{
return (byte)126;
}
private static final byte[] SECURITYEXCHANGE_VALUE = { 66, 86, 77, 70 };
public static int securityExchangeLength()
{
return 4;
}
public byte securityExchange(final int index)
{
return SECURITYEXCHANGE_VALUE[index];
}
public int getSecurityExchange(final byte[] dst, final int offset, final int length)
{
final int bytesCopied = Math.min(length, 4);
System.arraycopy(SECURITYEXCHANGE_VALUE, 0, dst, offset, bytesCopied);
return bytesCopied;
}
public String securityExchange()
{
return "BVMF";
}
public static int symbolId()
{
return 55;
}
public static int symbolSinceVersion()
{
return 0;
}
public static int symbolEncodingOffset()
{
return 30;
}
public static int symbolEncodingLength()
{
return 20;
}
public static String symbolMetaAttribute(final MetaAttribute metaAttribute)
{
if (MetaAttribute.PRESENCE == metaAttribute)
{
return "required";
}
return "";
}
public static byte symbolNullValue()
{
return (byte)0;
}
public static byte symbolMinValue()
{
return (byte)32;
}
public static byte symbolMaxValue()
{
return (byte)126;
}
public static int symbolLength()
{
return 20;
}
public byte symbol(final int index)
{
if (index < 0 || index >= 20)
{
throw new IndexOutOfBoundsException("index out of range: index=" + index);
}
final int pos = offset + 30 + (index * 1);
return buffer.getByte(pos);
}
public static String symbolCharacterEncoding()
{
return java.nio.charset.StandardCharsets.US_ASCII.name();
}
public int getSymbol(final byte[] dst, final int dstOffset)
{
final int length = 20;
if (dstOffset < 0 || dstOffset > (dst.length - length))
{
throw new IndexOutOfBoundsException("Copy will go out of range: offset=" + dstOffset);
}
buffer.getBytes(offset + 30, dst, dstOffset, length);
return length;
}
public String symbol()
{
final byte[] dst = new byte[20];
buffer.getBytes(offset + 30, dst, 0, 20);
int end = 0;
for (; end < 20 && dst[end] != 0; ++end);
return new String(dst, 0, end, java.nio.charset.StandardCharsets.US_ASCII);
}
public int getSymbol(final Appendable value)
{
for (int i = 0; i < 20; ++i)
{
final int c = buffer.getByte(offset + 30 + i) & 0xFF;
if (c == 0)
{
return i;
}
try
{
value.append(c > 127 ? '?' : (char)c);
}
catch (final java.io.IOException ex)
{
throw new java.io.UncheckedIOException(ex);
}
}
return 20;
}
public static int securityStrategyTypeId()
{
return 7534;
}
public static int securityStrategyTypeSinceVersion()
{
return 0;
}
public static int securityStrategyTypeEncodingOffset()
{
return 50;
}
public static int securityStrategyTypeEncodingLength()
{
return 3;
}
public static String securityStrategyTypeMetaAttribute(final MetaAttribute metaAttribute)
{
if (MetaAttribute.PRESENCE == metaAttribute)
{
return "optional";
}
return "";
}
public static byte securityStrategyTypeNullValue()
{
return (byte)0;
}
public static byte securityStrategyTypeMinValue()
{
return (byte)32;
}
public static byte securityStrategyTypeMaxValue()
{
return (byte)126;
}
public static int securityStrategyTypeLength()
{
return 3;
}
public byte securityStrategyType(final int index)
{
if (index < 0 || index >= 3)
{
throw new IndexOutOfBoundsException("index out of range: index=" + index);
}
final int pos = offset + 50 + (index * 1);
return buffer.getByte(pos);
}
public static String securityStrategyTypeCharacterEncoding()
{
return java.nio.charset.StandardCharsets.US_ASCII.name();
}
public int getSecurityStrategyType(final byte[] dst, final int dstOffset)
{
final int length = 3;
if (dstOffset < 0 || dstOffset > (dst.length - length))
{
throw new IndexOutOfBoundsException("Copy will go out of range: offset=" + dstOffset);
}
buffer.getBytes(offset + 50, dst, dstOffset, length);
return length;
}
public String securityStrategyType()
{
final byte[] dst = new byte[3];
buffer.getBytes(offset + 50, dst, 0, 3);
int end = 0;
for (; end < 3 && dst[end] != 0; ++end);
return new String(dst, 0, end, java.nio.charset.StandardCharsets.US_ASCII);
}
public int getSecurityStrategyType(final Appendable value)
{
for (int i = 0; i < 3; ++i)
{
final int c = buffer.getByte(offset + 50 + i) & 0xFF;
if (c == 0)
{
return i;
}
try
{
value.append(c > 127 ? '?' : (char)c);
}
catch (final java.io.IOException ex)
{
throw new java.io.UncheckedIOException(ex);
}
}
return 3;
}
public static int possResendId()
{
return 97;
}
public static int possResendSinceVersion()
{
return 0;
}
public static int possResendEncodingOffset()
{
return 53;
}
public static int possResendEncodingLength()
{
return 1;
}
public static String possResendMetaAttribute(final MetaAttribute metaAttribute)
{
if (MetaAttribute.PRESENCE == metaAttribute)
{
return "required";
}
return "";
}
public short possResendRaw()
{
return ((short)(buffer.getByte(offset + 53) & 0xFF));
}
public Boolean possResend()
{
return Boolean.get(((short)(buffer.getByte(offset + 53) & 0xFF)));
}
public String toString()
{
if (null == buffer)
{
return "";
}
final SecurityDefinitionResponseDecoder decoder = new SecurityDefinitionResponseDecoder();
decoder.wrap(buffer, initialOffset, actingBlockLength, actingVersion);
return decoder.appendTo(new StringBuilder()).toString();
}
public StringBuilder appendTo(final StringBuilder builder)
{
if (null == buffer)
{
return builder;
}
final int originalLimit = limit();
limit(initialOffset + actingBlockLength);
builder.append("[SecurityDefinitionResponse](sbeTemplateId=");
builder.append(TEMPLATE_ID);
builder.append("|sbeSchemaId=");
builder.append(SCHEMA_ID);
builder.append("|sbeSchemaVersion=");
if (parentMessage.actingVersion != SCHEMA_VERSION)
{
builder.append(parentMessage.actingVersion);
builder.append('/');
}
builder.append(SCHEMA_VERSION);
builder.append("|sbeBlockLength=");
if (actingBlockLength != BLOCK_LENGTH)
{
builder.append(actingBlockLength);
builder.append('/');
}
builder.append(BLOCK_LENGTH);
builder.append("):");
builder.append("messageType=");
builder.append(this.messageType());
builder.append('|');
builder.append("securityReqID=");
builder.append(this.securityReqID());
builder.append('|');
builder.append("securityResponseID=");
builder.append(this.securityResponseID());
builder.append('|');
builder.append("securityResponseType=");
builder.append(this.securityResponseType());
builder.append('|');
builder.append("enteringTrader=");
for (int i = 0; i < enteringTraderLength() && this.enteringTrader(i) > 0; i++)
{
builder.append((char)this.enteringTrader(i));
}
builder.append('|');
builder.append("securityID=");
builder.append(this.securityID());
builder.append('|');
builder.append("symbol=");
for (int i = 0; i < symbolLength() && this.symbol(i) > 0; i++)
{
builder.append((char)this.symbol(i));
}
builder.append('|');
builder.append("securityStrategyType=");
for (int i = 0; i < securityStrategyTypeLength() && this.securityStrategyType(i) > 0; i++)
{
builder.append((char)this.securityStrategyType(i));
}
builder.append('|');
builder.append("possResend=");
builder.append(this.possResend());
limit(originalLimit);
return builder;
}
public SecurityDefinitionResponseDecoder sbeSkip()
{
sbeRewind();
return this;
}
}