org.apache.geronimo.messaging
Interface NodeTopology

All Superinterfaces:
Serializable

public interface NodeTopology
extends Serializable

Abstracts the topology of a set of nodes.
This is a Serializable as it is exchanged between nodes.

Version:
$Revision: 1.5 $ $Date: 2004/07/20 00:26:03 $

Method Summary
 int getIDOfNode(NodeInfo aNodeInfo)
          Gets the identifier of the provided node in the specified topology.
 Set getNeighbours(NodeInfo aRoot)
          Gets the neighbours of the specified node.
 NodeInfo getNodeById(int anId)
          Gets the NodeInfo having the specified identifier.
 Set getNodes()
          Gets the NodeInfo registered by this topology.
 NodeInfo[] getPath(NodeInfo aSource, NodeInfo aTarget)
          Gets a path between aSource and aTarget.
 int getVersion()
          Gets the version of this topology.
 

Method Detail

getVersion

public int getVersion()
Gets the version of this topology.
0 is a reserved value and must not be used.

Returns:
version number.

getNeighbours

public Set getNeighbours(NodeInfo aRoot)
Gets the neighbours of the specified node. They are the nodes directly reachable from aRoot.

Parameters:
aRoot - Node.
Returns:
Set Neighbours. An empty Set must be returned if the specified node is not registered by this topology.

getPath

public NodeInfo[] getPath(NodeInfo aSource,
                          NodeInfo aTarget)
Gets a path between aSource and aTarget.

Parameters:
aSource - Source node.
aTarget - Target node.
Returns:
Nodes to be traversed to reach aTarget from aSource. null is returned if these two nodes are not connected.

getIDOfNode

public int getIDOfNode(NodeInfo aNodeInfo)
Gets the identifier of the provided node in the specified topology.

Parameters:
aNodeInfo - Node whose identifier is to be returned.
Returns:
Node identifier.

getNodeById

public NodeInfo getNodeById(int anId)
Gets the NodeInfo having the specified identifier.

Parameters:
anId - Node identifier.
Returns:
NodeInfo having this identifier.

getNodes

public Set getNodes()
Gets the NodeInfo registered by this topology.

Returns:
Set of NodeInfo.


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