org.jppf.client.taskwrapper
Class RunnableTaskWrapper
java.lang.Object
org.jppf.client.taskwrapper.AbstractTaskObjectWrapper
org.jppf.client.taskwrapper.RunnableTaskWrapper
- All Implemented Interfaces:
- Serializable, TaskObjectWrapper
public class RunnableTaskWrapper
- extends AbstractTaskObjectWrapper
Task wrapper for classes implementing Runnable.
- Author:
- Laurent Cohen
- See Also:
- Serialized Form
|
Method Summary |
Object |
execute()
Execute the run() method of this runnable task. |
Object |
getTaskObject()
Return the object on which a method or constructor is called. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RunnableTaskWrapper
public RunnableTaskWrapper(Runnable taskObject)
- Initialize this wrapper with the specified
Runnable object.
- Parameters:
taskObject - the runnable object to execute.
execute
public Object execute()
throws Exception
- Execute the
run() method of this runnable 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.