|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectmandala.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 Object |
object
The object to invoke a method on. |
protected Object |
result
The result of the method invocation. |
protected Throwable |
throwable
The exception thrown by the method invocation. |
| Constructor Summary | |
MethodInvoker(Object object,
FutureServer future)
Creates a new MethodInvoker instance. |
|
| Method Summary | |
FutureServer |
getFuture()
Returns the future given at instanciation. |
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 Object object
The object to invoke a method on.
protected final FutureServer future
The FutureServer to use for the invocation.
FutureServerprotected Object result
The result of the method invocation.
protected Throwable throwable
The exception thrown by the method invocation.
protected ThreadOp callee
The callee thread which runs the method invocation.
| Constructor Detail |
public MethodInvoker(Object object,
FutureServer future)
MethodInvoker instance.
object - the object to invoke the method tofuture - the FutureServer object which handle the returned
result| Method Detail |
public FutureServer getFuture()
Returns the future given at instanciation.
public 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 nullmethod's invocation, result is
set to null and throwable is set to the thrown
exception.
run in interface RunnableFutureServer,
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 objectSyslogpublic 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 | ||||||||||