com.iplanet.portalserver.session
Class SessionID

java.lang.Object
  |
  +--com.iplanet.portalserver.session.SessionID

public class SessionID
extends java.lang.Object

The SessionID class is used to indentify a Session object. It contains a random String and the name of the session server. The random String in the SessionID is unique on a given session server.

See Also:
Session

Constructor Summary
SessionID(javax.servlet.http.HttpServletRequest request)
          Constructs a SessionID object based on a HttpServletRequest object.
SessionID(java.lang.String sid)
          Constructs a SessionID object based on a String.
 
Method Summary
 boolean equals(java.lang.Object object)
          Compares this SessionID to the specified object.
 java.lang.String getRandomString()
          This method gets the random String in this object.
 java.lang.String getSessionDomain()
          This method gets the domain where this session belongs to.
 java.lang.String getSessionServer()
          This method gets the session server name in this object.
 java.lang.String getSessionServerPort()
          This method gets the session server port in this object
 java.lang.String getSessionServerProtocol()
          This method gets the session server protocol in this object
 int hashCode()
          Returns a hash code for this object.
 java.lang.String toString()
          This method returns the encrypted session string.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SessionID

public SessionID(javax.servlet.http.HttpServletRequest request)
Constructs a SessionID object based on a HttpServletRequest object.
Parameters:
request - The HttpServletRequest object which contains the encrypted session string.

SessionID

public SessionID(java.lang.String sid)
Constructs a SessionID object based on a String.
Parameters:
sid - The session ID String in an encrypted format.
Method Detail

getRandomString

public java.lang.String getRandomString()
This method gets the random String in this object.
Parameters:
None. -  
Returns:
The random String in this object.

getSessionServerProtocol

public java.lang.String getSessionServerProtocol()
This method gets the session server protocol in this object
Parameters:
None. -  
Returns:
The session server protocol in this object.

getSessionServerPort

public java.lang.String getSessionServerPort()
This method gets the session server port in this object
Parameters:
None. -  
Returns:
The session server port in this object.

getSessionServer

public java.lang.String getSessionServer()
This method gets the session server name in this object.
Parameters:
None. -  
Returns:
The session server name in this object.

getSessionDomain

public java.lang.String getSessionDomain()
This method gets the domain where this session belongs to.
Parameters:
None. -  
Returns:
The session domain name.

toString

public java.lang.String toString()
This method returns the encrypted session string.
Overrides:
toString in class java.lang.Object
Parameters:
None. -  
Returns:
An encrypted session string.

equals

public boolean equals(java.lang.Object object)
Compares this SessionID to the specified object. The result is true if and only if the argument is not null and the random string and server name are the same in both objects.
Overrides:
equals in class java.lang.Object
Parameters:
anObject - - the object to compare this SessionID against.
Returns:
true if the SessionID are equal; false otherwise.

hashCode

public int hashCode()
Returns a hash code for this object.
Overrides:
hashCode in class java.lang.Object
Returns:
a hash code value for this object.