com.cafesoft.cams.session
Interface ManagedSession

All Superinterfaces:
Recyclable, Serializable, Session

public interface ManagedSession
extends Session

Internal managed session for the Cams policy server.

This session object extends the basic Session object. The additional functionality includes the ability to expire, touch, logout and get the Subject of the Session. This object is the primary Session object passed through Cams policy server.

Since:
5/14/02
See Also:
Session

Method Summary
 void expire()
          Expire the session This method is called to expire a session and mark it for deletion by the session manager.
 Subject getSubject()
          Get the Subject of the Session
 int getToken()
          Get the Token of the Session
 void logout()
          Logout the session This method will logout the subject associated with this Session object.
 void putAttribute(String namespace, String name, Object attribute)
          Put an attribute into the session.
 void removeAttribute(String namespace, String name)
          Remove a attribute from the session
 void touch()
          Touch the session This method will modify the LastTouchTime of the session
 
Methods inherited from interface com.cafesoft.cams.session.Session
getAttribute, getAttributeNames, getAuthenticationMethods, getCreationTime, getId, getLastTouchTime, getNamespaces, getSecurityDomainName, getStatus
 
Methods inherited from interface com.cafesoft.core.util.Recyclable
recycle
 

Method Detail

expire

void expire()
Expire the session

This method is called to expire a session and mark it for deletion by the session manager. In addition, this will modify the Session status to SessionStatus.EXPIRED

See Also:
SessionStatus

touch

void touch()
Touch the session

This method will modify the LastTouchTime of the session


logout

void logout()
Logout the session

This method will logout the subject associated with this Session object. In addition, the Session status will be changed to SessionStatus.CLOSED.

See Also:
SessionStatus

getSubject

Subject getSubject()
Get the Subject of the Session

Returns:
the Subject of the Session

getToken

int getToken()
Get the Token of the Session

Returns:
the token of the session

putAttribute

void putAttribute(String namespace,
                  String name,
                  Object attribute)
Put an attribute into the session.

Put an object into the session via a name string and namespace. Used to store objects that are associated with the session. Such as User Profile information.

Parameters:
namespace - a namespace used to distinguish a name (perhaps used by a particular application), from an identical name used in another context. If null, then use the "default" namespace.
name - the name of the attribute
attribute - The attribute to insert into the session

removeAttribute

void removeAttribute(String namespace,
                     String name)
Remove a attribute from the session

Parameters:
namespace - the namespace of the name/attribute pair
name - the name string of the value to remove


Generated on 10:38:35 AM April 14, 2011, © 1996-2010 Cafésoft LLC. All rights reserved.