public final class ChannelAccessEventsOffMessage extends ChannelAccessMessage
CA_PROTO_EVENTS_OFF
message. This message is
sent from a client to a server via TCP in order to indicate that the server
should pause sending events for all registered monitors. The sending of
events can later be resumed by sending the
ChannelAccessEventsOnMessage
.ChannelAccessCommand.CA_PROTO_EVENTS_OFF
command, originalMessageHeader
Constructor and Description |
---|
ChannelAccessEventsOffMessage()
Constructor for creating a
CA_PROTO_EVENTS_OFF message. |
Modifier and Type | Method and Description |
---|---|
protected static ChannelAccessEventsOffMessage |
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,
java.nio.charset.Charset charset)
Serializes this message to a byte sink.
|
java.lang.String |
toString()
Returns a string representation of this message.
|
addByteArrayToStringBuilder, calculatePaddingSize, equals, getCommand, getOriginalMessageHeader, hashCode, hasOriginalMessageHeader, serializeHeader, verify, verifyHeader
public ChannelAccessEventsOffMessage()
CA_PROTO_EVENTS_OFF
message.protected void serialize(ByteSink byteSink, ChannelAccessVersion version, int maxPayloadSize, java.nio.charset.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).public java.lang.String toString()
ChannelAccessMessage
toString
in class ChannelAccessMessage
protected static ChannelAccessEventsOffMessage 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).java.nio.BufferUnderflowException
- if there is not enough data in the byte source to read the
complete message (including the payload).Copyright © 2014–2019 aquenos GmbH. All rights reserved.