org.apache.geronimo.clustering.wadi
Class BasicWADISessionManager

java.lang.Object
  extended by org.apache.geronimo.clustering.wadi.BasicWADISessionManager
All Implemented Interfaces:
SessionManager, WADISessionManager, GBeanLifecycle

public class BasicWADISessionManager
extends Object
implements GBeanLifecycle, SessionManager, WADISessionManager


Field Summary
static String GBEAN_ATTR_WADI_CONFIG_INFO
           
static GBeanInfo GBEAN_INFO
           
static String GBEAN_REF_BACKING_STRATEGY_FACTORY
           
static String GBEAN_REF_CLUSTER
           
 
Constructor Summary
BasicWADISessionManager(ClassLoader cl, WADISessionManagerConfigInfo configInfo, WADICluster cluster, org.codehaus.wadi.replication.strategy.BackingStrategyFactory backingStrategyFactory)
           
 
Method Summary
 Session createSession(String sessionId)
          Creates a Session having the specified sessionId.
 void doFail()
          Fails the GBean.
 void doStart()
          Starts the GBean.
 void doStop()
          Stops the target.
static GBeanInfo getGBeanInfo()
           
 org.codehaus.wadi.core.manager.Manager getManager()
           
 Node getNode()
          Gets the Node hosting this local SessionManager.
 Set<Node> getRemoteNodes()
          Gets the remote Nodes hosting the corresponding remote SessionManagers.
 void registerListener(SessionListener listener)
          Registers a migration listener.
 void unregisterListener(SessionListener listener)
          Unregisters a migration listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GBEAN_INFO

public static final GBeanInfo GBEAN_INFO

GBEAN_ATTR_WADI_CONFIG_INFO

public static final String GBEAN_ATTR_WADI_CONFIG_INFO
See Also:
Constant Field Values

GBEAN_REF_CLUSTER

public static final String GBEAN_REF_CLUSTER
See Also:
Constant Field Values

GBEAN_REF_BACKING_STRATEGY_FACTORY

public static final String GBEAN_REF_BACKING_STRATEGY_FACTORY
See Also:
Constant Field Values
Constructor Detail

BasicWADISessionManager

public BasicWADISessionManager(ClassLoader cl,
                               WADISessionManagerConfigInfo configInfo,
                               WADICluster cluster,
                               org.codehaus.wadi.replication.strategy.BackingStrategyFactory backingStrategyFactory)
Method Detail

doStart

public void doStart()
             throws Exception
Description copied from interface: GBeanLifecycle
Starts the GBean. This informs the GBean that it is about to transition to the running state.

Specified by:
doStart in interface GBeanLifecycle
Throws:
Exception - if the target failed to start; this will cause a transition to the failed state

doStop

public void doStop()
            throws Exception
Description copied from interface: GBeanLifecycle
Stops the target. This informs the GBean that it is about to transition to the stopped state.

Specified by:
doStop in interface GBeanLifecycle
Throws:
Exception - if the target failed to stop; this will cause a transition to the failed state

doFail

public void doFail()
Description copied from interface: GBeanLifecycle
Fails the GBean. This informs the GBean that it is about to transition to the failed state.

Specified by:
doFail in interface GBeanLifecycle

createSession

public Session createSession(String sessionId)
                      throws SessionAlreadyExistException
Description copied from interface: SessionManager
Creates a Session having the specified sessionId.

Specified by:
createSession in interface SessionManager
Parameters:
sessionId - Unique identifier of the Session instance.
Returns:
Session instance.
Throws:
SessionAlreadyExistException - Thrown when the provided sessiondId already exists in the Session space of this local SessionManager and its associated remote SessionManagers.

getManager

public org.codehaus.wadi.core.manager.Manager getManager()
Specified by:
getManager in interface WADISessionManager

getNode

public Node getNode()
Description copied from interface: SessionManager
Gets the Node hosting this local SessionManager.

Specified by:
getNode in interface SessionManager
Returns:
Hosting Node.

getRemoteNodes

public Set<Node> getRemoteNodes()
Description copied from interface: SessionManager
Gets the remote Nodes hosting the corresponding remote SessionManagers.

Specified by:
getRemoteNodes in interface SessionManager
Returns:
Hosting Node.

registerListener

public void registerListener(SessionListener listener)
Description copied from interface: SessionManager
Registers a migration listener.

Specified by:
registerListener in interface SessionManager

unregisterListener

public void unregisterListener(SessionListener listener)
Description copied from interface: SessionManager
Unregisters a migration listener.

Specified by:
unregisterListener in interface SessionManager

getGBeanInfo

public static GBeanInfo getGBeanInfo()


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.