org.simpleframework.util.thread
Class DirectExecutor
java.lang.Object
org.simpleframework.util.thread.DirectExecutor
- All Implemented Interfaces:
- Executor
public class DirectExecutor
- extends Object
- implements Executor
The DirectExecutor object is used for synchronous
execution of tasks. This simple acts as an adapter for running
a Runnable implementation and can be used wherever
the executor interface is required.
- Author:
- Niall Gallagher
|
Method Summary |
void |
execute(Runnable task)
This will execute the provided Runnable within
the current thread. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DirectExecutor
public DirectExecutor()
execute
public void execute(Runnable task)
- This will execute the provided
Runnable within
the current thread. This implementation will simple invoke
the run method of the task and wait for it to complete.
- Specified by:
execute in interface Executor
- Parameters:
task - this is the task that is to be executed
Copyright © 2013. All Rights Reserved.