org.apache.geronimo.messaging.reference
Class ReferenceableManagerImpl

java.lang.Object
  extended byorg.apache.geronimo.messaging.BaseEndPoint
      extended byorg.apache.geronimo.messaging.reference.ReferenceableManagerImpl
All Implemented Interfaces:
EndPoint, MsgConsProd, MsgConsumer, MsgProducer, ReferenceableManager

public class ReferenceableManagerImpl
extends BaseEndPoint
implements ReferenceableManager

ReferenceableManager implementation.

Version:
$Revision: 1.6 $ $Date: 2004/06/10 23:12:24 $

Field Summary
 
Fields inherited from class org.apache.geronimo.messaging.BaseEndPoint
id, node, out, sender
 
Constructor Summary
ReferenceableManagerImpl(Node aNode, Object anID)
          Creates a manager mounted by the specified node and having the specified identifier.
 
Method Summary
 Object factoryProxy(ReferenceableInfo aReferenceInfo)
          Builds a proxy for the provided Referenceable.
 Object invoke(int anId, Request aRequest)
          Invoke a request on the Referenceable having the specified identifier.
 ReferenceableInfo register(Referenceable aReference)
          Registers a Referenceable.
 void start()
          Starts.
 void stop()
          Stops.
 void unregister(ReferenceableInfo aReferenceInfo)
          Unregisters a Referenceable.
 
Methods inherited from class org.apache.geronimo.messaging.BaseEndPoint
getID, getMsgConsumerOut, handleRequest, handleResponse, setMsgProducerOut
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.geronimo.messaging.EndPoint
getID
 
Methods inherited from interface org.apache.geronimo.messaging.MsgProducer
setMsgProducerOut
 
Methods inherited from interface org.apache.geronimo.messaging.MsgConsumer
getMsgConsumerOut
 

Constructor Detail

ReferenceableManagerImpl

public ReferenceableManagerImpl(Node aNode,
                                Object anID)
Creates a manager mounted by the specified node and having the specified identifier.

Parameters:
aNode - Hosting Node.
anID - EndPoint identifier.
Method Detail

start

public void start()
Description copied from interface: ReferenceableManager
Starts.

Specified by:
start in interface ReferenceableManager

stop

public void stop()
Description copied from interface: ReferenceableManager
Stops.

Specified by:
stop in interface ReferenceableManager

factoryProxy

public Object factoryProxy(ReferenceableInfo aReferenceInfo)
Description copied from interface: ReferenceableManager
Builds a proxy for the provided Referenceable.
If the Referenceable is hosted by this manager, the Referenceable itself is returned.
An IllegalStateException is raised by this proxy if its methods are invoked while the ReferenceableManager which has built it is stopped.

Specified by:
factoryProxy in interface ReferenceableManager
Parameters:
aReferenceInfo - Reference meta-data.
Returns:
An instance implementing the Reference Class and delegating all the invokations to the Reference.

register

public ReferenceableInfo register(Referenceable aReference)
Description copied from interface: ReferenceableManager
Registers a Referenceable.
If the same Referenceable is registered twice, then the returned ReferenceableInfos have the same identifier.
If a Referenceable is equal to another Referenceable via the equals contract, then the ReferenceableInfos have distinct Referenceable identifiers.

Specified by:
register in interface ReferenceableManager
Parameters:
aReference - Referenceable to be registered.
Returns:
Referenceable meta-data.

unregister

public void unregister(ReferenceableInfo aReferenceInfo)
Description copied from interface: ReferenceableManager
Unregisters a Referenceable.

Specified by:
unregister in interface ReferenceableManager
Parameters:
aReferenceInfo - Meta-data of the Referenceable to be unregistered.

invoke

public Object invoke(int anId,
                     Request aRequest)
              throws Throwable
Description copied from interface: ReferenceableManager
Invoke a request on the Referenceable having the specified identifier.

Specified by:
invoke in interface ReferenceableManager
Parameters:
anId - Referenceable identifier.
aRequest - Request to be executed.
Returns:
Result.
Throws:
Throwable - raised by the execution of aRequest against the Referenceable identified by anId.


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