textbender.a.r.desk
Class DeskDaemon

java.lang.Object
  extended by DeskDaemon

@ThreadSafe
public final class DeskDaemon
extends Object

The desk daemon as a whole. The single instance of DeskDaemon is available via DeskDaemon.i().


Constructor Summary
DeskDaemon()
          Creates the single instance of DeskDaemon, and makes it available via i().
 
Method Summary
 ScheduledExecutorService executor()
          The general-purpose desk executor, an asynchronous executor that employs a single thread, the "desk executor" thread.
static DeskDaemon i()
          The single instance of DeskDaemon.
 boolean isExecutorThread()
          Returns true if the calling thread is the desk executor thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeskDaemon

DeskDaemon()
Creates the single instance of DeskDaemon, and makes it available via i().

Method Detail

i

public static DeskDaemon i()
The single instance of DeskDaemon.


executor

public ScheduledExecutorService executor()
The general-purpose desk executor, an asynchronous executor that employs a single thread, the "desk executor" thread.

Most of its activity consists of dispatching events to other processes on the host. Parallel dispatch helps to avoid distributed deadlock during event handling. And the buffering provided by the executor's queue helps to keep other processes unblocked during bursts of activity.

See Also:
isExecutorThread()

isExecutorThread

public boolean isExecutorThread()
Returns true if the calling thread is the desk executor thread. Use this call to ensure that a given task is being executed (or not being) on the desk executor thread.