public class DirectExecutor
extends java.lang.Object
implements java.util.concurrent.Executor
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.| Constructor and Description |
|---|
DirectExecutor() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute(java.lang.Runnable task)
This will execute the provided
Runnable within
the current thread. |
public void execute(java.lang.Runnable task)
Runnable within
the current thread. This implementation will simple invoke
the run method of the task and wait for it to complete.execute in interface java.util.concurrent.Executortask - this is the task that is to be executed