Class SynchronousExecutor
- java.lang.Object
-
- org.simpleframework.common.thread.SynchronousExecutor
-
- All Implemented Interfaces:
java.util.concurrent.Executor
public class SynchronousExecutor extends java.lang.Object implements java.util.concurrent.ExecutorTheSynchronousExecutorobject is used for synchronous execution of tasks. This simple acts as an adapter for running aRunnableimplementation and can be used wherever the executor interface is required.
-
-
Constructor Summary
Constructors Constructor Description SynchronousExecutor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute(java.lang.Runnable task)This will execute the providedRunnablewithin the current thread.
-
-
-
Method Detail
-
execute
public void execute(java.lang.Runnable task)
This will execute the providedRunnablewithin the current thread. This implementation will simple invoke the run method of the task and wait for it to complete.- Specified by:
executein interfacejava.util.concurrent.Executor- Parameters:
task- this is the task that is to be executed
-
-