org.objectweb.jac.aspects.session
Class PerSessionObjectWrapper
java.lang.Object
|
+--org.objectweb.jac.core.Wrapper
|
+--org.objectweb.jac.aspects.session.PerSessionObjectWrapper
- All Implemented Interfaces:
- Advice, ConstructorInterceptor, Interceptor, MethodInterceptor, 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
Fields inherited from class org.objectweb.jac.core.Wrapper |
ac, cr |
PerSessionObjectWrapper
public PerSessionObjectWrapper(AspectComponent ac)
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
invoke
public Object invoke(MethodInvocation invocation)
throws Throwable
- Specified by:
invoke
in interface MethodInterceptor
- Overrides:
invoke
in class Wrapper
Throwable
construct
public Object construct(ConstructorInvocation invocation)
throws Throwable
- Specified by:
construct
in interface ConstructorInterceptor
- Overrides:
construct
in class Wrapper
Throwable