mandala.rami
Class AbstractAsynchronousReference

java.lang.Object
  extended bymandala.rami.AbstractAsynchronousReference
All Implemented Interfaces:
AsynchronousReference, Reference, java.io.Serializable
Direct Known Subclasses:
AsynchronousReferenceImpl, AsynchronousReferencePairImpl, StoredObjectReference

public abstract class AbstractAsynchronousReference
extends java.lang.Object
implements AsynchronousReference, java.io.Serializable

Abstract implementation of the AsynchronousReference interface.

Version:
1.0
Author:
eipi
See Also:
AsynchronousReference, FutureClient, FutureServer, CallbackManager, Serialized Form

Field Summary
protected  CallbackManager callbackManager
          The manager of Callback for this instance.
protected static Syslog syslog
          Message logger.
 
Constructor Summary
protected AbstractAsynchronousReference(CallbackManager callbackManager)
          Creates a new AbstractAsynchronousReference instance.
 
Method Summary
 FutureClient call(MethodOp method, java.lang.Object[] args)
          Call a method asynchronously.
abstract  FutureClient call(MethodOp method, java.lang.Object[] args, Callback callBack)
          Call a method asynchronously.
 CallbackManager getCallbackManager()
          Returns the CallbackManager of this instance.
static Syslog getSyslog()
          Returns the logger.
static void setSyslog(Syslog syslog)
          Sets the logger.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface mandala.rami.Reference
getObject
 

Field Detail

callbackManager

protected CallbackManager callbackManager

The manager of Callback for this instance.

See Also:
CallbackManager

syslog

protected static Syslog syslog

Message logger.

Each message (debug, log, warning, error, ...) are wrote to this message logger.

See Also:
Syslog
Constructor Detail

AbstractAsynchronousReference

protected AbstractAsynchronousReference(CallbackManager callbackManager)

Creates a new AbstractAsynchronousReference instance.

Parameters:
callbackManager - the manager of Callback for this instance.
Method Detail

call

public FutureClient call(MethodOp method,
                         java.lang.Object[] args)
Description copied from interface: 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 Callback.done(InvocationInfo, MethodResult) of the instance returned by CallbackManager.getCallback() is called once the reflexive asynchronous method invocation is done.

Specified by:
call in interface AsynchronousReference
Parameters:
method - the method to call
args - method's parameters
Returns:
a FutureClient object.
See Also:
FutureClient, CallbackManager, Callback

call

public abstract FutureClient call(MethodOp method,
                                  java.lang.Object[] args,
                                  Callback callBack)
Description copied from interface: 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.

Specified by:
call in interface AsynchronousReference
Parameters:
method - the method to call
args - method's parameters
callBack - the callback to use.
Returns:
a FutureClient object.
See Also:
FutureClient, Callback, CallbackList

getCallbackManager

public CallbackManager getCallbackManager()
Description copied from interface: AsynchronousReference

Returns the CallbackManager of this instance.

Specified by:
getCallbackManager in interface AsynchronousReference
Returns:
the CallbackManager of this instance.
See Also:
CallbackManager

toString

public java.lang.String toString()

getSyslog

public static Syslog getSyslog()

Returns the logger.

Returns:
the logger

setSyslog

public static void setSyslog(Syslog syslog)

Sets the logger.

Parameters:
syslog - the logger to set


Mandala help mailing list