JAC project
AOPSYS
CEDRIC & LIP6 labs

org.objectweb.jac.aspects.session
Class PerSessionObjectWrapper

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

public class PerSessionObjectWrapper
extends Wrapper

This wrapper handles per-session objects within the JAC system.

For each session, it uses a different copy of the original object so that each client see a different state.

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

Field Summary
 
Fields inherited from class org.objectweb.jac.core.Wrapper
ac
 
Constructor Summary
PerSessionObjectWrapper(AspectComponent ac)
           
 
Method Summary
 Object handlePerSessionObject(Interaction interaction)
          This wrapping method handles an hashtable of copied objects.
 
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
 

Constructor Detail

PerSessionObjectWrapper

public PerSessionObjectWrapper(AspectComponent ac)
Method Detail

handlePerSessionObject

public Object handlePerSessionObject(Interaction interaction)
This wrapping method handles an hashtable of copied objects.

There is one copied object per session with possibly a different state from the original. The call is thus forwarded to the copy that corresponds to the session.

The first time, the original object is cloned so that its state is that same as the original.

Returns:
the result given by the per-session copy

Contact JAC development team:
Renaud Pawlak
Lionel Seinturier
Laurent Martelli