CloudPlugs REST Library  1.0.0
for Android
RestSpooler Class Reference

A thread spooler for asynchronous sending of HTTP requests. This class is for internal usage. More...

Inheritance diagram for RestSpooler:

Public Member Functions

 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)
 

Static Protected Member Functions

static Response doRequest (Request request, int timeout)
 

Static Package Functions

 [static initializer]
 

Additional Inherited Members

- Static Public Attributes inherited from Spooler
static final long THREAD_NULL = 0
 
static final int ID_NULL = 0
 
- Protected Attributes inherited from MetaListener
Listener listener
 

Detailed Description

A thread spooler for asynchronous sending of HTTP requests. This class is for internal usage.

Constructor & Destructor Documentation

◆ RestSpooler() [1/2]

◆ RestSpooler() [2/2]

RestSpooler ( Listener  listener)

Member Function Documentation

◆ [static initializer]()

[static initializer] ( )
staticpackage

◆ doRequest()

static Response doRequest ( Request  request,
int  timeout 
)
staticprotected

◆ getJobOf()

RestJob getJobOf ( int  id)

◆ request() [1/3]

int request ( Opts  opts,
String  method,
String  action,
String  path,
String  body,
RestCallback  cb 
)

◆ request() [2/3]

int request ( Opts  opts,
String  method,
String  path,
String  body,
RestCallback  cb 
)

◆ request() [3/3]

int request ( final Request  request,
final int  timeout,
final RestCallback  cb 
)