Class SynchronousExecutor

java.lang.Object
org.simpleframework.common.thread.SynchronousExecutor
All Implemented Interfaces:
Executor

public class SynchronousExecutor extends Object implements Executor
The SynchronousExecutor 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 Details

    • SynchronousExecutor

      public SynchronousExecutor()
  • Method Details

    • 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