public class SubscriptionMessageFlyweight 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 | | | +---------------------------------------------------------------+ | Command Correlation ID | | | +---------------------------------------------------------------+ | Registration Correlation ID | | | +---------------------------------------------------------------+ | Stream Id | +---------------------------------------------------------------+ | Channel Length | +---------------------------------------------------------------+ | Channel (ASCII) ... ... | +---------------------------------------------------------------+
LENGTH
Constructor and Description |
---|
SubscriptionMessageFlyweight() |
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.
|
SubscriptionMessageFlyweight |
channel(String channel)
Set channel field in ASCII.
|
static int |
computeLength(int channelLength)
Compute the length of the command message for a given channel length.
|
int |
length()
Length of the message in bytes.
|
long |
registrationCorrelationId()
The correlation id used in registration field.
|
SubscriptionMessageFlyweight |
registrationCorrelationId(long correlationId)
Set the registration correlation id field.
|
int |
streamId()
Get the stream id.
|
SubscriptionMessageFlyweight |
streamId(int streamId)
Set the stream id.
|
void |
validateLength(int msgTypeId,
int length)
Validate buffer length is long enough for message.
|
SubscriptionMessageFlyweight |
wrap(MutableDirectBuffer buffer,
int offset)
Wrap the buffer at a given offset for updates.
|
clientId, clientId, correlationId, correlationId
public SubscriptionMessageFlyweight wrap(MutableDirectBuffer buffer, int offset)
wrap
in class CorrelatedMessageFlyweight
buffer
- to wrap.offset
- at which the message begins.public long registrationCorrelationId()
public SubscriptionMessageFlyweight registrationCorrelationId(long correlationId)
correlationId
- field value.public int streamId()
public SubscriptionMessageFlyweight streamId(int streamId)
streamId
- the channel id.public String channel()
public void appendChannel(Appendable appendable)
Appendable
.appendable
- to append channel to.public SubscriptionMessageFlyweight channel(String channel)
channel
- field value.public int length()
public void validateLength(int msgTypeId, int length)
validateLength
in class CorrelatedMessageFlyweight
msgTypeId
- 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-2022 Real Logic Limited. All Rights Reserved.