public abstract class ChannelAccessVersionMessage extends ChannelAccessMessage
CA_PROTO_VERSION
message.
This message is mainly used for communicating the supported protocol version,
however, depending on the context it might carry additional information. As
the meaning of this message is different depending on the context (direction
and base protocol) there are different child classes for the different use
cases.ChannelAccessCommand.CA_PROTO_VERSION
Modifier and Type | Field and Description |
---|---|
protected ChannelAccessVersion |
version
Channel Access version as enum.
|
command, originalMessageHeader
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Tells whether the specified object represents the same message.
|
ChannelAccessVersion |
getVersion()
Returns the Channel Access version supported by the peer sending this
message.
|
int |
hashCode()
Returns a hash code value for this message.
|
addByteArrayToStringBuilder, calculatePaddingSize, getCommand, getOriginalMessageHeader, hasOriginalMessageHeader, serialize, serializeHeader, toString, verify, verifyHeader
protected ChannelAccessVersion version
public ChannelAccessVersion getVersion()
public boolean equals(Object obj)
ChannelAccessMessage
Tells 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 ChannelAccessMessage
obj
- 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()
ChannelAccessMessage
Returns 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 ChannelAccessMessage
Copyright © 2014–2016 aquenos GmbH. All rights reserved.