org.apache.geronimo.messaging.remotenode
Interface RemoteNodeManager

All Superinterfaces:
MsgConsumer
All Known Implementing Classes:
RemoteNodeManagerImpl

public interface RemoteNodeManager
extends MsgConsumer

RemoteNode manager.

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

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.
 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 interface org.apache.geronimo.messaging.MsgConsumer
getMsgConsumerOut
 

Method Detail

start

public void start()
           throws NodeException
Starts the manager.

Throws:
NodeException

stop

public void stop()
          throws NodeException
Stops the manager.

Throws:
NodeException

prepareTopology

public void prepareTopology(NodeTopology aTopology)
                     throws NodeException
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.

Parameters:
aTopology - Topology.
Throws:
NodeException - Indicates that the topology can not be prepared.

commitTopology

public void commitTopology()
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.


addListener

public void addListener(RemoteNodeEventListener aListener)
Adds a listener for RemoteNode event.

Parameters:
aListener - Listener.

removeListener

public void removeListener(RemoteNodeEventListener aListener)
Removes a listener for RemoteNode event.

Parameters:
aListener - Listener.

leaveRemoteNode

public void leaveRemoteNode(NodeInfo aNodeInfo)
Leaves a remote node.

Parameters:
aNodeInfo - Meta-data of the node to be left.

findOrJoinRemoteNode

public RemoteNode findOrJoinRemoteNode(NodeInfo aNodeInfo)
                                throws NodeException
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.

Parameters:
aNodeInfo - Remote node.
Returns:
RemoteNode.
Throws:
NodeException
CommunicationException - Indicates that the specified node can not be joined.

findRemoteNode

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

Parameters:
aNodeInfo - Remote node.
Returns:

registerRemoteNode

public void registerRemoteNode(RemoteNode aRemoteNode)
Registers a remote node.

Parameters:
aRemoteNode - Remote node to be registered.

unregisterRemoteNode

public void unregisterRemoteNode(RemoteNode aRemoteNode)
Unregistered a remote node.

Parameters:
aRemoteNode - Remote node to be unregistered.

listRemoteNodes

public Collection listRemoteNodes()
Gets the registered remote nodes.

Returns:
Collection of RemoteNodes.


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