Class SessionId

java.lang.Object
eu.ill.webx.model.SessionId

public class SessionId extends Object
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
    Constructor
    Description
    SessionId(byte[] sessionId)
    Constructor taking raw binary session Id data.
    SessionId(String sessionIdString)
    Constructor with a hex string representation of the binary session Id.
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    Returns the raw binary session Id
    boolean
    Equality comparison comparing the upper and lower long values of the session Id
    int
    Returns the hashcode of the session Id generated from the lower and upper long values
    Returns the hex representation of the session Id

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SessionId

      public SessionId(String sessionIdString)
      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

      public String 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

      public boolean equals(Object o)
      Equality comparison comparing the upper and lower long values of the session Id
      Overrides:
      equals in class Object
      Parameters:
      o - the object to compare to
      Returns:
      true if equal
    • hashCode

      public int hashCode()
      Returns the hashcode of the session Id generated from the lower and upper long values
      Overrides:
      hashCode in class Object
      Returns: