org.jasig.portal.utils.threading
Class RunnableTask
java.lang.Object
org.jasig.portal.utils.threading.BaseTask
org.jasig.portal.utils.threading.RunnableTask
- All Implemented Interfaces:
- Runnable, Task
public class RunnableTask
- extends BaseTask
This class exists as a convenience to execute Runnables. Although it
may seem redundant, it is useful in that the superclass run() will
appropriately catch and store Exceptions, so that callers need not worry
about catching and handling them in their Runnable implementation.
- Author:
- Aaron Hamid (arh14 at cornell dot edu)
|
Constructor Summary |
RunnableTask(Runnable runnable)
Constructs a RunnableTask with a Runnable object |
|
Method Summary |
void |
execute()
Simply calls the run() on the runnable that this
RunnableTask was constructed with. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
runnable
protected Runnable runnable
RunnableTask
public RunnableTask(Runnable runnable)
- Constructs a RunnableTask with a Runnable object
- Parameters:
runnable - a runnable implementation
execute
public void execute()
throws Exception
- Simply calls the run() on the runnable that this
RunnableTask was constructed with. BaseTask
will catch and store any Exception the runnable,
and hence this method, throws.
- Specified by:
execute in class BaseTask
- Throws:
Exception
Copyright © 2010 Jasig. All Rights Reserved.