Rio Project 4.2 API Documentation



org.rioproject.jsb
Class ServiceBeanContextManager

java.lang.Object
  extended by org.rioproject.jsb.ServiceBeanContextManager

public class ServiceBeanContextManager
extends Object

Manages a persistent ServiceBeanContext

Author:
Dennis Reedy

Nested Class Summary
 class ServiceBeanContextManager.ContextAttributeLogHandler
          Class which implements methods needed to meet the LogHandler interface
 
Constructor Summary
ServiceBeanContextManager(ServiceBeanContext context)
          Create a ServiceBeanContextManager
 
Method Summary
 ServiceBeanContextManager.ContextAttributeLogHandler getContextAttributeLogHandler()
          Get the ContextAttributeLogHandler object for this ServiceBeanContextManager
 ServiceBeanContext restoreContext(PersistentStore store)
          Set the PersistentStore to use for persisting the state of this service.
 void takeSnapshot(DiscoveryManagement dm)
          Delegates the snapshot to the ContextAttributeLogHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceBeanContextManager

public ServiceBeanContextManager(ServiceBeanContext context)
Create a ServiceBeanContextManager

Parameters:
context - ServiceBeanContext
Method Detail

getContextAttributeLogHandler

public ServiceBeanContextManager.ContextAttributeLogHandler getContextAttributeLogHandler()
Get the ContextAttributeLogHandler object for this ServiceBeanContextManager

Returns:
The ContextAttributeHandler

takeSnapshot

public void takeSnapshot(DiscoveryManagement dm)
                  throws Exception
Delegates the snapshot to the ContextAttributeLogHandler

Parameters:
dm - the DiscoveryManagement for the service
Throws:
Exception - can raise any exception

restoreContext

public ServiceBeanContext restoreContext(PersistentStore store)
                                  throws StoreException
Set the PersistentStore to use for persisting the state of this service. If there is a log directory that already exists at this location the persisted ServiceBeanContext state will be retrieved and returned.

Parameters:
store - The PersistentStore
Returns:
ServiceBeanContext the persisted ServiceBeanContext to use for service initialization. This value will be null if there is no context found
Throws:
StoreException - If the context cannot be restored

Copyright © Rio Project.

Copyright © 2006-2011 Rio Project. All Rights Reserved.