Package eu.ill.webx.model
Class SessionId
java.lang.Object
eu.ill.webx.model.SessionId
Encapsulates the binary session Id value. This is used for filtering of messages from a WebX Engine.
The Session Id is 16 bytes. We store this also as two long values that are used for equality comparison.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]bytes()Returns the raw binary session IdbooleanEquality comparison comparing the upper and lower long values of the session IdinthashCode()Returns the hashcode of the session Id generated from the lower and upper long valuesReturns the hex representation of the session Id
-
Constructor Details
-
SessionId
Constructor with a hex string representation of the binary session Id. the binary equivalent and upper and lower long values are created.- Parameters:
sessionIdString- The hex representation of the session Id
-
SessionId
public SessionId(byte[] sessionId) Constructor taking raw binary session Id data. The lower and upper long values are calculator.- Parameters:
sessionId- the binary session Id
-
-
Method Details
-
hexString
Returns the hex representation of the session Id- Returns:
- the hex representation of the session Id
-
bytes
public byte[] bytes()Returns the raw binary session Id- Returns:
- the raw binary session Id
-
equals
Equality comparison comparing the upper and lower long values of the session Id -
hashCode
public int hashCode()Returns the hashcode of the session Id generated from the lower and upper long values
-