CloudPlugs REST Library  1.0.0
for Android
Spooler Class Reference

Generic job spooler implementation in a dedicated thread. This class is for internal usage. More...

Inheritance diagram for Spooler:

Public Member Functions

 Spooler ()
 
 Spooler (Listener l)
 
boolean isStarted ()
 
boolean isStopped ()
 
boolean isQuitting ()
 
synchronized boolean isAlive ()
 
boolean isPaused ()
 
boolean isEmpty ()
 
int size ()
 
boolean getClearOnStop ()
 
void setClearOnStop (boolean clearOnStop)
 
long idThread ()
 
boolean isThisThread ()
 
synchronized boolean start ()
 
synchronized boolean stop ()
 
boolean pause ()
 
boolean resume ()
 
void clear ()
 
int exec (Runnable job)
 
boolean cancel (int id)
 
Runnable getJobOf (int id)
 
boolean waitFor (int id)
 
boolean waitFor (int id, long timeout)
 
boolean waitForIdle ()
 
boolean waitForIdle (long timeout)
 
boolean waitForStop ()
 
boolean waitForStop (long timeout)
 
void onIdle ()
 
void run ()
 
- Public Member Functions inherited from MetaListener
 MetaListener ()
 
 MetaListener (Listener l)
 
Listener getListener ()
 
void setListener (Listener l)
 
void onStart ()
 
void onStop ()
 
void onPause ()
 
void onResume ()
 
void onReady ()
 
void onIdle ()
 
void onEvt (Object evt, Object value)
 
void onErr (Throwable t)
 

Static Public Attributes

static final long THREAD_NULL = 0
 
static final int ID_NULL = 0
 

Additional Inherited Members

- Protected Attributes inherited from MetaListener
Listener listener
 

Detailed Description

Generic job spooler implementation in a dedicated thread. This class is for internal usage.

Constructor & Destructor Documentation

◆ Spooler() [1/2]

Spooler ( )

◆ Spooler() [2/2]

Spooler ( Listener  l)

Member Function Documentation

◆ cancel()

boolean cancel ( int  id)

◆ clear()

void clear ( )

◆ exec()

int exec ( Runnable  job)

◆ getClearOnStop()

boolean getClearOnStop ( )

◆ getJobOf()

Runnable getJobOf ( int  id)

◆ idThread()

long idThread ( )

◆ isAlive()

synchronized boolean isAlive ( )

◆ isEmpty()

boolean isEmpty ( )

◆ isPaused()

boolean isPaused ( )

◆ isQuitting()

boolean isQuitting ( )

◆ isStarted()

boolean isStarted ( )

◆ isStopped()

boolean isStopped ( )

◆ isThisThread()

boolean isThisThread ( )

◆ onIdle()

void onIdle ( )

Invoked when a mechanism become idle (usually a spooler).

Implements Listener.

◆ pause()

boolean pause ( )

◆ resume()

boolean resume ( )

◆ run()

void run ( )

◆ setClearOnStop()

void setClearOnStop ( boolean  clearOnStop)

◆ size()

int size ( )

◆ start()

synchronized boolean start ( )

◆ stop()

synchronized boolean stop ( )

◆ waitFor() [1/2]

boolean waitFor ( int  id)

◆ waitFor() [2/2]

boolean waitFor ( int  id,
long  timeout 
)

◆ waitForIdle() [1/2]

boolean waitForIdle ( )

◆ waitForIdle() [2/2]

boolean waitForIdle ( long  timeout)

◆ waitForStop() [1/2]

boolean waitForStop ( )

◆ waitForStop() [2/2]

boolean waitForStop ( long  timeout)

Member Data Documentation

◆ ID_NULL

final int ID_NULL = 0
static

◆ THREAD_NULL

final long THREAD_NULL = 0
static