uk.co.real_logic.artio.messages.AllFixSessionsReplyDecoder 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;
import org.agrona.MutableDirectBuffer;
import org.agrona.DirectBuffer;
@SuppressWarnings("all")
public final class AllFixSessionsReplyDecoder
{
public static final int BLOCK_LENGTH = 8;
public static final int TEMPLATE_ID = 63;
public static final int SCHEMA_ID = 666;
public static final int SCHEMA_VERSION = 25;
public static final String SEMANTIC_VERSION = "0.2";
public static final java.nio.ByteOrder BYTE_ORDER = java.nio.ByteOrder.LITTLE_ENDIAN;
private final AllFixSessionsReplyDecoder parentMessage = this;
private DirectBuffer buffer;
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 offset()
{
return offset;
}
public AllFixSessionsReplyDecoder wrap(
final DirectBuffer buffer,
final int offset,
final int actingBlockLength,
final int actingVersion)
{
if (buffer != this.buffer)
{
this.buffer = buffer;
}
this.offset = offset;
this.actingBlockLength = actingBlockLength;
this.actingVersion = actingVersion;
limit(offset + actingBlockLength);
return this;
}
public AllFixSessionsReplyDecoder 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 AllFixSessionsReplyDecoder sbeRewind()
{
return wrap(buffer, offset, actingBlockLength, actingVersion);
}
public int sbeDecodedLength()
{
final int currentLimit = limit();
sbeSkip();
final int decodedLength = encodedLength();
limit(currentLimit);
return decodedLength;
}
public int actingVersion()
{
return actingVersion;
}
public int encodedLength()
{
return limit - offset;
}
public int limit()
{
return limit;
}
public void limit(final int limit)
{
this.limit = limit;
}
public static int correlationIdId()
{
return 0;
}
public static int correlationIdSinceVersion()
{
return 0;
}
public static int correlationIdEncodingOffset()
{
return 0;
}
public static int correlationIdEncodingLength()
{
return 8;
}
public static String correlationIdMetaAttribute(final MetaAttribute metaAttribute)
{
if (MetaAttribute.PRESENCE == metaAttribute)
{
return "required";
}
return "";
}
public static long correlationIdNullValue()
{
return -9223372036854775808L;
}
public static long correlationIdMinValue()
{
return -9223372036854775807L;
}
public static long correlationIdMaxValue()
{
return 9223372036854775807L;
}
public long correlationId()
{
return buffer.getLong(offset + 0, BYTE_ORDER);
}
private final SessionsDecoder sessions = new SessionsDecoder(this);
public static long sessionsDecoderId()
{
return 7;
}
public static int sessionsDecoderSinceVersion()
{
return 0;
}
public SessionsDecoder sessions()
{
sessions.wrap(buffer);
return sessions;
}
public static final class SessionsDecoder
implements Iterable, java.util.Iterator
{
public static final int HEADER_SIZE = 3;
private final AllFixSessionsReplyDecoder parentMessage;
private DirectBuffer buffer;
private int count;
private int index;
private int offset;
private int blockLength;
SessionsDecoder(final AllFixSessionsReplyDecoder parentMessage)
{
this.parentMessage = parentMessage;
}
public void wrap(final DirectBuffer buffer)
{
if (buffer != this.buffer)
{
this.buffer = buffer;
}
index = 0;
final int limit = parentMessage.limit();
parentMessage.limit(limit + HEADER_SIZE);
blockLength = (buffer.getShort(limit + 0, BYTE_ORDER) & 0xFFFF);
count = ((short)(buffer.getByte(limit + 2) & 0xFF));
}
public SessionsDecoder next()
{
if (index >= count)
{
throw new java.util.NoSuchElementException();
}
offset = parentMessage.limit();
parentMessage.limit(offset + blockLength);
++index;
return this;
}
public static short countMinValue()
{
return (short)0;
}
public static short countMaxValue()
{
return (short)254;
}
public static int sbeHeaderSize()
{
return HEADER_SIZE;
}
public static int sbeBlockLength()
{
return 37;
}
public int actingBlockLength()
{
return blockLength;
}
public int count()
{
return count;
}
public java.util.Iterator iterator()
{
return this;
}
public void remove()
{
throw new UnsupportedOperationException();
}
public boolean hasNext()
{
return index < count;
}
public static int sessionIdId()
{
return 1;
}
public static int sessionIdSinceVersion()
{
return 0;
}
public static int sessionIdEncodingOffset()
{
return 0;
}
public static int sessionIdEncodingLength()
{
return 8;
}
public static String sessionIdMetaAttribute(final MetaAttribute metaAttribute)
{
if (MetaAttribute.PRESENCE == metaAttribute)
{
return "required";
}
return "";
}
public static long sessionIdNullValue()
{
return -9223372036854775808L;
}
public static long sessionIdMinValue()
{
return -9223372036854775807L;
}
public static long sessionIdMaxValue()
{
return 9223372036854775807L;
}
public long sessionId()
{
return buffer.getLong(offset + 0, BYTE_ORDER);
}
public static int connectionIdId()
{
return 2;
}
public static int connectionIdSinceVersion()
{
return 0;
}
public static int connectionIdEncodingOffset()
{
return 8;
}
public static int connectionIdEncodingLength()
{
return 8;
}
public static String connectionIdMetaAttribute(final MetaAttribute metaAttribute)
{
if (MetaAttribute.PRESENCE == metaAttribute)
{
return "required";
}
return "";
}
public static long connectionIdNullValue()
{
return -9223372036854775808L;
}
public static long connectionIdMinValue()
{
return -9223372036854775807L;
}
public static long connectionIdMaxValue()
{
return 9223372036854775807L;
}
public long connectionId()
{
return buffer.getLong(offset + 8, BYTE_ORDER);
}
public static int lastReceivedSequenceNumberId()
{
return 3;
}
public static int lastReceivedSequenceNumberSinceVersion()
{
return 0;
}
public static int lastReceivedSequenceNumberEncodingOffset()
{
return 16;
}
public static int lastReceivedSequenceNumberEncodingLength()
{
return 4;
}
public static String lastReceivedSequenceNumberMetaAttribute(final MetaAttribute metaAttribute)
{
if (MetaAttribute.PRESENCE == metaAttribute)
{
return "required";
}
return "";
}
public static int lastReceivedSequenceNumberNullValue()
{
return -2147483648;
}
public static int lastReceivedSequenceNumberMinValue()
{
return -2147483647;
}
public static int lastReceivedSequenceNumberMaxValue()
{
return 2147483647;
}
public int lastReceivedSequenceNumber()
{
return buffer.getInt(offset + 16, BYTE_ORDER);
}
public static int lastSentSequenceNumberId()
{
return 4;
}
public static int lastSentSequenceNumberSinceVersion()
{
return 0;
}
public static int lastSentSequenceNumberEncodingOffset()
{
return 20;
}
public static int lastSentSequenceNumberEncodingLength()
{
return 4;
}
public static String lastSentSequenceNumberMetaAttribute(final MetaAttribute metaAttribute)
{
if (MetaAttribute.PRESENCE == metaAttribute)
{
return "required";
}
return "";
}
public static int lastSentSequenceNumberNullValue()
{
return -2147483648;
}
public static int lastSentSequenceNumberMinValue()
{
return -2147483647;
}
public static int lastSentSequenceNumberMaxValue()
{
return 2147483647;
}
public int lastSentSequenceNumber()
{
return buffer.getInt(offset + 20, BYTE_ORDER);
}
public static int lastLogonTimeId()
{
return 5;
}
public static int lastLogonTimeSinceVersion()
{
return 0;
}
public static int lastLogonTimeEncodingOffset()
{
return 24;
}
public static int lastLogonTimeEncodingLength()
{
return 8;
}
public static String lastLogonTimeMetaAttribute(final MetaAttribute metaAttribute)
{
if (MetaAttribute.PRESENCE == metaAttribute)
{
return "required";
}
return "";
}
public static long lastLogonTimeNullValue()
{
return -9223372036854775808L;
}
public static long lastLogonTimeMinValue()
{
return -9223372036854775807L;
}
public static long lastLogonTimeMaxValue()
{
return 9223372036854775807L;
}
public long lastLogonTime()
{
return buffer.getLong(offset + 24, BYTE_ORDER);
}
public static int sequenceIndexId()
{
return 6;
}
public static int sequenceIndexSinceVersion()
{
return 0;
}
public static int sequenceIndexEncodingOffset()
{
return 32;
}
public static int sequenceIndexEncodingLength()
{
return 4;
}
public static String sequenceIndexMetaAttribute(final MetaAttribute metaAttribute)
{
if (MetaAttribute.PRESENCE == metaAttribute)
{
return "required";
}
return "";
}
public static int sequenceIndexNullValue()
{
return -2147483648;
}
public static int sequenceIndexMinValue()
{
return -2147483647;
}
public static int sequenceIndexMaxValue()
{
return 2147483647;
}
public int sequenceIndex()
{
return buffer.getInt(offset + 32, BYTE_ORDER);
}
public static int slowStatusId()
{
return 15;
}
public static int slowStatusSinceVersion()
{
return 0;
}
public static int slowStatusEncodingOffset()
{
return 36;
}
public static int slowStatusEncodingLength()
{
return 1;
}
public static String slowStatusMetaAttribute(final MetaAttribute metaAttribute)
{
if (MetaAttribute.PRESENCE == metaAttribute)
{
return "required";
}
return "";
}
public short slowStatusRaw()
{
return ((short)(buffer.getByte(offset + 36) & 0xFF));
}
public SlowStatus slowStatus()
{
return SlowStatus.get(((short)(buffer.getByte(offset + 36) & 0xFF)));
}
public static int addressId()
{
return 8;
}
public static int addressSinceVersion()
{
return 0;
}
public static String addressCharacterEncoding()
{
return java.nio.charset.StandardCharsets.UTF_8.name();
}
public static String addressMetaAttribute(final MetaAttribute metaAttribute)
{
if (MetaAttribute.PRESENCE == metaAttribute)
{
return "required";
}
return "";
}
public static int addressHeaderLength()
{
return 2;
}
public int addressLength()
{
final int limit = parentMessage.limit();
return (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
}
public int skipAddress()
{
final int headerLength = 2;
final int limit = parentMessage.limit();
final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
final int dataOffset = limit + headerLength;
parentMessage.limit(dataOffset + dataLength);
return dataLength;
}
public int getAddress(final MutableDirectBuffer dst, final int dstOffset, final int length)
{
final int headerLength = 2;
final int limit = parentMessage.limit();
final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
final int bytesCopied = Math.min(length, dataLength);
parentMessage.limit(limit + headerLength + dataLength);
buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);
return bytesCopied;
}
public int getAddress(final byte[] dst, final int dstOffset, final int length)
{
final int headerLength = 2;
final int limit = parentMessage.limit();
final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
final int bytesCopied = Math.min(length, dataLength);
parentMessage.limit(limit + headerLength + dataLength);
buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);
return bytesCopied;
}
public void wrapAddress(final DirectBuffer wrapBuffer)
{
final int headerLength = 2;
final int limit = parentMessage.limit();
final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
parentMessage.limit(limit + headerLength + dataLength);
wrapBuffer.wrap(buffer, limit + headerLength, dataLength);
}
public String address()
{
final int headerLength = 2;
final int limit = parentMessage.limit();
final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
parentMessage.limit(limit + headerLength + dataLength);
if (0 == dataLength)
{
return "";
}
final byte[] tmp = new byte[dataLength];
buffer.getBytes(limit + headerLength, tmp, 0, dataLength);
return new String(tmp, java.nio.charset.StandardCharsets.UTF_8);
}
public static int localCompIdId()
{
return 9;
}
public static int localCompIdSinceVersion()
{
return 0;
}
public static String localCompIdCharacterEncoding()
{
return java.nio.charset.StandardCharsets.UTF_8.name();
}
public static String localCompIdMetaAttribute(final MetaAttribute metaAttribute)
{
if (MetaAttribute.PRESENCE == metaAttribute)
{
return "required";
}
return "";
}
public static int localCompIdHeaderLength()
{
return 2;
}
public int localCompIdLength()
{
final int limit = parentMessage.limit();
return (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
}
public int skipLocalCompId()
{
final int headerLength = 2;
final int limit = parentMessage.limit();
final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
final int dataOffset = limit + headerLength;
parentMessage.limit(dataOffset + dataLength);
return dataLength;
}
public int getLocalCompId(final MutableDirectBuffer dst, final int dstOffset, final int length)
{
final int headerLength = 2;
final int limit = parentMessage.limit();
final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
final int bytesCopied = Math.min(length, dataLength);
parentMessage.limit(limit + headerLength + dataLength);
buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);
return bytesCopied;
}
public int getLocalCompId(final byte[] dst, final int dstOffset, final int length)
{
final int headerLength = 2;
final int limit = parentMessage.limit();
final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
final int bytesCopied = Math.min(length, dataLength);
parentMessage.limit(limit + headerLength + dataLength);
buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);
return bytesCopied;
}
public void wrapLocalCompId(final DirectBuffer wrapBuffer)
{
final int headerLength = 2;
final int limit = parentMessage.limit();
final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
parentMessage.limit(limit + headerLength + dataLength);
wrapBuffer.wrap(buffer, limit + headerLength, dataLength);
}
public String localCompId()
{
final int headerLength = 2;
final int limit = parentMessage.limit();
final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
parentMessage.limit(limit + headerLength + dataLength);
if (0 == dataLength)
{
return "";
}
final byte[] tmp = new byte[dataLength];
buffer.getBytes(limit + headerLength, tmp, 0, dataLength);
return new String(tmp, java.nio.charset.StandardCharsets.UTF_8);
}
public static int localSubIdId()
{
return 10;
}
public static int localSubIdSinceVersion()
{
return 0;
}
public static String localSubIdCharacterEncoding()
{
return java.nio.charset.StandardCharsets.UTF_8.name();
}
public static String localSubIdMetaAttribute(final MetaAttribute metaAttribute)
{
if (MetaAttribute.PRESENCE == metaAttribute)
{
return "required";
}
return "";
}
public static int localSubIdHeaderLength()
{
return 2;
}
public int localSubIdLength()
{
final int limit = parentMessage.limit();
return (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
}
public int skipLocalSubId()
{
final int headerLength = 2;
final int limit = parentMessage.limit();
final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
final int dataOffset = limit + headerLength;
parentMessage.limit(dataOffset + dataLength);
return dataLength;
}
public int getLocalSubId(final MutableDirectBuffer dst, final int dstOffset, final int length)
{
final int headerLength = 2;
final int limit = parentMessage.limit();
final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
final int bytesCopied = Math.min(length, dataLength);
parentMessage.limit(limit + headerLength + dataLength);
buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);
return bytesCopied;
}
public int getLocalSubId(final byte[] dst, final int dstOffset, final int length)
{
final int headerLength = 2;
final int limit = parentMessage.limit();
final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
final int bytesCopied = Math.min(length, dataLength);
parentMessage.limit(limit + headerLength + dataLength);
buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);
return bytesCopied;
}
public void wrapLocalSubId(final DirectBuffer wrapBuffer)
{
final int headerLength = 2;
final int limit = parentMessage.limit();
final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
parentMessage.limit(limit + headerLength + dataLength);
wrapBuffer.wrap(buffer, limit + headerLength, dataLength);
}
public String localSubId()
{
final int headerLength = 2;
final int limit = parentMessage.limit();
final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
parentMessage.limit(limit + headerLength + dataLength);
if (0 == dataLength)
{
return "";
}
final byte[] tmp = new byte[dataLength];
buffer.getBytes(limit + headerLength, tmp, 0, dataLength);
return new String(tmp, java.nio.charset.StandardCharsets.UTF_8);
}
public static int localLocationIdId()
{
return 11;
}
public static int localLocationIdSinceVersion()
{
return 0;
}
public static String localLocationIdCharacterEncoding()
{
return java.nio.charset.StandardCharsets.UTF_8.name();
}
public static String localLocationIdMetaAttribute(final MetaAttribute metaAttribute)
{
if (MetaAttribute.PRESENCE == metaAttribute)
{
return "required";
}
return "";
}
public static int localLocationIdHeaderLength()
{
return 2;
}
public int localLocationIdLength()
{
final int limit = parentMessage.limit();
return (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
}
public int skipLocalLocationId()
{
final int headerLength = 2;
final int limit = parentMessage.limit();
final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
final int dataOffset = limit + headerLength;
parentMessage.limit(dataOffset + dataLength);
return dataLength;
}
public int getLocalLocationId(final MutableDirectBuffer dst, final int dstOffset, final int length)
{
final int headerLength = 2;
final int limit = parentMessage.limit();
final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
final int bytesCopied = Math.min(length, dataLength);
parentMessage.limit(limit + headerLength + dataLength);
buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);
return bytesCopied;
}
public int getLocalLocationId(final byte[] dst, final int dstOffset, final int length)
{
final int headerLength = 2;
final int limit = parentMessage.limit();
final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
final int bytesCopied = Math.min(length, dataLength);
parentMessage.limit(limit + headerLength + dataLength);
buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);
return bytesCopied;
}
public void wrapLocalLocationId(final DirectBuffer wrapBuffer)
{
final int headerLength = 2;
final int limit = parentMessage.limit();
final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
parentMessage.limit(limit + headerLength + dataLength);
wrapBuffer.wrap(buffer, limit + headerLength, dataLength);
}
public String localLocationId()
{
final int headerLength = 2;
final int limit = parentMessage.limit();
final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
parentMessage.limit(limit + headerLength + dataLength);
if (0 == dataLength)
{
return "";
}
final byte[] tmp = new byte[dataLength];
buffer.getBytes(limit + headerLength, tmp, 0, dataLength);
return new String(tmp, java.nio.charset.StandardCharsets.UTF_8);
}
public static int remoteCompIdId()
{
return 12;
}
public static int remoteCompIdSinceVersion()
{
return 0;
}
public static String remoteCompIdCharacterEncoding()
{
return java.nio.charset.StandardCharsets.UTF_8.name();
}
public static String remoteCompIdMetaAttribute(final MetaAttribute metaAttribute)
{
if (MetaAttribute.PRESENCE == metaAttribute)
{
return "required";
}
return "";
}
public static int remoteCompIdHeaderLength()
{
return 2;
}
public int remoteCompIdLength()
{
final int limit = parentMessage.limit();
return (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
}
public int skipRemoteCompId()
{
final int headerLength = 2;
final int limit = parentMessage.limit();
final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
final int dataOffset = limit + headerLength;
parentMessage.limit(dataOffset + dataLength);
return dataLength;
}
public int getRemoteCompId(final MutableDirectBuffer dst, final int dstOffset, final int length)
{
final int headerLength = 2;
final int limit = parentMessage.limit();
final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
final int bytesCopied = Math.min(length, dataLength);
parentMessage.limit(limit + headerLength + dataLength);
buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);
return bytesCopied;
}
public int getRemoteCompId(final byte[] dst, final int dstOffset, final int length)
{
final int headerLength = 2;
final int limit = parentMessage.limit();
final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
final int bytesCopied = Math.min(length, dataLength);
parentMessage.limit(limit + headerLength + dataLength);
buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);
return bytesCopied;
}
public void wrapRemoteCompId(final DirectBuffer wrapBuffer)
{
final int headerLength = 2;
final int limit = parentMessage.limit();
final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
parentMessage.limit(limit + headerLength + dataLength);
wrapBuffer.wrap(buffer, limit + headerLength, dataLength);
}
public String remoteCompId()
{
final int headerLength = 2;
final int limit = parentMessage.limit();
final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
parentMessage.limit(limit + headerLength + dataLength);
if (0 == dataLength)
{
return "";
}
final byte[] tmp = new byte[dataLength];
buffer.getBytes(limit + headerLength, tmp, 0, dataLength);
return new String(tmp, java.nio.charset.StandardCharsets.UTF_8);
}
public static int remoteSubIdId()
{
return 13;
}
public static int remoteSubIdSinceVersion()
{
return 0;
}
public static String remoteSubIdCharacterEncoding()
{
return java.nio.charset.StandardCharsets.UTF_8.name();
}
public static String remoteSubIdMetaAttribute(final MetaAttribute metaAttribute)
{
if (MetaAttribute.PRESENCE == metaAttribute)
{
return "required";
}
return "";
}
public static int remoteSubIdHeaderLength()
{
return 2;
}
public int remoteSubIdLength()
{
final int limit = parentMessage.limit();
return (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
}
public int skipRemoteSubId()
{
final int headerLength = 2;
final int limit = parentMessage.limit();
final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
final int dataOffset = limit + headerLength;
parentMessage.limit(dataOffset + dataLength);
return dataLength;
}
public int getRemoteSubId(final MutableDirectBuffer dst, final int dstOffset, final int length)
{
final int headerLength = 2;
final int limit = parentMessage.limit();
final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
final int bytesCopied = Math.min(length, dataLength);
parentMessage.limit(limit + headerLength + dataLength);
buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);
return bytesCopied;
}
public int getRemoteSubId(final byte[] dst, final int dstOffset, final int length)
{
final int headerLength = 2;
final int limit = parentMessage.limit();
final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
final int bytesCopied = Math.min(length, dataLength);
parentMessage.limit(limit + headerLength + dataLength);
buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);
return bytesCopied;
}
public void wrapRemoteSubId(final DirectBuffer wrapBuffer)
{
final int headerLength = 2;
final int limit = parentMessage.limit();
final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
parentMessage.limit(limit + headerLength + dataLength);
wrapBuffer.wrap(buffer, limit + headerLength, dataLength);
}
public String remoteSubId()
{
final int headerLength = 2;
final int limit = parentMessage.limit();
final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
parentMessage.limit(limit + headerLength + dataLength);
if (0 == dataLength)
{
return "";
}
final byte[] tmp = new byte[dataLength];
buffer.getBytes(limit + headerLength, tmp, 0, dataLength);
return new String(tmp, java.nio.charset.StandardCharsets.UTF_8);
}
public static int remoteLocationIdId()
{
return 14;
}
public static int remoteLocationIdSinceVersion()
{
return 0;
}
public static String remoteLocationIdCharacterEncoding()
{
return java.nio.charset.StandardCharsets.UTF_8.name();
}
public static String remoteLocationIdMetaAttribute(final MetaAttribute metaAttribute)
{
if (MetaAttribute.PRESENCE == metaAttribute)
{
return "required";
}
return "";
}
public static int remoteLocationIdHeaderLength()
{
return 2;
}
public int remoteLocationIdLength()
{
final int limit = parentMessage.limit();
return (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
}
public int skipRemoteLocationId()
{
final int headerLength = 2;
final int limit = parentMessage.limit();
final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
final int dataOffset = limit + headerLength;
parentMessage.limit(dataOffset + dataLength);
return dataLength;
}
public int getRemoteLocationId(final MutableDirectBuffer dst, final int dstOffset, final int length)
{
final int headerLength = 2;
final int limit = parentMessage.limit();
final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
final int bytesCopied = Math.min(length, dataLength);
parentMessage.limit(limit + headerLength + dataLength);
buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);
return bytesCopied;
}
public int getRemoteLocationId(final byte[] dst, final int dstOffset, final int length)
{
final int headerLength = 2;
final int limit = parentMessage.limit();
final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
final int bytesCopied = Math.min(length, dataLength);
parentMessage.limit(limit + headerLength + dataLength);
buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);
return bytesCopied;
}
public void wrapRemoteLocationId(final DirectBuffer wrapBuffer)
{
final int headerLength = 2;
final int limit = parentMessage.limit();
final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
parentMessage.limit(limit + headerLength + dataLength);
wrapBuffer.wrap(buffer, limit + headerLength, dataLength);
}
public String remoteLocationId()
{
final int headerLength = 2;
final int limit = parentMessage.limit();
final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
parentMessage.limit(limit + headerLength + dataLength);
if (0 == dataLength)
{
return "";
}
final byte[] tmp = new byte[dataLength];
buffer.getBytes(limit + headerLength, tmp, 0, dataLength);
return new String(tmp, java.nio.charset.StandardCharsets.UTF_8);
}
public StringBuilder appendTo(final StringBuilder builder)
{
if (null == buffer)
{
return builder;
}
builder.append('(');
builder.append("sessionId=");
builder.append(this.sessionId());
builder.append('|');
builder.append("connectionId=");
builder.append(this.connectionId());
builder.append('|');
builder.append("lastReceivedSequenceNumber=");
builder.append(this.lastReceivedSequenceNumber());
builder.append('|');
builder.append("lastSentSequenceNumber=");
builder.append(this.lastSentSequenceNumber());
builder.append('|');
builder.append("lastLogonTime=");
builder.append(this.lastLogonTime());
builder.append('|');
builder.append("sequenceIndex=");
builder.append(this.sequenceIndex());
builder.append('|');
builder.append("slowStatus=");
builder.append(this.slowStatus());
builder.append('|');
builder.append("address=");
builder.append('\'').append(address()).append('\'');
builder.append('|');
builder.append("localCompId=");
builder.append('\'').append(localCompId()).append('\'');
builder.append('|');
builder.append("localSubId=");
builder.append('\'').append(localSubId()).append('\'');
builder.append('|');
builder.append("localLocationId=");
builder.append('\'').append(localLocationId()).append('\'');
builder.append('|');
builder.append("remoteCompId=");
builder.append('\'').append(remoteCompId()).append('\'');
builder.append('|');
builder.append("remoteSubId=");
builder.append('\'').append(remoteSubId()).append('\'');
builder.append('|');
builder.append("remoteLocationId=");
builder.append('\'').append(remoteLocationId()).append('\'');
builder.append(')');
return builder;
}
public SessionsDecoder sbeSkip()
{
skipAddress();
skipLocalCompId();
skipLocalSubId();
skipLocalLocationId();
skipRemoteCompId();
skipRemoteSubId();
skipRemoteLocationId();
return this;
}
}
public String toString()
{
if (null == buffer)
{
return "";
}
final AllFixSessionsReplyDecoder decoder = new AllFixSessionsReplyDecoder();
decoder.wrap(buffer, offset, actingBlockLength, actingVersion);
return decoder.appendTo(new StringBuilder()).toString();
}
public StringBuilder appendTo(final StringBuilder builder)
{
if (null == buffer)
{
return builder;
}
final int originalLimit = limit();
limit(offset + actingBlockLength);
builder.append("[AllFixSessionsReply](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("correlationId=");
builder.append(this.correlationId());
builder.append('|');
builder.append("sessions=[");
final int sessionsOriginalOffset = sessions.offset;
final int sessionsOriginalIndex = sessions.index;
final SessionsDecoder sessions = this.sessions();
if (sessions.count() > 0)
{
while (sessions.hasNext())
{
sessions.next().appendTo(builder);
builder.append(',');
}
builder.setLength(builder.length() - 1);
}
sessions.offset = sessionsOriginalOffset;
sessions.index = sessionsOriginalIndex;
builder.append(']');
limit(originalLimit);
return builder;
}
public AllFixSessionsReplyDecoder sbeSkip()
{
sbeRewind();
SessionsDecoder sessions = this.sessions();
if (sessions.count() > 0)
{
while (sessions.hasNext())
{
sessions.next();
sessions.sbeSkip();
}
}
return this;
}
}