org.apache.geronimo.messaging.reference
Interface ReferenceableManager

All Superinterfaces:
EndPoint, MsgConsProd, MsgConsumer, MsgProducer
All Known Implementing Classes:
ReferenceableManagerImpl

public interface ReferenceableManager
extends EndPoint

Referenceable manager.

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

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 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
 

Method Detail

start

public void start()
Starts.


stop

public void stop()
Stops.


factoryProxy

public Object factoryProxy(ReferenceableInfo aReferenceInfo)
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.

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)
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.

Parameters:
aReference - Referenceable to be registered.
Returns:
Referenceable meta-data.

unregister

public void unregister(ReferenceableInfo aReferenceInfo)
Unregisters a Referenceable.

Parameters:
aReferenceInfo - Meta-data of the Referenceable to be unregistered.

invoke

public Object invoke(int anId,
                     Request aRequest)
              throws Throwable
Invoke a request on the Referenceable having the specified identifier.

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.