Package net.sf.eBus.util
Class DirectExecutor
- java.lang.Object
-
- net.sf.eBus.util.DirectExecutor
-
- All Implemented Interfaces:
Executor
public class DirectExecutor extends Object implements Executor
Performs direct, synchronous runnable task execution in the current thread. This class allows an application to maintain anjava.util.Executorreference and instantiate the appropriate executor subclass which performs either synchronous or asynchronous execution. The application can switch between different task execution styles without changing how it uses theExecutorinstance.(Aside: this class should be in java.util.concurrent to provide a complete Executor implementation suite but is not part of the standard Java class library. Hence it being part of the eBus library).
- Author:
- Charles Rapp
-
-
Constructor Summary
Constructors Constructor Description DirectExecutor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute(Runnable task)Immediately executes the task in the current thread.
-