public final class ChannelAccessRepeaterConfirmMessage extends ChannelAccessMessage
REPEATER_CONFIRM message. This message is
sent from the repeater to a client in order to confirm that the client has
successfully registered with the repeater.ChannelAccessCommand.REPEATER_CONFIRMcommand, originalMessageHeader| Constructor and Description |
|---|
ChannelAccessRepeaterConfirmMessage(java.net.Inet4Address clientAddress)
Constructor for creating a
REPEATER_CONFIRM message. |
| Modifier and Type | Method and Description |
|---|---|
protected static ChannelAccessRepeaterConfirmMessage |
deserialize(ChannelAccessMessageHeader messageHeader,
ByteSource byteSource)
Constructs a message from a header and a byte source.
|
boolean |
equals(java.lang.Object obj)
Tells whether the specified object represents the same message.
|
java.net.Inet4Address |
getClientAddress()
Returns the IP with which the client has been registered.
|
int |
hashCode()
Returns a hash code value for this message.
|
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, getCommand, getOriginalMessageHeader, hasOriginalMessageHeader, serializeHeader, verify, verifyHeaderpublic ChannelAccessRepeaterConfirmMessage(java.net.Inet4Address clientAddress)
REPEATER_CONFIRM message. This
constructor should be used for messages that are sent from a repeater to
a client.clientAddress - the address of the client that has been registered. A client
could use this information to identify which of its
registration attempts have been successful, if it tried to
register with multiple addresses.public java.net.Inet4Address getClientAddress()
public boolean equals(java.lang.Object obj)
ChannelAccessMessageTells whether the specified object represents the same message.
Two messages are considered equal if they are of the same type and have the same headers and payload. For comparing the types, the actual Java type and not just the Channel Access command is compared.
equals in class ChannelAccessMessageobj - reference object with which this object is compared.true if obj is a message that is of the
same type and has the same headers and payload as this message.
false if obj is null or of
a different type than this message or differs in the headers or
payload.public int hashCode()
ChannelAccessMessageReturns a hash code value for this message. This method is supported for the benefit of hash tables. The hash code is calculated as a combination of the hash codes of this messages headers (including the Channel Access command) and its payload (if present).
If two messages are equal (as indicated by the return value of
ChannelAccessMessage.equals(Object)), they also have the same hash code. However, the
fact that two messages have the same hash code does not imply that they
are equal.
hashCode in class ChannelAccessMessagepublic java.lang.String toString()
ChannelAccessMessagetoString in class ChannelAccessMessageprotected 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).protected static ChannelAccessRepeaterConfirmMessage deserialize(ChannelAccessMessageHeader messageHeader, ByteSource byteSource)
ChannelAccessMessageCodec.messageHeader - CA message header.byteSource - byte source for reading the message's payload (if any).headerOnly is
false).java.nio.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–2018 aquenos GmbH. All rights reserved.