Class ConnectionKey

java.lang.Object
org.kawanfw.sql.api.server.connectionstore.ConnectionKey

public class ConnectionKey
extends Object
Defines a key for the Connection Store that keeps connections in memory. The connections are identified by the client username and an unique generated connection Id in order to identify different connections belonging to the same username.
Since:
1.0
Author:
Nicolas de Pomereu
  • Constructor Details

    • ConnectionKey

      public ConnectionKey​(String username, String sessionId, String connectionId)
      Constructor
      Parameters:
      username - the client username
      sessionId - the unique Id per Session
      connectionId - the unique Connection Id per Connection
  • Method Details

    • getUsername

      public String getUsername()
      Returns the client username corresponding to this ConnectionKey.
      Returns:
      the client username corresponding to this ConnectionKey
    • getSessionId

      public String getSessionId()
      Returns the unique session Id corresponding to this ConnectionKey.
      Returns:
      the client unique session Id corresponding to this ConnectionKey
    • getConnectionId

      public String getConnectionId()
      Returns the unique connection Id corresponding to this ConnectionKey.
      Returns:
      the client unique connection Id corresponding to this ConnectionKey
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals​(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object