JAC project
AOPSYS
CEDRIC & LIP6 labs

org.objectweb.jac.aspects.session
Class SessionWrapper

java.lang.Object
  |
  +--org.objectweb.jac.core.Wrapper
        |
        +--org.objectweb.jac.aspects.session.SessionWrapper
All Implemented Interfaces:
Serializable

public class SessionWrapper
extends Wrapper

This wrapper handles the session for each object within the JAC system.

Author:
Renaud Pawlak
See Also:
handleSession(Interaction), Serialized Form

Field Summary
protected static Hashtable applications
          Stores the applications (sid -> applicationName)
protected static Hashtable sessions
          Stores the sessions and their contextual attributes (sid -> saved attributes).
 
Fields inherited from class org.objectweb.jac.core.Wrapper
ac
 
Constructor Summary
SessionWrapper(AspectComponent ac)
           
 
Method Summary
 void clearCurrentSessionAttribute(String name)
          Removes a session attribute.
 Object handleSession(Interaction interaction)
          Handles sessions for the wrapped method.
 
Methods inherited from class org.objectweb.jac.core.Wrapper
attr, attrdef, defines, getAspectComponent, getAspectComponentName, getExceptionHandlers, proceed, setAspectComponent, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sessions

protected static Hashtable sessions
Stores the sessions and their contextual attributes (sid -> saved attributes).


applications

protected static Hashtable applications
Stores the applications (sid -> applicationName)

Constructor Detail

SessionWrapper

public SessionWrapper(AspectComponent ac)
Method Detail

clearCurrentSessionAttribute

public void clearCurrentSessionAttribute(String name)
Removes a session attribute.

The given attribute will be forgotten for the current interaction and for all the forthcoming interactions of the same session. This can be used for instance to log-out a user.

Parameters:
name - the name of the attribute to forget

handleSession

public Object handleSession(Interaction interaction)
Handles sessions for the wrapped method.

The session handling algorithm is:

Returns:
the wrapped method return value

Contact JAC development team:
Renaud Pawlak
Lionel Seinturier
Laurent Martelli