CloudPlugs REST Library  1.0.0
for Android
RestSpooler Class Reference

A com.cloudplugs.rest.RestSpooler extension to handle Android wake locks for reliable execution when the application is not in foreground. This class is for internal usage. More...

Inheritance diagram for RestSpooler:

Public Member Functions

 RestSpooler ()
 
boolean pause ()
 
boolean resume ()
 
int exec (Runnable runnable)
 
void onReady ()
 
void onIdle ()
 
- Public Member Functions inherited from RestSpooler
 RestSpooler ()
 
 RestSpooler (Listener listener)
 
int request (Opts opts, String method, String action, String path, String body, RestCallback cb)
 
int request (Opts opts, String method, String path, String body, RestCallback cb)
 
int request (final Request request, final int timeout, final RestCallback cb)
 
RestJob getJobOf (int id)
 
- Public Member Functions inherited from RefSpooler
 RefSpooler ()
 
 RefSpooler (Listener listener)
 
void ref ()
 
void unref ()
 
- Public Member Functions inherited from Spooler
 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)
 

Additional Inherited Members

- Static Public Attributes inherited from Spooler
static final long THREAD_NULL = 0
 
static final int ID_NULL = 0
 
- Static Protected Member Functions inherited from RestSpooler
static Response doRequest (Request request, int timeout)
 
- Protected Attributes inherited from MetaListener
Listener listener
 
- Static Package Functions inherited from RestSpooler
 [static initializer]
 

Detailed Description

A com.cloudplugs.rest.RestSpooler extension to handle Android wake locks for reliable execution when the application is not in foreground. This class is for internal usage.

Constructor & Destructor Documentation

◆ RestSpooler()

Member Function Documentation

◆ exec()

int exec ( Runnable  runnable)

◆ onIdle()

void onIdle ( )

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

Implements Listener.

◆ onReady()

void onReady ( )

Invoked when a mechanism is ready to be used.

Implements Listener.

◆ pause()

boolean pause ( )

◆ resume()

boolean resume ( )