de.bea.domingo.service
Class InvocationTask

java.lang.Object
  extended by de.bea.domingo.service.InvocationTask
All Implemented Interfaces:
java.lang.Runnable

public final class InvocationTask
extends java.lang.Object
implements java.lang.Runnable

Invocation task for worker thread.

An Invocation task is an implementation of the Runnable interface where the run() method executes a method on an object with an array of arguments.

This task is used to delegate method calls to worker threads in a generic way.

Author:
Kurt Riede

Constructor Summary
InvocationTask(java.lang.Object object, java.lang.reflect.Method method, java.lang.Object[] args)
          Constructor.
 
Method Summary
 java.lang.Object getResult()
          Returns the result from the method invocation.
protected  java.lang.Throwable getThrowable()
          Returns the optional thrown throwable.
 boolean isCompleted()
          Indicates whether the task is completed.
 void run()
          Invokes the method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InvocationTask

InvocationTask(java.lang.Object object,
               java.lang.reflect.Method method,
               java.lang.Object[] args)
Constructor.

Parameters:
object - the object to invoke the method on
method - the method to invoke
args - the arguments for the method
Method Detail

getResult

public java.lang.Object getResult()
Returns the result from the method invocation.

Returns:
result from invoked method

getThrowable

protected java.lang.Throwable getThrowable()
Returns the optional thrown throwable.

Returns:
Returns the optional throwable.

run

public void run()
Invokes the method.

Specified by:
run in interface java.lang.Runnable
See Also:
Runnable.run()

isCompleted

public boolean isCompleted()
Indicates whether the task is completed.

Returns:
true if the task is completed, else false


Domingo Java-API