org.apache.tapestry.engine.state
Class ApplicationStateManagerImpl

java.lang.Object
  extended by org.apache.tapestry.engine.state.ApplicationStateManagerImpl
All Implemented Interfaces:
org.apache.hivemind.PoolManageable, ApplicationStateManager

public class ApplicationStateManagerImpl
extends Object
implements ApplicationStateManager, org.apache.hivemind.PoolManageable

This implementation expects to be pooled.

Since:
4.0
Author:
Howard M. Lewis Ship

Constructor Summary
ApplicationStateManagerImpl()
           
 
Method Summary
 void activateService()
           
 boolean exists(String objectName)
          Checks to see if the named object exists.
 void flush()
          Asks each StateObjectManager to store each object obtained.
 Object get(String objectName)
          Gets the named application state object, creating it if necessary.
 void passivateService()
           
 void setRegistry(StateObjectManagerRegistry registry)
           
 void store(String objectName, Object stateObject)
          Stores a new state object, replacing the old one.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationStateManagerImpl

public ApplicationStateManagerImpl()
Method Detail

activateService

public void activateService()
Specified by:
activateService in interface org.apache.hivemind.PoolManageable

passivateService

public void passivateService()
Specified by:
passivateService in interface org.apache.hivemind.PoolManageable

exists

public boolean exists(String objectName)
Description copied from interface: ApplicationStateManager
Checks to see if the named object exists.

Specified by:
exists in interface ApplicationStateManager
Parameters:
objectName - the name of the application state object
Returns:
True if the object with the specified name exists, false otherwise.

get

public Object get(String objectName)
Description copied from interface: ApplicationStateManager
Gets the named application state object, creating it if necessary.

Specified by:
get in interface ApplicationStateManager
Parameters:
objectName - the name of the application state object
Returns:
the object

store

public void store(String objectName,
                  Object stateObject)
Description copied from interface: ApplicationStateManager
Stores a new state object, replacing the old one. The new object may be null.

Specified by:
store in interface ApplicationStateManager
Parameters:
objectName - the name of the object to store
stateObject - the new object, possibly null

flush

public void flush()
Description copied from interface: ApplicationStateManager
Asks each StateObjectManager to store each object obtained.

Specified by:
flush in interface ApplicationStateManager

setRegistry

public void setRegistry(StateObjectManagerRegistry registry)


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.