java.lang.Object
org.mortbay.j2ee.session.StateInterceptor
org.mortbay.j2ee.session.BindingInterceptor
- All Implemented Interfaces:
- java.lang.Cloneable, State
- public class BindingInterceptor
- extends StateInterceptor
A BindingInterceptor is responsible for notifying
HttpSessionAttributeListeners when Attributes are added to, removed
from or replaced in a Session and HttpSessionBindingListeners when
attributes are bound into or unbound from a Session.
This is
an expensive Interceptor to use since it requires that on rebinding
an attribute in the Session, the old value is returned in case it
is a Listener requiring notification of it's removal.If you are
using a distributed store, this requirement will result in a
serialisation and network traffic overhead which may not actually
be necessary. Unfortunately it would be expensive to decide at
runtime whether to add this interceptor since one of these
Listeners might be bound into the session at any time from any
node. This may be addressed in a future release.
- Version:
- 1.0
| Methods inherited from class org.mortbay.j2ee.session.StateInterceptor |
clone, getActualMaxInactiveInterval, getAttribute, getAttributeNameEnumeration, getAttributeNameStringArray, getAttributes, getCreationTime, getId, getLastAccessedTime, getManager, getMaxInactiveInterval, getSession, getState, isValid, setAttributes, setLastAccessedTime, setManager, setMaxInactiveInterval, setSession, setState, start, stop, toString |
_log
protected static final org.jboss.logging.Logger _log
BindingInterceptor
public BindingInterceptor()
notifyValueUnbound
protected java.lang.Object notifyValueUnbound(java.lang.String name,
java.lang.Object value)
notifyValueBound
protected java.lang.Object notifyValueBound(java.lang.String name,
java.lang.Object value)
setAttribute
public java.lang.Object setAttribute(java.lang.String name,
java.lang.Object value,
boolean returnValue)
throws java.rmi.RemoteException
setAttribute is overriden in order to notify
HttpSessionAttribute and HttpSessionBindingListeners of relative
Attribute changes.
- Specified by:
setAttribute in interface State- Overrides:
setAttribute in class StateInterceptor
removeAttribute
public java.lang.Object removeAttribute(java.lang.String name,
boolean returnValue)
throws java.rmi.RemoteException
removeAttribute is overriden in order to notify
HttpSessionAttribute and HttpSessionBindingListeners of relative
Attribute changes.
- Specified by:
removeAttribute in interface State- Overrides:
removeAttribute in class StateInterceptor