|
|||||||||
| Home >> All >> org >> mortbay >> j2ee >> [ session overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.mortbay.j2ee.session
Class StateInterceptor

java.lang.Objectorg.mortbay.j2ee.session.StateInterceptor
- All Implemented Interfaces:
- java.lang.Cloneable, State
- Direct Known Subclasses:
- ActivationInterceptor, AroundInterceptor, BindingInterceptor, DebugInterceptor, MarshallingInterceptor, MigrationInterceptor, PublishingInterceptor, SubscribingInterceptor, SynchronizationInterceptor, SynchronizingInterceptor, ThrottleInterceptor, TypeCheckingInterceptor
- public class StateInterceptor
- extends java.lang.Object
- implements State, java.lang.Cloneable
- extends java.lang.Object
Superlass for StateInterceptors - objects which wrap-n-delegate/decorate a State instance. A stack of StateInterceptors form a StateContainer.
- Version:
- 1.0
| Field Summary | |
private static java.lang.ThreadLocal |
_manager
|
private static java.lang.ThreadLocal |
_session
|
private State |
_state
|
| Constructor Summary | |
StateInterceptor()
|
|
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
_manager
private static final java.lang.ThreadLocal _manager
_session
private static final java.lang.ThreadLocal _session
_state
private State _state
| Constructor Detail |
StateInterceptor
public StateInterceptor()
| Method Detail |
getManager
protected Manager getManager()
setManager
protected void setManager(Manager manager)
getSession
protected javax.servlet.http.HttpSession getSession()
setSession
protected void setSession(javax.servlet.http.HttpSession session)
getState
protected State getState()
setState
protected void setState(State state)
start
public void start()
stop
public void stop()
toString
public java.lang.String toString()
- Description copied from class:
java.lang.Object - Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into System.out.println() 55
and such.
It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.
This method will be called when performing string concatenation with this object. If the result is
null, string concatenation will instead use"null".The default implementation returns
getClass().getName() + "@" + Integer.toHexString(hashCode()).
getId
public java.lang.String getId() throws java.rmi.RemoteException
getActualMaxInactiveInterval
public int getActualMaxInactiveInterval()
throws java.rmi.RemoteException
- Specified by:
getActualMaxInactiveIntervalin interfaceState
getCreationTime
public long getCreationTime()
throws java.rmi.RemoteException
- Specified by:
getCreationTimein interfaceState
getAttributes
public java.util.Map getAttributes() throws java.rmi.RemoteException
- Specified by:
getAttributesin interfaceState
setAttributes
public void setAttributes(java.util.Map attributes) throws java.rmi.RemoteException
- Specified by:
setAttributesin interfaceState
getLastAccessedTime
public long getLastAccessedTime()
throws java.rmi.RemoteException
- Specified by:
getLastAccessedTimein interfaceState
setLastAccessedTime
public void setLastAccessedTime(long time)
throws java.rmi.RemoteException
- Specified by:
setLastAccessedTimein interfaceState
getMaxInactiveInterval
public int getMaxInactiveInterval()
throws java.rmi.RemoteException
- Specified by:
getMaxInactiveIntervalin interfaceState
setMaxInactiveInterval
public void setMaxInactiveInterval(int interval)
throws java.rmi.RemoteException
- Specified by:
setMaxInactiveIntervalin interfaceState
getAttribute
public java.lang.Object getAttribute(java.lang.String name) throws java.rmi.RemoteException
- Specified by:
getAttributein interfaceState
setAttribute
public java.lang.Object setAttribute(java.lang.String name, java.lang.Object value, boolean returnValue) throws java.rmi.RemoteException
- Specified by:
setAttributein interfaceState
removeAttribute
public java.lang.Object removeAttribute(java.lang.String name, boolean returnValue) throws java.rmi.RemoteException
- Specified by:
removeAttributein interfaceState
getAttributeNameEnumeration
public java.util.Enumeration getAttributeNameEnumeration() throws java.rmi.RemoteException
- Specified by:
getAttributeNameEnumerationin interfaceState
getAttributeNameStringArray
public java.lang.String[] getAttributeNameStringArray() throws java.rmi.RemoteException
- Specified by:
getAttributeNameStringArrayin interfaceState
isValid
public boolean isValid()
throws java.rmi.RemoteException
clone
public java.lang.Object clone()
- Description copied from class:
java.lang.Object - This method may be called to create a new copy of the
Object. The typical behavior is as follows:
o == o.clone()is falseo.getClass() == o.clone().getClass()is trueo.equals(o)is true
However, these are not strict requirements, and may be violated if necessary. Of the three requirements, the last is the most commonly violated, particularly if the subclass does not override Object.equals(Object)>
Object.equals(Object)55 .If the Object you call clone() on does not implement java.lang.Cloneable (which is a placeholder interface), then a CloneNotSupportedException is thrown. Notice that Object does not implement Cloneable; this method exists as a convenience for subclasses that do.
Object's implementation of clone allocates space for the new Object using the correct class, without calling any constructors, and then fills in all of the new field values with the old field values. Thus, it is a shallow copy. However, subclasses are permitted to make a deep copy.
All array types implement Cloneable, and override this method as follows (it should never fail):
public Object clone() { try { super.clone(); } catch (CloneNotSupportedException e) { throw new InternalError(e.getMessage()); } }
|
|||||||||
| Home >> All >> org >> mortbay >> j2ee >> [ session overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.mortbay.j2ee.session.StateInterceptor