|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectmandala.rami.AbstractAsynchronousReference
mandala.rami.impl.AsynchronousReferenceImpl
Implementation of the AsynchronousReference interface.
This implementation uses the factory design pattern to customize
future objects creation. This class provides a default
FutureFactory with a standard behavior.
AbstractAsynchronousReference,
AsynchronousPolicy,
FutureClient,
FutureServer,
FutureFactory,
FutureFactory.FutureComponents,
CallbackManager,
Serialized Form| Field Summary | |
protected FutureFactory |
futureFactory
The FutureFactory instance used to create our
future objects. |
protected Object |
object
The Object methods must be invoked asynchronously
on. |
protected AsynchronousPolicy |
policy
The asynchronous policy. |
| Fields inherited from class mandala.rami.AbstractAsynchronousReference |
callbackManager, syslog |
| Constructor Summary | |
protected |
AsynchronousReferenceImpl(Object object,
CallbackManager callBackManager,
FutureFactory futureFactory,
AsynchronousPolicy policy)
Creates a new AsynchronousReferenceImpl instance. |
| Method Summary | |
FutureClient |
call(MethodOp method,
Object[] args,
Callback callBack)
Call a method asynchronously. |
AsynchronousPolicy |
getAsynchronousPolicy()
Returns the object used to invoke method on the object returned by getObject(). |
FutureFactory |
getFutureFactory()
Returns the factory used to construct futures. |
static AsynchronousReferenceImpl |
getInstance(Object object,
CallbackManager callBackManager,
FutureFactory futureFactory,
AsynchronousPolicy policy)
|
Object |
getObject()
Returns the object this Reference refers
to. |
String |
toString()
|
| Methods inherited from class mandala.rami.AbstractAsynchronousReference |
call, getCallbackManager, getSyslog, setSyslog |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected final Object object
The Object methods must be invoked asynchronously
on.
protected final FutureFactory futureFactory
The FutureFactory instance used to create our
future objects.
FutureFactoryprotected final AsynchronousPolicy policy
The asynchronous policy.
AsynchronousPolicy| Constructor Detail |
protected AsynchronousReferenceImpl(Object object,
CallbackManager callBackManager,
FutureFactory futureFactory,
AsynchronousPolicy policy)
Creates a new AsynchronousReferenceImpl instance.
object - the Object methods must be invoked
asynchronously on.policy - the AsynchronousPolicy to delegate method
invocation to.futureFactory - the FutureFactory responsible of the
creation of future objects.callBackManager - the manager of
Callback for this instance.| Method Detail |
public FutureClient call(MethodOp method,
Object[] args,
Callback callBack)
AsynchronousReferenceCall a method asynchronously.
Since the call is asynchronous, exceptions are not handled in an
usual way. Implementations may provide a mechanism conform to the
FutureClient specification.
The method done of the specified Callback
is called once the reflexive asynchronous method invocation is done.
The Callback instance returned by CallbackManager.getCallback() is not
used.
call in interface AsynchronousReferencecall in class AbstractAsynchronousReferencepublic Object getObject()
ReferenceReturns the object this Reference refers
to.
Reference
refers to.public String toString()
toString in class AbstractAsynchronousReferencepublic FutureFactory getFutureFactory()
Returns the factory used to construct futures.
public AsynchronousPolicy getAsynchronousPolicy()
Returns the object used to invoke method on the object returned by
getObject().
getObject()
public static AsynchronousReferenceImpl getInstance(Object object,
CallbackManager callBackManager,
FutureFactory futureFactory,
AsynchronousPolicy policy)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||