org.apache.geronimo.messaging.remotenode
Class RemoteNodeManagerImpl

java.lang.Object
  extended byorg.apache.geronimo.messaging.remotenode.RemoteNodeManagerImpl
All Implemented Interfaces:
MsgConsumer, RemoteNodeManager

public class RemoteNodeManagerImpl
extends Object
implements RemoteNodeManager

RemoteNode implementation.

Version:
$Revision: 1.8 $ $Date: 2004/07/20 00:15:06 $

Constructor Summary
RemoteNodeManagerImpl(NodeInfo aNodeInfo, IOContext anIOContext, org.apache.geronimo.pool.ClockPool aClockPool, MessagingTransportFactory aFactory)
           
 
Method Summary
 void addListener(RemoteNodeEventListener aListener)
          Adds a listener for RemoteNode event.
 void commitTopology()
          Commits the Topology which has been previously prepared.
 RemoteNode findOrJoinRemoteNode(NodeInfo aNodeInfo)
          Finds or joins a remote node.
 RemoteNode findRemoteNode(NodeInfo aNodeInfo)
          Finds a remote node.
 MsgOutInterceptor getMsgConsumerOut()
          Gets a mean to push Msgs to this instance.
 void leaveRemoteNode(NodeInfo aNodeInfo)
          Leaves a remote node.
 Collection listRemoteNodes()
          Gets the registered remote nodes.
 void prepareTopology(NodeTopology aTopology)
          Prepares the Topology to be used to derive the path between two nodes.
 void registerRemoteNode(RemoteNode aRemoteNode)
          Registers a remote node.
 void removeListener(RemoteNodeEventListener aListener)
          Removes a listener for RemoteNode event.
 void start()
          Starts the manager.
 void stop()
          Stops the manager.
 void unregisterRemoteNode(RemoteNode aRemoteNode)
          Unregistered a remote node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteNodeManagerImpl

public RemoteNodeManagerImpl(NodeInfo aNodeInfo,
                             IOContext anIOContext,
                             org.apache.geronimo.pool.ClockPool aClockPool,
                             MessagingTransportFactory aFactory)
Method Detail

start

public void start()
           throws NodeException
Description copied from interface: RemoteNodeManager
Starts the manager.

Specified by:
start in interface RemoteNodeManager
Throws:
NodeException

stop

public void stop()
          throws NodeException
Description copied from interface: RemoteNodeManager
Stops the manager.

Specified by:
stop in interface RemoteNodeManager
Throws:
NodeException

prepareTopology

public void prepareTopology(NodeTopology aTopology)
                     throws NodeException
Description copied from interface: RemoteNodeManager
Prepares the Topology to be used to derive the path between two nodes.
When the topology is prepared, the manager tries to "apply" it: it creates physical connections to all of its neighbours as defined by the specified topology. Physical connections no more required by the topology should not be dropped. These latter should be dropped only if the topology is committed.

Specified by:
prepareTopology in interface RemoteNodeManager
Parameters:
aTopology - Topology.
Throws:
NodeException - Indicates that the topology can not be prepared.

commitTopology

public void commitTopology()
Description copied from interface: RemoteNodeManager
Commits the Topology which has been previously prepared.
When a topology is committed, the physical connections defined by the previous topology and not by the one to be committed are dropped.

Specified by:
commitTopology in interface RemoteNodeManager

addListener

public void addListener(RemoteNodeEventListener aListener)
Description copied from interface: RemoteNodeManager
Adds a listener for RemoteNode event.

Specified by:
addListener in interface RemoteNodeManager
Parameters:
aListener - Listener.

removeListener

public void removeListener(RemoteNodeEventListener aListener)
Description copied from interface: RemoteNodeManager
Removes a listener for RemoteNode event.

Specified by:
removeListener in interface RemoteNodeManager
Parameters:
aListener - Listener.

leaveRemoteNode

public void leaveRemoteNode(NodeInfo aNodeInfo)
Description copied from interface: RemoteNodeManager
Leaves a remote node.

Specified by:
leaveRemoteNode in interface RemoteNodeManager
Parameters:
aNodeInfo - Meta-data of the node to be left.

findOrJoinRemoteNode

public RemoteNode findOrJoinRemoteNode(NodeInfo aNodeInfo)
                                throws NodeException
Description copied from interface: RemoteNodeManager
Finds or joins a remote node.
If the remote node aNodeInfo is not already registered by this manager, then it is joined by this manager.

Specified by:
findOrJoinRemoteNode in interface RemoteNodeManager
Parameters:
aNodeInfo - Remote node.
Returns:
RemoteNode.
Throws:
NodeException

findRemoteNode

public RemoteNode findRemoteNode(NodeInfo aNodeInfo)
Description copied from interface: RemoteNodeManager
Finds a remote node.
If the remote node aNodeInfo is not registered, then no attempt is done to join it.

Specified by:
findRemoteNode in interface RemoteNodeManager
Parameters:
aNodeInfo - Remote node.
Returns:

registerRemoteNode

public void registerRemoteNode(RemoteNode aRemoteNode)
Description copied from interface: RemoteNodeManager
Registers a remote node.

Specified by:
registerRemoteNode in interface RemoteNodeManager
Parameters:
aRemoteNode - Remote node to be registered.

unregisterRemoteNode

public void unregisterRemoteNode(RemoteNode aRemoteNode)
Description copied from interface: RemoteNodeManager
Unregistered a remote node.

Specified by:
unregisterRemoteNode in interface RemoteNodeManager
Parameters:
aRemoteNode - Remote node to be unregistered.

listRemoteNodes

public Collection listRemoteNodes()
Description copied from interface: RemoteNodeManager
Gets the registered remote nodes.

Specified by:
listRemoteNodes in interface RemoteNodeManager
Returns:
Collection of RemoteNodes.

getMsgConsumerOut

public MsgOutInterceptor getMsgConsumerOut()
Description copied from interface: MsgConsumer
Gets a mean to push Msgs to this instance.

Specified by:
getMsgConsumerOut in interface MsgConsumer
Returns:
Mean to push Msgs to this consumer of Msgs.


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