public class PublicationMessageFlyweight extends CorrelatedMessageFlyweight
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Client ID | | | +---------------------------------------------------------------+ | Correlation ID | | | +---------------------------------------------------------------+ | Stream ID | +---------------------------------------------------------------+ | Channel Length | +---------------------------------------------------------------+ | Channel (ASCII) ... ... | +---------------------------------------------------------------+
LENGTH| Constructor and Description |
|---|
PublicationMessageFlyweight() |
| Modifier and Type | Method and Description |
|---|---|
void |
appendChannel(Appendable appendable)
Append the channel value to an
Appendable. |
String |
channel()
Get the channel field in ASCII.
|
PublicationMessageFlyweight |
channel(String channel)
Set the channel field in ASCII.
|
static int |
computeLength(int channelLength)
Compute the length of the command message for a given channel length.
|
int |
length()
Get the length of the current message.
|
int |
streamId()
Get the stream id field.
|
PublicationMessageFlyweight |
streamId(int streamId)
Set the stream id field.
|
void |
validateLength(int msgTypeId,
int length)
Validate buffer length is long enough for message.
|
PublicationMessageFlyweight |
wrap(MutableDirectBuffer buffer,
int offset)
Wrap the buffer at a given offset for updates.
|
clientId, clientId, correlationId, correlationIdpublic PublicationMessageFlyweight wrap(MutableDirectBuffer buffer, int offset)
wrap in class CorrelatedMessageFlyweightbuffer - to wrap.offset - at which the message begins.public int streamId()
public PublicationMessageFlyweight streamId(int streamId)
streamId - field value.public String channel()
public void appendChannel(Appendable appendable)
Appendable.appendable - to append channel to.public PublicationMessageFlyweight channel(String channel)
channel - field value.public int length()
NB: must be called after the data is written in order to be accurate.
public void validateLength(int msgTypeId,
int length)
validateLength in class CorrelatedMessageFlyweightmsgTypeId - type of message.length - of message in bytes to validate.public static int computeLength(int channelLength)
channelLength - to be appended to the header.Copyright © 2014-2023 Real Logic Limited. All Rights Reserved.