public final class ChannelAccessVersionTCPServerMessage extends ChannelAccessVersionMessage
CA_PROTO_VERSION message that is sent from a
server to a client via TCP. This message is usually send at the start of a
new TCP connection in order to communicate the protocol version supported by
the server.ChannelAccessCommand.CA_PROTO_VERSION,
ChannelAccessVersionUDPMessage,
ChannelAccessVersionTCPClientMessageversioncommand, originalMessageHeader| Constructor and Description |
|---|
ChannelAccessVersionTCPServerMessage(ChannelAccessVersion version)
Creates a
CA_PROTO_VERSION message. |
| Modifier and Type | Method and Description |
|---|---|
protected static ChannelAccessVersionTCPServerMessage |
deserialize(ChannelAccessMessageHeader messageHeader,
ByteSource byteSource)
Constructs a message from a header and a byte source.
|
protected void |
serialize(ByteSink byteSink,
ChannelAccessVersion version,
int maxPayloadSize,
java.nio.charset.Charset charset)
Serializes this message to a byte sink.
|
java.lang.String |
toString()
Returns a string representation of this message.
|
equals, getVersion, hashCodeaddByteArrayToStringBuilder, calculatePaddingSize, getCommand, getOriginalMessageHeader, hasOriginalMessageHeader, serializeHeader, verify, verifyHeaderpublic ChannelAccessVersionTCPServerMessage(ChannelAccessVersion version)
CA_PROTO_VERSION message. This constructor should
be used to create a message that is supposed to be sent from a server to
a client using the TCP protocol.version - Channel Access version supported by the server.protected void serialize(ByteSink byteSink, ChannelAccessVersion version, int maxPayloadSize, java.nio.charset.Charset charset)
ChannelAccessMessageChannelAccessMessageCodec.serialize in class ChannelAccessMessagebyteSink - 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).public java.lang.String toString()
ChannelAccessMessagetoString in class ChannelAccessMessageprotected static ChannelAccessVersionTCPServerMessage deserialize(ChannelAccessMessageHeader messageHeader, ByteSource byteSource)
ChannelAccessMessageCodec.messageHeader - CA message header.byteSource - byte source for reading the message's payload (if any).java.nio.BufferUnderflowException - if there is not enough data in the byte source to read the
complete payload.Copyright © 2014–2024 aquenos GmbH. All rights reserved.