com.smaxe.me.core
Class SyncWorker

java.lang.Object
  extended by com.smaxe.me.core.SyncWorker
All Implemented Interfaces:
Executor, ExecutorService

public final class SyncWorker
extends java.lang.Object
implements ExecutorService

SyncWorker - ExecutorService implementation that executes tasks synchronously, i.e. in the thread that executes the task.

Author:
Andrei Sochirca

Constructor Summary
SyncWorker()
          Constructor.
 
Method Summary
 void execute(java.lang.Runnable task)
          Executes the given task at some time in the future.
 void shutdown()
          Initiates an orderly shutdown in which previously submitted tasks are executed, but no new tasks will be accepted.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SyncWorker

public SyncWorker()
Constructor.

Method Detail

execute

public void execute(java.lang.Runnable task)
Description copied from interface: Executor
Executes the given task at some time in the future. The task may execute in a new thread, in a pooled thread, or in the calling thread, at the discretion of the Executor implementation.

Specified by:
execute in interface Executor
Parameters:
task - task to execute

shutdown

public void shutdown()
Description copied from interface: ExecutorService
Initiates an orderly shutdown in which previously submitted tasks are executed, but no new tasks will be accepted. Invocation has no additional effect if already shut down.

Specified by:
shutdown in interface ExecutorService