com.cafesoft.cams.session
Interface Session

All Superinterfaces:
Recyclable, Serializable
All Known Subinterfaces:
ManagedSession, RemoteSession
All Known Implementing Classes:
AbstractBaseSession, StandardRemoteSession

public interface Session
extends Recyclable, Serializable

The Session interface represents a Cams "authentication session" created on successful login and active until explicitly closed (logout) or expired due to inactivity.

In addition, Sessions provide:

Since:
5/06/02

Method Summary
 Object getAttribute(String namespace, String name)
          Get a attribute from the session
 String[] getAttributeNames(String namespace)
          Get the names of all the attributes in the session
 Map getAuthenticationMethods()
          Get the authentication methods used to login the Subject.
 long getCreationTime()
          Get the session creation time.
 SessionId getId()
          Get the Session's Id
 long getLastTouchTime()
          Get the instant the session was last touched.
 String[] getNamespaces()
          Get all attribute namespaces.
 String getSecurityDomainName()
          Get the Session's security domain name.
 SessionStatus getStatus()
          Get the Session status.
 
Methods inherited from interface com.cafesoft.core.util.Recyclable
recycle
 

Method Detail

getId

public SessionId getId()
Get the Session's Id

Returns:
A string representing the session's id

getSecurityDomainName

public String getSecurityDomainName()
Get the Session's security domain name.

Returns:
the name of the security domain to which this session belongs.

getLastTouchTime

public long getLastTouchTime()
Get the instant the session was last touched.

Returns:
a long number that represents the time the session was last touched.

getCreationTime

public long getCreationTime()
Get the session creation time.

Returns:
A long number that represents the time the Session was created.

getAuthenticationMethods

public Map getAuthenticationMethods()
Get the authentication methods used to login the Subject.

Returns:
a String array of authentication types which may include any of the following values:
  • AuthenticationMethod.PASSWORD
  • AuthenticationMethod.SECUREPASSWORD
  • AuthenticationMethod.KERBEROS
  • AuthenticationMethod.HARDWARETOKEN
  • AuthenticationMethod.SSLTLS
  • AuthenticationMethod.X509
  • AuthenticationMethod.PGP
  • AuthenticationMethod.SPKI
  • AuthenticationMethod.XKMS
  • AuthenticationMethod.XMLDIGSIG
See Also:
AuthenticationMethod

getStatus

public SessionStatus getStatus()
Get the Session status.

Returns:
a Session is either "active", "expired", or "closed". When a session is first created, it is "active". If the associated Subject has logged out, the session is "closed". If the session has been inactive for longer than the period defined by it's SessionManagerService, then it is "expired".

getAttribute

public Object getAttribute(String namespace,
                           String name)
Get a attribute from the session

Parameters:
namespace - the namespace of the name/value pair
name - the name string to get the value for
Returns:
The attribute from the Session, null if the name doesn't exist.

getNamespaces

public String[] getNamespaces()
Get all attribute namespaces.

Returns:
a String array of all namespaces used for values currently stored in the session including the "default" namepace.

getAttributeNames

public String[] getAttributeNames(String namespace)
Get the names of all the attributes in the session

Parameters:
namespace - the namespace of attributes to be retrieved.
Returns:
A String array of all names in the sessions that contain attributes


Generated on 10:40:31 AM September 10, 2003, © 1996-2003 Cafésoft LLC. All rights reserved.