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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Correlation ID | | | +---------------------------------------------------------------+ | Stream ID | +---------------------------------------------------------------+ | Channel Length | +---------------------------------------------------------------+ | Channel (ASCII) ... ... | +---------------------------------------------------------------+
buffer, CLIENT_ID_FIELD_OFFSET, CORRELATION_ID_FIELD_OFFSET, LENGTH, offset
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
|
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.
|
clientId, clientId, correlationId, correlationId, wrap
public int streamId()
public PublicationMessageFlyweight streamId(int streamId)
streamId
- field valuepublic String channel()
public void appendChannel(Appendable appendable)
Appendable
.appendable
- to append channel to.public PublicationMessageFlyweight channel(String channel)
channel
- field valuepublic 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 CorrelatedMessageFlyweight
msgTypeId
- type of message.length
- of message in bytes to validate.Copyright © 2014-2020 Real Logic Limited. All Rights Reserved.