org.apache.jetspeed.services.statemanager
Class JetspeedStateManagerService

java.lang.Object
  extended byorg.apache.turbine.services.BaseInitable
      extended byorg.apache.turbine.services.BaseService
          extended byorg.apache.turbine.services.TurbineBaseService
              extended byorg.apache.jetspeed.services.statemanager.BaseStateManagerService
                  extended byorg.apache.jetspeed.services.statemanager.JetspeedStateManagerService
All Implemented Interfaces:
org.apache.turbine.services.Initable, org.apache.turbine.services.Service, StateManagerService

public class JetspeedStateManagerService
extends BaseStateManagerService

JetspeedStateManagerService is an implementation of the BaseStateManagerService which manages the states stored in a local Map (synchronized HashMap).

Note: This implementation of the StateManagerService is independent of all other services; but it has no automatic way to retire no longer used state. If the application does not explicitly retire the states created, they will hang around forever. (see clear() and retireState() of the StateManagerService).

Version:
$Revision: 1.6 $
Author:
Glenn R. Golden
See Also:
BaseStateManagerService, StateManagerService, SessionState

Field Summary
 
Fields inherited from class org.apache.jetspeed.services.statemanager.BaseStateManagerService
m_httpSessions
 
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.jetspeed.services.statemanager.StateManagerService
SERVICE_NAME
 
Fields inherited from interface org.apache.turbine.services.Service
SERVICE_NAME
 
Constructor Summary
JetspeedStateManagerService()
           
 
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
 

Constructor Detail

JetspeedStateManagerService

public JetspeedStateManagerService()
Method Detail

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.