JAC project
AOPSYS
CEDRIC & LIP6 labs

org.objectweb.jac.aspects.session
Class SessionAC

java.lang.Object
  |
  +--org.objectweb.jac.core.AspectComponent
        |
        +--org.objectweb.jac.aspects.session.SessionAC
All Implemented Interfaces:
BaseProgramListener, Serializable, SessionConf

public class SessionAC
extends AspectComponent
implements SessionConf

This aspect component handle the session aspect within JAC applications.

The session aspects memorizes some contextual informations as users id or password and link them to the current session id (the "Session.sid" attribute in the context). If the client correctly sets this attribute for each interaction, then the session aspect restores the saved information so that the user will not have to input extra information (such as his password) for each interaction.

Author:
Renaud Pawlak
See Also:
SessionWrapper, Serialized Form

Field Summary
static String INITIALIZED
           
static String SESSION_ID
           
 
Fields inherited from class org.objectweb.jac.core.AspectComponent
application, blockKeywords, firstCall, NOT_SHARED, SHARED, startWeavingCCount, startWeavingCount, startWeavingMethod, startWeavingType, systemListener, wrappers
 
Fields inherited from interface org.objectweb.jac.core.BaseProgramListener
FOUND_OBJECT
 
Constructor Summary
SessionAC()
           
 
Method Summary
 void clearCurrentSessionAttribute(String name)
           
 void declareStoredAttributes(String[] attributes)
          Add some attributes to the list of attributes of the context to be saved and restored by the session aspect.
 void definePerSessionObjects(String classExpr, String objectExpr)
          This configuration method defines per-session objects.
 void defineSessionHandlers(String classExpr, String methodExpr, String objectExpr)
          This configuration method tells which methods of which objects must handdle the sessions (wrapped by the session wrapper).
 String[] getDefaultConfigs()
          Returns defaults configuration files that must be loaded before the user's configuration
 String[] getStoredAttributes()
          Stored attributes accessor.
protected  SessionWrapper getWrapper()
           
 
Methods inherited from class org.objectweb.jac.core.AspectComponent
addWrapper, afterApplicationStarted, afterRunningWrapper, afterWrap, afterWrappeeInit, attr, attrdef, beforeConfiguration, beforeReload, beforeRunningWrapper, beforeWrappeeInit, configure, defines, defineTimer, doRegister, doUnregister, getApplication, getBlockKeywords, getConfigurationMethods, getConfigurationMethodsName, getConfigurationMethodsName, getName, getWrappers, init, isConfigurationMethod, isSystemListener, onExit, pointcut, pointcut, pointcut, pointcut, pointcut, pointcut, pointcut, pointcut, setApplication, setAttribute, setAttribute, setAttribute, setSystemListener, simulateUsingNewInstance, unweave, unwrapAll, weave, whenClone, whenCloseDisplay, whenConfigured, whenDeleted, whenDeserialized, whenFree, whenGetObjects, whenNameObject, whenObjectMiss, whenReload, whenRemoteInstantiation, whenSerialized, whenTopologyChanged, whenUsingNewClass, whenUsingNewInstance, whenUsingNewInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SESSION_ID

public static final String SESSION_ID
See Also:
Constant Field Values

INITIALIZED

public static final String INITIALIZED
See Also:
Constant Field Values
Constructor Detail

SessionAC

public SessionAC()
Method Detail

getDefaultConfigs

public String[] getDefaultConfigs()
Description copied from class: AspectComponent
Returns defaults configuration files that must be loaded before the user's configuration

Overrides:
getDefaultConfigs in class AspectComponent

clearCurrentSessionAttribute

public void clearCurrentSessionAttribute(String name)

getWrapper

protected SessionWrapper getWrapper()

defineSessionHandlers

public void defineSessionHandlers(String classExpr,
                                  String methodExpr,
                                  String objectExpr)
Description copied from interface: SessionConf
This configuration method tells which methods of which objects must handdle the sessions (wrapped by the session wrapper).

Specified by:
defineSessionHandlers in interface SessionConf
Parameters:
classExpr - a class pointcut expression
methodExpr - a method pointcut expression
objectExpr - an object pointcut expression
See Also:
SessionWrapper

definePerSessionObjects

public void definePerSessionObjects(String classExpr,
                                    String objectExpr)
Description copied from interface: SessionConf
This configuration method defines per-session objects.

A per-session object is an object that have a different state depending on the session. Each user will see a different state for the same object.

Warning: this feature is not compatible with persistent objects!

Specified by:
definePerSessionObjects in interface SessionConf
Parameters:
classExpr - a class pointcut expression
objectExpr - an object pointcut expression
See Also:
SessionWrapper

declareStoredAttributes

public void declareStoredAttributes(String[] attributes)
Description copied from interface: SessionConf
Add some attributes to the list of attributes of the context to be saved and restored by the session aspect.

Specified by:
declareStoredAttributes in interface SessionConf
Parameters:
attributes - names of attributes

getStoredAttributes

public String[] getStoredAttributes()
Stored attributes accessor.

Returns:
the stored attributes

Contact JAC development team:
Renaud Pawlak
Lionel Seinturier
Laurent Martelli