CloudPlugs REST Library  1.0.0
for Android
RestHandlerCallback Class Reference

Helper class for easy management of com.cloudplugs.rest.RestCallback with android.os.Handler. It is a wrapper of a custom com.cloudplugs.rest.RestCallback such that it will be executed inside an android.os.Handler. More...

Inheritance diagram for RestHandlerCallback:

Public Member Functions

 RestHandlerCallback (Handler handler, RestCallback cb)
 
Handler getHandler ()
 
void setHandler (Handler handler)
 
void enqueue (Runnable runnable)
 
- Public Member Functions inherited from RestCallback.Meta
 Meta (RestCallback cb)
 
RestCallback getCallback ()
 
void setCallback (RestCallback cb)
 
abstract void enqueue (Runnable runnable)
 
final void on (final Request request, final Response response)
 

Detailed Description

Helper class for easy management of com.cloudplugs.rest.RestCallback with android.os.Handler. It is a wrapper of a custom com.cloudplugs.rest.RestCallback such that it will be executed inside an android.os.Handler.

Constructor & Destructor Documentation

◆ RestHandlerCallback()

RestHandlerCallback ( Handler  handler,
RestCallback  cb 
)

Create a new callback automatically executes the given one inside the specified handler loop.

Parameters
handlerthe Android handler
cbthe callback to execute inside the handler

Member Function Documentation

◆ enqueue()

void enqueue ( Runnable  runnable)

◆ getHandler()

Handler getHandler ( )
Returns
the Android handler of this instance

◆ setHandler()

void setHandler ( Handler  handler)

Set an Android handler to use when executing the callback.

Parameters
handlerthe handler to use