public final class ChannelAccessReadBuildMessage extends ChannelAccessMessage
CA_PROTO_READ_BUILD
message. This message
can only be received, not sent. It is only supported for compatibility with
legacy clients. A server that receives this message should ignore it.ChannelAccessCommand.CA_PROTO_READ_BUILD
command, originalMessageHeader
Modifier and Type | Method and Description |
---|---|
protected static ChannelAccessReadBuildMessage |
deserialize(ChannelAccessMessageHeader messageHeader,
ByteSource byteSource,
boolean headerOnly)
Constructs a message from a header and a byte source.
|
protected void |
serialize(ByteSink byteSink,
ChannelAccessVersion version,
int maxPayloadSize,
Charset charset)
Serializes this message to a byte sink.
|
String |
toString()
Returns a string representation of this message.
|
protected void |
verify(ChannelAccessVersion version,
int maxPayloadSize,
Charset charset)
Verifies that this message can be serialized.
|
addByteArrayToStringBuilder, calculatePaddingSize, equals, getCommand, getOriginalMessageHeader, hashCode, hasOriginalMessageHeader, serializeHeader, verifyHeader
protected void serialize(ByteSink byteSink, ChannelAccessVersion version, int maxPayloadSize, Charset charset)
ChannelAccessMessage
ChannelAccessMessageCodec
.serialize
in class ChannelAccessMessage
byteSink
- byte sink that is used for writing the serialized data.version
- protocol version to stay compatible with. This is the protocol
version of the peer the message is sent to.maxPayloadSize
- maximum size of the payload.charset
- encoding to use for serializing the string data (e.g. channel
names, error strings, string data-values).protected void verify(ChannelAccessVersion version, int maxPayloadSize, Charset charset)
ChannelAccessMessage
ChannelAccessMessageCodec
.verify
in class ChannelAccessMessage
version
- protocol version to stay compatible with. This is the protocol
version of the peer the message is sent to.maxPayloadSize
- maximum size of the payload.charset
- encoding to use for serializing the string data (e.g. channel
names, error strings, string data-values).public String toString()
ChannelAccessMessage
toString
in class ChannelAccessMessage
protected static ChannelAccessReadBuildMessage deserialize(ChannelAccessMessageHeader messageHeader, ByteSource byteSource, boolean headerOnly)
ChannelAccessMessageCodec
.messageHeader
- CA message header.byteSource
- byte source for reading the message's payload (if any).headerOnly
- if true
this method will not try to read the
payload but just read the header. This is useful for reading a
message that is sent in the payload of a
ChannelAccessErrorMessage
. Such a message will have
all headers but no payload (even so the payload size might be
non-zero).headerOnly
is
false
).BufferUnderflowException
- if there is not enough data in the byte source to read the
complete message (including he payload if
headerOnly
is false
).Copyright © 2014–2016 aquenos GmbH. All rights reserved.