org.apache.geronimo.messaging
Interface Node

All Superinterfaces:
org.apache.geronimo.gbean.GBeanLifecycle
All Known Implementing Classes:
NodeImpl

public interface Node
extends org.apache.geronimo.gbean.GBeanLifecycle

Abstract a node in a clustered deployment.
A Node knows how to join, leave other nodes. It also registers EndPoints and provide them a mean to exchange Msgs with other EndPoints.
The following diagram shows how Nodes and EndPoints are combined together:

 EndPoint -- MTO -- Node -- MTM -- Node -- OTM -- EndPoint
 

Version:
$Revision: 1.5 $ $Date: 2004/07/17 03:52:34 $

Method Summary
 void addEndPoint(EndPoint anEndPoint)
          Registers a new EndPoint.
 Object factoryEndPointProxy(EndPointProxyInfo anInfo)
          Creates a proxy for the EndPoint defined by anInfo.
 NodeInfo getNodeInfo()
          Gets the NodeInfo of this node.
 ReplacerResolver getReplacerResolver()
          Gets the root ReplacerResolver used by this node in order to replace and resolve instances to be sent and received by remote nodes.
 NodeTopology getTopology()
          Gets the node topology in which this instance is operating.
 void releaseEndPointProxy(Object aProxy)
          Releases the resources of the specified EndPoint proxy.
 void removeEndPoint(EndPoint anEndPoint)
          Unregisters the EndPoint.
 void setTopology(NodeTopology aTopology)
          Sets the node topology in which this instance is operating.
 
Methods inherited from interface org.apache.geronimo.gbean.GBeanLifecycle
doFail, doStart, doStop
 

Method Detail

getNodeInfo

public NodeInfo getNodeInfo()
Gets the NodeInfo of this node.

Returns:
NodeInfo.

setTopology

public void setTopology(NodeTopology aTopology)
                 throws NodeException
Sets the node topology in which this instance is operating.
When the topology is set, this node tries to "apply" it: it creates physical connections with all of its neighbours as defined by the specified topology and drops the physical connections no more required by the topology change. It should also cascade the topology change to all of its neighbours. These latter should then applied it locally.

Parameters:
aTopology - Topology of the nodes constituting the network layout.
Throws:
NodeException - Indicates that the topology can not be set.

getTopology

public NodeTopology getTopology()
Gets the node topology in which this instance is operating.

Returns:
Node topology.

getReplacerResolver

public ReplacerResolver getReplacerResolver()
Gets the root ReplacerResolver used by this node in order to replace and resolve instances to be sent and received by remote nodes.

Returns:
Root ReplacerResolver.

addEndPoint

public void addEndPoint(EndPoint anEndPoint)
Registers a new EndPoint.

Parameters:
anEndPoint - EndPoint to be registered.

removeEndPoint

public void removeEndPoint(EndPoint anEndPoint)
Unregisters the EndPoint.

Parameters:
anEndPoint - EndPoint to be deregistered.

factoryEndPointProxy

public Object factoryEndPointProxy(EndPointProxyInfo anInfo)
Creates a proxy for the EndPoint defined by anInfo.

Parameters:
anInfo - EndPoint meta-data.
Returns:
A proxy for the EndPoint defined by anInfo. This proxy implements all the EndPoint interfaces plus the EndPointProxy interface.

releaseEndPointProxy

public void releaseEndPointProxy(Object aProxy)
Releases the resources of the specified EndPoint proxy.
From this point, the proxy can no more be used.
An IllegalStateException should be thrown when a method is invoked on a released proxy.

Parameters:
aProxy - EndPoint proxy.
Throws:
IllegalArgumentException - Indicates that the provided instance is not a proxy.


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