org.apache.geronimo.clustering.wadi
Class BasicWADICluster

java.lang.Object
  extended by org.apache.geronimo.clustering.wadi.BasicWADICluster
All Implemented Interfaces:
Cluster, WADICluster, GBeanLifecycle

public class BasicWADICluster
extends Object
implements GBeanLifecycle, WADICluster


Nested Class Summary
protected  class BasicWADICluster.GeronimoClusterListenerAdaptor
           
 
Field Summary
static GBeanInfo GBEAN_INFO
           
static String GBEAN_REF_DISPATCHER_HOLDER
           
static String GBEAN_REF_NODE
           
 
Constructor Summary
BasicWADICluster(Node node, DispatcherHolder dispatcherHolder)
           
BasicWADICluster(Node node, DispatcherHolder dispatcherHolder, NodeFactory nodeFactory)
           
 
Method Summary
 void addClusterListener(ClusterListener listener)
           
protected  void clearListeners()
           
 void doFail()
          Fails the GBean.
 void doStart()
          Starts the GBean.
 void doStop()
          Stops the target.
 org.codehaus.wadi.group.Cluster getCluster()
           
static GBeanInfo getGBeanInfo()
           
 Node getLocalNode()
           
 String getName()
           
 Set<Node> getRemoteNodes()
           
protected  Node newRemoteNode(org.codehaus.wadi.group.Peer peer)
           
 void removeClusterListener(ClusterListener listener)
           
protected  Set<Node> wrapAsNode(Collection<org.codehaus.wadi.group.Peer> peers, boolean remove)
           
protected  Node wrapAsNode(org.codehaus.wadi.group.Peer peer, boolean remove)
           
 
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_REF_NODE

public static final String GBEAN_REF_NODE
See Also:
Constant Field Values

GBEAN_REF_DISPATCHER_HOLDER

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

BasicWADICluster

public BasicWADICluster(Node node,
                        DispatcherHolder dispatcherHolder)

BasicWADICluster

public BasicWADICluster(Node node,
                        DispatcherHolder dispatcherHolder,
                        NodeFactory nodeFactory)
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

getCluster

public org.codehaus.wadi.group.Cluster getCluster()
Specified by:
getCluster in interface WADICluster

getName

public String getName()
Specified by:
getName in interface Cluster

getLocalNode

public Node getLocalNode()
Specified by:
getLocalNode in interface Cluster

getRemoteNodes

public Set<Node> getRemoteNodes()
Specified by:
getRemoteNodes in interface Cluster

addClusterListener

public void addClusterListener(ClusterListener listener)
Specified by:
addClusterListener in interface Cluster

removeClusterListener

public void removeClusterListener(ClusterListener listener)
Specified by:
removeClusterListener in interface Cluster

clearListeners

protected void clearListeners()

wrapAsNode

protected Set<Node> wrapAsNode(Collection<org.codehaus.wadi.group.Peer> peers,
                               boolean remove)

wrapAsNode

protected Node wrapAsNode(org.codehaus.wadi.group.Peer peer,
                          boolean remove)

newRemoteNode

protected Node newRemoteNode(org.codehaus.wadi.group.Peer peer)

getGBeanInfo

public static GBeanInfo getGBeanInfo()


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