|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object mandala.rami.impl.MethodInvoker
Implements the reflexive method invocation mechanism.
Runnable
,
FutureServer
Field Summary | |
protected ThreadOp |
callee
The callee thread which runs the method invocation. |
protected FutureServer |
future
The FutureServer to use for the invocation. |
protected java.lang.Object |
object
The object to invoke a method on. |
protected java.lang.Object |
result
The result of the method invocation. |
protected java.lang.Throwable |
throwable
The exception thrown by the method invocation. |
Constructor Summary | |
MethodInvoker(java.lang.Object object,
FutureServer future)
Creates a new MethodInvoker instance. |
Method Summary | |
FutureServer |
getFuture()
Returns the future given at instanciation. |
java.lang.Object |
getObject()
Returns the object on which method is to be invoked. |
static Syslog |
getSyslog()
Returns the Syslog object facility. |
void |
run()
Invoke the method future.getMethod() on the
object getObject() with arguments
future.getArgs() Call a method. |
static void |
setSyslog(Syslog log)
Sets the Syslog object facility. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected final java.lang.Object object
The object to invoke a method on.
protected final FutureServer future
The FutureServer
to use for the invocation.
FutureServer
protected java.lang.Object result
The result of the method invocation.
protected java.lang.Throwable throwable
The exception thrown by the method invocation.
protected ThreadOp callee
The callee thread which runs the method invocation.
Constructor Detail |
public MethodInvoker(java.lang.Object object, FutureServer future)
MethodInvoker
instance.
object
- the object to invoke the method tofuture
- the FutureServer object which handle the returned
resultMethod Detail |
public FutureServer getFuture()
Returns the future given at instanciation.
public java.lang.Object getObject()
Returns the object on which method is to be invoked.
Object
valuepublic void run()
Invoke the method future.getMethod()
on the
object getObject()
with arguments
future.getArgs()
Call a method.
The invocation of the method future.getMethod()
on the
object getObject()
with arguments
future.getArgs()
is considered terminated when either it
returns normally or when an exception is thrown by it.
In both case, the future
object specified is then used
as follow :
future.setResult(Object result, Throwable
throwable)
is called: method
's invocation
returns normally, result
is set to the returned value and
throwable
is set to null
method
's invocation, result
is
set to null
and throwable
is set to the thrown
exception.
run
in interface java.lang.Runnable
FutureServer
,
InvocationInfo.getMethod()
,
InvocationInfo.getArgs()
,
ResultUpdater.setResult(Object, Throwable)
,
MethodOp.invoke(Object, Object[])
,
ThreadOp
,
ThreadOp.interrupt()
public static Syslog getSyslog()
Returns the Syslog
object facility.
Each message (debug, log, warning, error, ...) are wrote to this message logger.
Syslog
objectSyslog
public static void setSyslog(Syslog log)
Sets the Syslog
object facility.
Each message (debug, log, warning, error, ...) are wrote to this message logger.
Syslog
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |