org.apache.jetspeed.services.statemanager
Class JetspeedHttpStateManagerService
java.lang.Object
org.apache.turbine.services.BaseInitable
org.apache.turbine.services.BaseService
org.apache.turbine.services.TurbineBaseService
org.apache.jetspeed.services.statemanager.BaseStateManagerService
org.apache.jetspeed.services.statemanager.JetspeedHttpStateManagerService
- All Implemented Interfaces:
- org.apache.turbine.services.Initable, org.apache.turbine.services.Service, StateManagerService
- public class JetspeedHttpStateManagerService
- extends BaseStateManagerService
JetspeedHttpStateManagerService is an implementation of the BaseStateManagerService
which manages the states stored in the "current" HttpSession.
Note: This implementation of the StateManagerService takes advantage of the
Servlet container's management of the HttpSession.
When the session is invalidated, the states we manage will be automatically cleaned up.
When this happens, the objects placed into our states will have their
SessionStateBindingListener mechanism invoked.
Note: This implementation segments the states by session. States created in one session will NOT BE AVAILABLE
from other sessions.
- Version:
- $Revision: 1.4 $
- Author:
- Glenn R. Golden
- See Also:
BaseStateManagerService
,
StateManagerService
,
SessionState
Fields inherited from class org.apache.turbine.services.BaseService |
configuration, name, properties, serviceBroker |
Fields inherited from class org.apache.turbine.services.BaseInitable |
initableBroker, isInitialized |
Fields inherited from interface org.apache.turbine.services.Service |
SERVICE_NAME |
Method Summary |
protected void |
addState(java.lang.String key,
java.util.Map state)
Add a new state to the states we are managing. |
protected java.util.Map |
getState(java.lang.String key)
Access the Map which is the set of attributes for a state. |
protected java.lang.String[] |
getStateKeys(java.lang.String start)
Access an array of the keys of all states managed, those that start with the parameter. |
protected void |
initStates()
Initialize the states storage. |
protected void |
removeState(java.lang.String key)
Remove a state from the states we are managing. |
protected void |
shutdownStates()
Cleanup the states storage. |
Methods inherited from class org.apache.jetspeed.services.statemanager.BaseStateManagerService |
bindAttributeValue, clear, clearCurrentContext, getAttribute, getAttributeNames, getCurrentSessionState, getCurrentSessionState, getSessionState, init, init, init, removeAttribute, retireAttributes, retireState, setAttribute, setCurrentContext, shutdown, unBindAttributeValue |
Methods inherited from class org.apache.turbine.services.TurbineBaseService |
init |
Methods inherited from class org.apache.turbine.services.BaseService |
getConfiguration, getName, getProperties, getServiceBroker, setName, setServiceBroker |
Methods inherited from class org.apache.turbine.services.BaseInitable |
getInit, getInitableBroker, setInit, setInitableBroker |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.turbine.services.Initable |
getInit, setInitableBroker |
JetspeedHttpStateManagerService
public JetspeedHttpStateManagerService()
initStates
protected void initStates()
- Initialize the states storage.
- Specified by:
initStates
in class BaseStateManagerService
shutdownStates
protected void shutdownStates()
- Cleanup the states storage.
- Specified by:
shutdownStates
in class BaseStateManagerService
getState
protected java.util.Map getState(java.lang.String key)
- Access the Map which is the set of attributes for a state.
- Specified by:
getState
in class BaseStateManagerService
- Parameters:
key
- The state key.
- Returns:
- The Map which is the set of attributes for a state.
addState
protected void addState(java.lang.String key,
java.util.Map state)
- Add a new state to the states we are managing.
- Specified by:
addState
in class BaseStateManagerService
- Parameters:
key
- The state key.state
- The Map which is the set of attributes for the state.
removeState
protected void removeState(java.lang.String key)
- Remove a state from the states we are managing.
- Specified by:
removeState
in class BaseStateManagerService
- Parameters:
key
- The state key.
getStateKeys
protected java.lang.String[] getStateKeys(java.lang.String start)
- Access an array of the keys of all states managed, those that start with the parameter.
- Specified by:
getStateKeys
in class BaseStateManagerService
- Parameters:
start
- The starting string used to select the keys.
- Returns:
- an array of the keys of all states managed.
Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.