org.apache.geronimo.messaging
Class NodeImpl

java.lang.Object
  extended byorg.apache.geronimo.messaging.NodeImpl
All Implemented Interfaces:
org.apache.geronimo.gbean.GBeanLifecycle, Node

public class NodeImpl
extends Object
implements Node, org.apache.geronimo.gbean.GBeanLifecycle

Node implementation.

Version:
$Revision: 1.9 $ $Date: 2004/07/20 00:26:04 $

Field Summary
static org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
           
 
Constructor Summary
NodeImpl(NodeInfo aNodeInfo, org.apache.geronimo.pool.ThreadPool aThreadPool, org.apache.geronimo.pool.ClockPool aClockPool, MessagingTransportFactory aFactory)
          Creates a Node.
 
Method Summary
 void addEndPoint(EndPoint anEndPoint)
          Registers a new EndPoint.
 void doFail()
           
 void doStart()
           
 void doStop()
           
 Object factoryEndPointProxy(EndPointProxyInfo anInfo)
          Creates a proxy for the EndPoint defined by anInfo.
static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()
           
 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.
protected  EndPointProxyFactory newEndPointProxyFactory()
          Returns an EndPointProxyFactory implementation.
protected  ReferenceableManager newReferenceableManager()
          Returns a ReferenceableManager inplementation.
protected  StreamManager newStreamManager()
          Returns a StreamManager implementation.
 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.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GBEAN_INFO

public static final org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
Constructor Detail

NodeImpl

public NodeImpl(NodeInfo aNodeInfo,
                org.apache.geronimo.pool.ThreadPool aThreadPool,
                org.apache.geronimo.pool.ClockPool aClockPool,
                MessagingTransportFactory aFactory)
Creates a Node.

Parameters:
aNodeInfo - Node meta-data.
aThreadPool - Pool of threads.
aClockPool - To execute period tasks.
aFactory - Transport layer factory.
Method Detail

getReplacerResolver

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

Specified by:
getReplacerResolver in interface Node
Returns:
Root ReplacerResolver.

getNodeInfo

public NodeInfo getNodeInfo()
Description copied from interface: Node
Gets the NodeInfo of this node.

Specified by:
getNodeInfo in interface Node
Returns:
NodeInfo.

setTopology

public void setTopology(NodeTopology aTopology)
                 throws NodeException
Description copied from interface: Node
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.

Specified by:
setTopology in interface Node
Parameters:
aTopology - Topology of the nodes constituting the network layout.
Throws:
NodeException - Indicates that the topology can not be set.

getTopology

public NodeTopology getTopology()
Description copied from interface: Node
Gets the node topology in which this instance is operating.

Specified by:
getTopology in interface Node
Returns:
Node topology.

addEndPoint

public void addEndPoint(EndPoint anEndPoint)
Description copied from interface: Node
Registers a new EndPoint.

Specified by:
addEndPoint in interface Node
Parameters:
anEndPoint - EndPoint to be registered.

removeEndPoint

public void removeEndPoint(EndPoint anEndPoint)
Description copied from interface: Node
Unregisters the EndPoint.

Specified by:
removeEndPoint in interface Node
Parameters:
anEndPoint - EndPoint to be deregistered.

factoryEndPointProxy

public Object factoryEndPointProxy(EndPointProxyInfo anInfo)
Description copied from interface: Node
Creates a proxy for the EndPoint defined by anInfo.

Specified by:
factoryEndPointProxy in interface Node
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)
Description copied from interface: Node
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.

Specified by:
releaseEndPointProxy in interface Node
Parameters:
aProxy - EndPoint proxy.

doStart

public void doStart()
             throws org.apache.geronimo.gbean.WaitingException,
                    Exception
Specified by:
doStart in interface org.apache.geronimo.gbean.GBeanLifecycle
Throws:
org.apache.geronimo.gbean.WaitingException
Exception

doStop

public void doStop()
            throws org.apache.geronimo.gbean.WaitingException,
                   Exception
Specified by:
doStop in interface org.apache.geronimo.gbean.GBeanLifecycle
Throws:
org.apache.geronimo.gbean.WaitingException
Exception

doFail

public void doFail()
Specified by:
doFail in interface org.apache.geronimo.gbean.GBeanLifecycle

toString

public String toString()

newStreamManager

protected StreamManager newStreamManager()
Returns a StreamManager implementation.

Returns:
StreamManager.

newReferenceableManager

protected ReferenceableManager newReferenceableManager()
Returns a ReferenceableManager inplementation.

Returns:
ReferenceableManager

newEndPointProxyFactory

protected EndPointProxyFactory newEndPointProxyFactory()
Returns an EndPointProxyFactory implementation.

Returns:
EndPointProxyFactory

getGBeanInfo

public static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()


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