org.mortbay.j2ee.session
Class StateInterceptor

java.lang.Object
  extended by org.mortbay.j2ee.session.StateInterceptor
All Implemented Interfaces:
Cloneable, State
Direct Known Subclasses:
AroundInterceptor

public class StateInterceptor
extends Object
implements State, Cloneable

Superlass for StateInterceptors - objects which wrap-n-delegate/decorate a State instance. A stack of StateInterceptors form a StateContainer.

Version:
1.0
Author:
Jules Gosnell

Constructor Summary
StateInterceptor()
           
 
Method Summary
 Object clone()
           
 int getActualMaxInactiveInterval()
           
 Object getAttribute(String name)
           
 Enumeration getAttributeNameEnumeration()
           
 String[] getAttributeNameStringArray()
           
 Map getAttributes()
           
 long getCreationTime()
           
 String getId()
           
 long getLastAccessedTime()
           
protected  Manager getManager()
           
 int getMaxInactiveInterval()
           
protected  javax.servlet.http.HttpSession getSession()
           
protected  State getState()
           
 boolean isValid()
           
 Object removeAttribute(String name, boolean returnValue)
           
 Object setAttribute(String name, Object value, boolean returnValue)
           
 void setAttributes(Map attributes)
           
 void setLastAccessedTime(long time)
           
protected  void setManager(Manager manager)
           
 void setMaxInactiveInterval(int interval)
           
protected  void setSession(javax.servlet.http.HttpSession session)
           
protected  void setState(State state)
           
 void start()
           
 void stop()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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 String toString()
Overrides:
toString in class Object

getId

public String getId()
             throws RemoteException
Specified by:
getId in interface State
Throws:
RemoteException

getActualMaxInactiveInterval

public int getActualMaxInactiveInterval()
                                 throws RemoteException
Specified by:
getActualMaxInactiveInterval in interface State
Throws:
RemoteException

getCreationTime

public long getCreationTime()
                     throws RemoteException
Specified by:
getCreationTime in interface State
Throws:
RemoteException

getAttributes

public Map getAttributes()
                  throws RemoteException
Specified by:
getAttributes in interface State
Throws:
RemoteException

setAttributes

public void setAttributes(Map attributes)
                   throws RemoteException
Specified by:
setAttributes in interface State
Throws:
RemoteException

getLastAccessedTime

public long getLastAccessedTime()
                         throws RemoteException
Specified by:
getLastAccessedTime in interface State
Throws:
RemoteException

setLastAccessedTime

public void setLastAccessedTime(long time)
                         throws RemoteException
Specified by:
setLastAccessedTime in interface State
Throws:
RemoteException

getMaxInactiveInterval

public int getMaxInactiveInterval()
                           throws RemoteException
Specified by:
getMaxInactiveInterval in interface State
Throws:
RemoteException

setMaxInactiveInterval

public void setMaxInactiveInterval(int interval)
                            throws RemoteException
Specified by:
setMaxInactiveInterval in interface State
Throws:
RemoteException

getAttribute

public Object getAttribute(String name)
                    throws RemoteException
Specified by:
getAttribute in interface State
Throws:
RemoteException

setAttribute

public Object setAttribute(String name,
                           Object value,
                           boolean returnValue)
                    throws RemoteException
Specified by:
setAttribute in interface State
Throws:
RemoteException

removeAttribute

public Object removeAttribute(String name,
                              boolean returnValue)
                       throws RemoteException
Specified by:
removeAttribute in interface State
Throws:
RemoteException

getAttributeNameEnumeration

public Enumeration getAttributeNameEnumeration()
                                        throws RemoteException
Specified by:
getAttributeNameEnumeration in interface State
Throws:
RemoteException

getAttributeNameStringArray

public String[] getAttributeNameStringArray()
                                     throws RemoteException
Specified by:
getAttributeNameStringArray in interface State
Throws:
RemoteException

isValid

public boolean isValid()
                throws RemoteException
Specified by:
isValid in interface State
Throws:
RemoteException

clone

public Object clone()
Overrides:
clone in class Object


Copyright © 1995-2011 Mort Bay Consulting. All Rights Reserved.