Record Class FirstHandshakeSimpleClientMessage
java.lang.Object
java.lang.Record
pt.unl.fct.di.novasys.babel2.channels.legacy.simpleServer.messages.FirstHandshakeSimpleClientMessage
- Record Components:
magicNumber- the client magic number identifying the legacy protocol version
- All Implemented Interfaces:
ControlMessage
public record FirstHandshakeSimpleClientMessage(int magicNumber)
extends Record
implements ControlMessage
Initial handshake message sent by a legacy simple client containing its client magic number.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intInteger type identifier for the first client handshake message.Fields inherited from interface ControlMessage
CONTROL_MAGIC_NUMBERModifier and TypeFieldDescriptionstatic final intMagic number used to identify legacy control protocol frames. -
Constructor Summary
ConstructorsConstructorDescriptionFirstHandshakeSimpleClientMessage(int magicNumber) Creates an instance of aFirstHandshakeSimpleClientMessagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the count of attributes carried in this control message envelope.final booleanIndicates whether some other object is "equal to" this one.intReturns the integer type identifier of this control message.final inthashCode()Returns a hash code value for this object.intReturns the value of themagicNumberrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
TYPE_INT
public static final int TYPE_INTInteger type identifier for the first client handshake message.- See Also:
-
-
Constructor Details
-
FirstHandshakeSimpleClientMessage
public FirstHandshakeSimpleClientMessage(int magicNumber) Creates an instance of aFirstHandshakeSimpleClientMessagerecord class.- Parameters:
magicNumber- the value for themagicNumberrecord component
-
-
Method Details
-
getTypeInt
public int getTypeInt()Description copied from interface:ControlMessageReturns the integer type identifier of this control message.- Specified by:
getTypeIntin interfaceControlMessage- Returns:
- the message type code
-
attributeMapSize
public int attributeMapSize()Description copied from interface:ControlMessageReturns the count of attributes carried in this control message envelope.- Specified by:
attributeMapSizein interfaceControlMessage- Returns:
- the attribute map size
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
magicNumber
public int magicNumber()Returns the value of themagicNumberrecord component.- Returns:
- the value of the
magicNumberrecord component
-