|
|||||||||||
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 FormField Summary | |
protected FutureFactory |
futureFactory
The FutureFactory instance used to create our
future objects. |
protected java.lang.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(java.lang.Object object,
CallbackManager callBackManager,
FutureFactory futureFactory,
AsynchronousPolicy policy)
Creates a new AsynchronousReferenceImpl instance. |
Method Summary | |
FutureClient |
call(MethodOp method,
java.lang.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(java.lang.Object object,
CallbackManager callBackManager,
FutureFactory futureFactory,
AsynchronousPolicy policy)
|
java.lang.Object |
getObject()
Returns the object this Reference refers
to. |
java.lang.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 java.lang.Object object
The Object
methods must be invoked asynchronously
on.
protected final FutureFactory futureFactory
The FutureFactory
instance used to create our
future objects.
FutureFactory
protected final AsynchronousPolicy policy
The asynchronous policy.
AsynchronousPolicy
Constructor Detail |
protected AsynchronousReferenceImpl(java.lang.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, java.lang.Object[] args, Callback callBack)
AsynchronousReference
Call a method asynchronously.
Since the call is asynchronous, exceptions are not handled in an
usual way. Implementations must 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. If multiple callbacks are needed, see CallbackList
.
call
in interface AsynchronousReference
call
in class AbstractAsynchronousReference
public java.lang.Object getObject()
Reference
Returns the object this Reference
refers
to.
Reference
refers to.public java.lang.String toString()
toString
in class AbstractAsynchronousReference
public 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(java.lang.Object object, CallbackManager callBackManager, FutureFactory futureFactory, AsynchronousPolicy policy)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |