Class SingleSignOnSessionKey
- java.lang.Object
-
- org.apache.catalina.authenticator.SingleSignOnSessionKey
-
- All Implemented Interfaces:
java.io.Serializable
public class SingleSignOnSessionKey extends java.lang.Object implements java.io.SerializableKey used by SSO to identify a session. This key is used rather than the actual session to facilitate the replication of the SSO information across a cluster where replicating the entire session would generate significant, unnecessary overhead.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SingleSignOnSessionKey(Session session)Creates a session key from the given session, using the session's current ID.SingleSignOnSessionKey(Session session, java.lang.String sessionId)Creates a session key using the given session context and an explicit session ID.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetContextName()Returns the context name associated with this key.java.lang.StringgetHostName()Returns the host name associated with this key.java.lang.StringgetSessionId()Returns the session ID associated with this key.inthashCode()java.lang.StringtoString()
-
-
-
Constructor Detail
-
SingleSignOnSessionKey
public SingleSignOnSessionKey(Session session)
Creates a session key from the given session, using the session's current ID.- Parameters:
session- the session from which to extract the key information
-
SingleSignOnSessionKey
public SingleSignOnSessionKey(Session session, java.lang.String sessionId)
Creates a session key using the given session context and an explicit session ID.- Parameters:
session- the session from which to extract context and host informationsessionId- the session ID to use for this key
-
-
Method Detail
-
getSessionId
public java.lang.String getSessionId()
Returns the session ID associated with this key.- Returns:
- the session ID
-
getContextName
public java.lang.String getContextName()
Returns the context name associated with this key.- Returns:
- the context name
-
getHostName
public java.lang.String getHostName()
Returns the host name associated with this key.- Returns:
- the host name
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-