org.jppf.client.taskwrapper
Class CallableTaskWrapper

java.lang.Object
  extended by org.jppf.client.taskwrapper.AbstractTaskObjectWrapper
      extended by org.jppf.client.taskwrapper.CallableTaskWrapper
All Implemented Interfaces:
Serializable, TaskObjectWrapper

public class CallableTaskWrapper
extends AbstractTaskObjectWrapper

Task wrapper for classes implementing Callable.

Author:
Laurent Cohen
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jppf.client.taskwrapper.TaskObjectWrapper
TaskObjectWrapper.MethodType
 
Field Summary
 
Fields inherited from class org.jppf.client.taskwrapper.AbstractTaskObjectWrapper
methodType
 
Constructor Summary
CallableTaskWrapper(Callable callable)
          Initialize this wrapper with the specified Runnable object.
 
Method Summary
 Object execute()
          Execute the call() method of this callable task.
 Object getTaskObject()
          Return the object on which a method or constructor is called.
 
Methods inherited from class org.jppf.client.taskwrapper.AbstractTaskObjectWrapper
getMethodType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CallableTaskWrapper

public CallableTaskWrapper(Callable callable)
Initialize this wrapper with the specified Runnable object.

Parameters:
callable - the callable object to execute.
Method Detail

execute

public Object execute()
               throws Exception
Execute the call() method of this callable task.

Returns:
the result of the execution.
Throws:
Exception - if an error occurs during the execution.
See Also:
TaskObjectWrapper.execute()

getTaskObject

public Object getTaskObject()
Return the object on which a method or constructor is called.

Returns:
an object or null if the invoked method is static.
See Also:
TaskObjectWrapper.getTaskObject()


Copyright © 2005-2010 JPPF Team.