CloudPlugs REST Library  1.0.0
for Android
RestManager Class Reference

Class for handling remote requests with CloudPlugs server. More...

Inheritance diagram for RestManager:

Public Member Functions

int execEnrollController (String body, RestCallback cb)
 
int execEnrollController (String model, String ctrl, String pass, String hwid, String name, JSONObject props, RestCallback cb)
 
int execEnrollProduct (String body, RestCallback cb)
 
int execEnrollProduct (String model, String hwid, String pass, JSONObject props, RestCallback cb)
 
int execEnrollPrototype (String body, RestCallback cb)
 
int execEnrollPrototype (String pass, String name, String hwid, JSONObject perm, JSONObject props, RestCallback cb)
 
int execUnenroll (RestCallback cb)
 
int execUnenroll (String idPlug, RestCallback cb)
 
int execUnenroll (String[] idPlugs, RestCallback cb)
 
int execControlDevice (String body, RestCallback cb)
 
int execControlDevice (String model, String ctrl, String pass, RestCallback cb)
 
int execUncontrolDevice (String idPlug, RestCallback cb)
 
int execUncontrolDevice (String[] idPlugs, RestCallback cb)
 
int execGetDevice (String idPlug, RestCallback cb)
 
int execGetDevice (RestCallback cb)
 
int execSetDevice (String body, RestCallback cb)
 
int execSetDevice (String idPlug, String body, RestCallback cb)
 
int execSetDevice (String name, JSONObject props, RestCallback cb)
 
int execSetDevice (String idPlug, String name, JSONObject props, String status, JSONObject perm, RestCallback cb)
 
int execGetDeviceProp (String prop, RestCallback cb)
 
int execGetDeviceProp (String idPlug, String prop, RestCallback cb)
 
int execSetDeviceProp (String prop, String value, RestCallback cb)
 
int execSetDeviceProp (String idPlug, String prop, String value, RestCallback cb)
 
int execRemoveDeviceProp (String idPlug, String prop, RestCallback cb)
 
int execRemoveDeviceProp (String prop, RestCallback cb)
 
int execGetDeviceLocation (RestCallback cb)
 
int execGetDeviceLocation (String idPlug, RestCallback cb)
 
int execSetDeviceLocation (Number lon, Number lat, Number alt, Number accuracy, Object time, RestCallback cb)
 
int execSetDeviceLocation (String idPlug, Number lon, Number lat, Number alt, Number accuracy, Object time, RestCallback cb)
 
int execSetDeviceLocation (String idPlug, String location, RestCallback cb)
 
int execSetDeviceLocation (String location, RestCallback cb)
 
int execRemoveDeviceLocation (RestCallback cb)
 
int execRemoveDeviceLocation (String idPlug, RestCallback cb)
 
int execGetChannels (String channelMask, String params, RestCallback cb)
 
int execGetChannels (String channelMask, RestCallback cb)
 
int execGetChannels (String channelMask, Object at, String of, int offset, int limit, RestCallback cb)
 
int execGetChannels (String channelMask, Object at, String of, RestCallback cb)
 
int execGetChannels (String channelMask, Object before, Object after, String of, int offset, int limit, RestCallback cb)
 
int execGetChannels (String channelMask, Object before, Object after, String of, RestCallback cb)
 
int execRetrieveData (String channelMask, RestCallback cb)
 
int execRetrieveData (String channelMask, String params, RestCallback cb)
 
int execRetrieveData (String channelMask, Object at, String of, int offset, int limit, RestCallback cb)
 
int execRetrieveData (String channelMask, Object before, Object after, String of, int offset, int limit, RestCallback cb)
 
int execPublishData (String channelName, String body, RestCallback cb)
 
int execPublishData (String channelName, Object data, Object at, String of, Object ttlOrExpire, RestCallback cb)
 
int execPublishData (String channelName, Object data, Object at, Object ttlOrExpire, RestCallback cb)
 
int execPublishData (String channelName, String id, Object data, Object at, String of, Object ttlOrExpire, RestCallback cb)
 
int execPublishData (String channelName, String id, Object data, Object at, Object ttlOrExpire, RestCallback cb)
 
int execPublishData (String channelName, Object data, Object at, String of, RestCallback cb)
 
int execPublishData (String channelName, Object data, Object at, RestCallback cb)
 
int execRemoveData (String channelMask, String body, RestCallback cb)
 
int execRemoveData (String channelMask, Object at, String of, RestCallback cb)
 
int execRemoveData (String channelMask, Object before, Object after, String of, RestCallback cb)
 
int execRemoveData (String[] ids, RestCallback cb)
 
int execRemoveData (String id, RestCallback cb)
 
- Public Member Functions inherited from RestBaseManager
Opts getOpts ()
 
String getAuthId ()
 
boolean isEmpty ()
 
RestJob getJobOf (int id)
 
Response sync (int id, long timeout)
 
Response sync (int id)
 
boolean cancel (int id)
 
boolean cancel (Request request)
 
boolean waitFor (int id, long timeout)
 
boolean waitFor (int id)
 
boolean waitForIdle (long timeout)
 
boolean waitForIdle ()
 
boolean waitForStop (long timeout)
 
boolean waitForStop ()
 
- Public Member Functions inherited from MultiListener
 MultiListener ()
 
boolean hasListener (Listener l)
 
Listener getListener (int location)
 
void addListener (Listener l)
 
boolean removeListener (Listener l)
 
Listener removeListener (int location)
 
void clearListeners ()
 
Listener getListener ()
 
final 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)
 
- 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 String EVT_ENROLL = "enroll"
 
static final String K_MODEL = "model"
 
static final String K_HWID = "hwid"
 
static final String K_PASS = "pass"
 
static final String K_CTRL = "ctrl"
 
static final String K_NAME = "name"
 
static final String K_PROPS = "props"
 
static final String K_DATA = "data"
 
static final String K_OF = "of"
 
static final String K_AT = "at"
 
static final String K_BEFORE = "before"
 
static final String K_AFTER = "after"
 
static final String K_OFFSET = "offset"
 
static final String K_LIMIT = "limit"
 
static final String K_TTL = "ttl"
 
static final String K_EXPIRE = "expire_at"
 
static final String K_ID = "id"
 
static final String K_AUTH = "auth"
 
static final String K_STATUS = "status"
 
static final String K_PERM = "perm"
 
static final String K_LOCATION = "location"
 
static final String LOCATION_LONGITUDE = "x"
 
static final String LOCATION_LATITUDE = "y"
 
static final String LOCATION_ALTITUDE = "z"
 
static final String LOCATION_ACCURACY = "r"
 
static final String LOCATION_TIME = "t"
 
static final String STATUS_OK = "ok"
 
static final String STATUS_DISABLED = "disabled"
 
static final String STATUS_REACTIVATE = "reactivate"
 
- Static Public Attributes inherited from RestBaseManager
static final int ID_NULL = RestSpooler.ID_NULL
 

Protected Member Functions

 RestManager (RestSpooler spooler, Opts opts)
 
RestCallback makeEnrollCb (final RestCallback cb)
 
- Protected Member Functions inherited from RestBaseManager
 RestBaseManager (RestSpooler spooler, Opts opts)
 
RestSpooler getSpooler ()
 
int execRequest (Request request, RestCallback cb)
 
int execGet (String action, String path, RestCallback cb)
 
int execPut (String action, String path, String body, RestCallback cb)
 
int execPost (String action, String path, String body, RestCallback cb)
 
int execPatch (String action, String path, String body, RestCallback cb)
 
int execDelete (String action, String path, String body, RestCallback cb)
 
int execRequest (String method, String action, String path, String body, RestCallback cb)
 
int execRequest (String method, String action, String path, RestCallback cb, Object... body)
 
void finalize () throws Throwable
 
void wantAuth ()
 
void wantBasicAuth ()
 
void wantEmailAuth ()
 
void wantMasterAuth ()
 
void wantDeviceAuth ()
 
void wantNoEmailAuth ()
 
void wantNoAuth ()
 
void wantNoDeviceAuth ()
 

Static Protected Member Functions

static Object [] toExpireKV (Object val)
 
- Static Protected Member Functions inherited from RestBaseManager
static String bodyGen (Object... args)
 
static String queryGen (Object... args)
 
static String pathQuery (String path, String query)
 
static String esc (Object s) throws UnsupportedEncodingException
 
static Object queryCast (Object o) throws UnsupportedEncodingException
 
static Object ts (Object val, String err)
 
static Object tso (Object val, String err)
 
static Object tsp (Object val, String err)
 
static void runOnCb (RestCallback cb, Runnable runnable)
 

Static Protected Attributes

static final String ACTION_DEVICE = "device"
 
static final String ACTION_DATA = "data"
 
static final String ACTION_CHANNEL = "channel"
 

Additional Inherited Members

- Protected Attributes inherited from RestBaseManager
final Opts opts
 
final RestSpooler spooler
 
- Protected Attributes inherited from MetaListener
Listener listener
 

Detailed Description

Class for handling remote requests with CloudPlugs server.

An instance of this class can be obtained by calling RestClient#getManager(Opts). Most methods of this class send requests to the server and are named using the prefix exec. Such methods are executed in an asynchronous way, that implies the invokation will return as soon as possible, usually before sending the request over the network.

All the requests will be serially enqueued and sent (following the order of method calls) in a separated thread spooler, transparent to the developer. The last argument of each request method is an instance of the interface RestCallback, its method RestCallback#on will receive the results of the asynchronous execution: the produced Request and its Response. The method RestCallback#on will be called by the underlying spooler and it will be executed in the thread of the underlying spooler, keep it in mind because any invokation requires main thread execution (for example GUI update) will fail if directly called from a RestCallback#on implementation.

The return value of all exec prefixed methods is an integer identifier for controlling the request execution flow. For instance, you can call RestBaseManager#cancel(int) to cancel an enqueued request or you can call RestBaseManager#waitFor(int) to wait for the completition of an enqueued request.
See RestBaseManager for additional details.

Constructor & Destructor Documentation

◆ RestManager()

RestManager ( RestSpooler  spooler,
Opts  opts 
)
protected

Member Function Documentation

◆ execControlDevice() [1/2]

int execControlDevice ( String  body,
RestCallback  cb 
)

Enqueue an asynchronous request for asking grants to control another device. This is the a low level method you can directly set the body of the HTTP request. See execControlDevice(String, String, String, RestCallback) for a more convenient way to enroll a controller. Device authentication credentials must be set before invoking this method.

Parameters
bodythe JSON body of the HTTP request to send
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error
See also
execEnrollController(String, RestCallback) to enroll a controller

◆ execControlDevice() [2/2]

int execControlDevice ( String  model,
String  ctrl,
String  pass,
RestCallback  cb 
)

Enqueue an asynchronous request for asking grants to control another device. Device authentication credentials must be set before invoking this method.

Parameters
modelthe model identifier of the device to control
ctrlthe serial number of the device to control
passthe secret password for controlling the device
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error
See also
execEnrollController(String, String, String, String, String, JSONObject, RestCallback) for enrolling a controller

◆ execEnrollController() [1/2]

int execEnrollController ( String  body,
RestCallback  cb 
)

Enqueue an asynchronous request for enrolling a controller. This is the a low level method you can directly set the body of the HTTP request. See execEnrollController(String, String, String, String, String, JSONObject, RestCallback) for a more convenient way to enroll a controller. Device authentication credentials cannot be set before invoking this method.

Parameters
bodythe JSON body of the HTTP request to send
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error
See also
execControlDevice(String, RestCallback) to control a device without enrolling

◆ execEnrollController() [2/2]

int execEnrollController ( String  model,
String  ctrl,
String  pass,
String  hwid,
String  name,
JSONObject  props,
RestCallback  cb 
)

Enqueue an asynchronous request for enrolling a controller. Device authentication credentials cannot be set before invoking this method.

Parameters
modelthe model identifier of the device to control
ctrlthe serial number of the device to control
passthe secret password for controlling the device
hwidif not null, a unique String to identify this controller (if null, it will be automatically computed by the server)
nameif not null, the name of this controller
propsif not null, the additional properties (key-value pairs) of this controller
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionwhen having authentication credentials or IllegalArgumentException for argument validation error
See also
execControlDevice(String, String, String, RestCallback) to control a device without enrolling

◆ execEnrollProduct() [1/2]

int execEnrollProduct ( String  body,
RestCallback  cb 
)

Enqueue an asynchronous request for enrolling a production thing. This is the a low level method you can directly set the body of the HTTP request. See execEnrollProduct(String, String, String, JSONObject, RestCallback) for a more convenient way to enroll a production thing. Device authentication credentials cannot be set before invoking this method.

Parameters
bodythe JSON body of the HTTP request to send
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execEnrollProduct() [2/2]

int execEnrollProduct ( String  model,
String  hwid,
String  pass,
JSONObject  props,
RestCallback  cb 
)

Enqueue an asynchronous request for enrolling a production thing. Device authentication credentials cannot be set before invoking this method.

Parameters
modelthe model identifier of this device
hwidthe serial number of this device
passthe secret password for enrolling this device
propsif not null, the additional properties (key-value pairs) of this device as an instance of org.json.JSONObject
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionwhen having authentication credentials or IllegalArgumentException for argument validation error

◆ execEnrollPrototype() [1/2]

int execEnrollPrototype ( String  body,
RestCallback  cb 
)

Enqueue an asynchronous request for enrolling a new prototype. This is the a low level method you can directly set the body of the HTTP request. See execEnrollPrototype(String, String, String, JSONObject, JSONObject, RestCallback) for a more convenient way to enroll a production thing. Email authentication credentials must be set before invoking this method.

Parameters
bodythe JSON body of the HTTP request to send
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execEnrollPrototype() [2/2]

int execEnrollPrototype ( String  pass,
String  name,
String  hwid,
JSONObject  perm,
JSONObject  props,
RestCallback  cb 
)

Enqueue an asynchronous request for enrolling a new prototype. Email authentication credentials must be set before invoking this method.

Parameters
passfor setting the authentication password of the new prototype
namea unique String name for this prototype
hwidif not null, a unique String to identify this device (if null, it will be automatically computed by the server)
propsif not null, the additional properties (key-value pairs) of this device as an instance of org.json.JSONObject
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execGetChannels() [1/6]

int execGetChannels ( String  channelMask,
String  params,
RestCallback  cb 
)

Enqueue an asynchronous request for getting all existing channel names match with the given mask and such that all conditions in the query parameters are satisfied. See execGetChannels(String, Object, String, int, int, RestCallback) and execGetChannels(String, Object, Object, String, int, int, RestCallback) for more convenient ways to get the channel names. Authentication credentials must be set before invoking this method.

Parameters
channelMaskthe channel mask used to filter the results
paramsthe query parameters with the conditions or null if no condition should be applied
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execGetChannels() [2/6]

int execGetChannels ( String  channelMask,
RestCallback  cb 
)

Enqueue an asynchronous request for getting all existing channel names match with the given mask. Authentication credentials must be set before invoking this method.

Parameters
channelMaskthe channel mask used to filter the results
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execGetChannels() [3/6]

int execGetChannels ( String  channelMask,
Object  at,
String  of,
int  offset,
int  limit,
RestCallback  cb 
)

Enqueue an asynchronous request for getting all existing channel names match with the given mask and such that all specified conditions in the other arguments are satified. Authentication credentials must be set before invoking this method.

Parameters
channelMaskthe channel mask used to filter the results
atif not null, timestamp: the channels must contain data published on specified timestamp (Number, String or java.util.Date)
ofif not null, PlugIDs CSV: the channels must contain data published by one of the specified PlugIDs
offsethow many result channels to skip in the response, 0 to avoid skipping
limitmaximum number of channels to include in the response, 0 to get as many as possible
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execGetChannels() [4/6]

int execGetChannels ( String  channelMask,
Object  at,
String  of,
RestCallback  cb 
)

Enqueue an asynchronous request for getting all existing channel names match with the given mask and such that all specified conditions in the other arguments are satified. Authentication credentials must be set before invoking this method.

Parameters
channelMaskthe channel mask used to filter the results
atif not null, timestamp: the channels must contain data published on specified timestamp (Number, String or java.util.Date)
ofif not null, PlugIDs CSV: the channels must contain data published by one of the specified PlugIDs
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execGetChannels() [5/6]

int execGetChannels ( String  channelMask,
Object  before,
Object  after,
String  of,
int  offset,
int  limit,
RestCallback  cb 
)

Enqueue an asynchronous request for getting all existing channel names match with the given mask and such that all specified conditions in the other arguments are satified. Authentication credentials must be set before invoking this method.

Parameters
channelMaskthe channel mask used to filter the results
beforeif not null, timestamp or data ID: the channels must contain data published before the timestamp (Number, String or java.util.Date) or before the data ID
afterif not null, timestamp or data ID: the channels must contain data published after the timestamp (Number, String or java.util.Date) or after the data ID
ofif not null, PlugIDs CSV: the channels must contain data published by one of the specified PlugIDs
offsethow many result channels to skip in the response, 0 to avoid skipping
limitmaximum number of channels to include in the response, 0 to get as many as possible
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execGetChannels() [6/6]

int execGetChannels ( String  channelMask,
Object  before,
Object  after,
String  of,
RestCallback  cb 
)

Enqueue an asynchronous request for getting all existing channel names match with the given mask and such that all specified conditions in the other arguments are satified. Authentication credentials must be set before invoking this method.

Parameters
channelMaskthe channel mask used to filter the results
beforeif not null, timestamp or data ID: the channels must contain data published before the timestamp (Number, String or java.util.Date) or before the data ID
afterif not null, timestamp or data ID: the channels must contain data published after the timestamp (Number, String or java.util.Date) or after the data ID
ofif not null, PlugIDs CSV: the channels must contain data published by one of the specified PlugIDs
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execGetDevice() [1/2]

int execGetDevice ( String  idPlug,
RestCallback  cb 
)

Enqueue an asynchronous request for getting all the information about a specific device. The response could fail if the authentication credentials don't have enough grants to read such information. Authentication credentials must be set before invoking this method.

Parameters
idPlugthe PlugID identifies the device to read
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execGetDevice() [2/2]

int execGetDevice ( RestCallback  cb)

Enqueue an asynchronous request for getting all the information about this device. Device authentication credentials must be set before invoking this method.

Parameters
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execGetDeviceLocation() [1/2]

int execGetDeviceLocation ( RestCallback  cb)

Enqueue an asynchronous request for getting the value of the location additional property of this device. Device authentication credentials must be set before invoking this method.

Parameters
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execGetDeviceLocation() [2/2]

int execGetDeviceLocation ( String  idPlug,
RestCallback  cb 
)

Enqueue an asynchronous request for getting the value of the location additional property of the given device. The response could fail if the authentication credentials don't have enough grants to read the location. Authentication credentials must be set before invoking this method.

Parameters
idPlugthe PlugID identifies the device to read
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execGetDeviceProp() [1/2]

int execGetDeviceProp ( String  prop,
RestCallback  cb 
)

Enqueue an asynchronous request for getting the value of a specific additional property of this device. Device authentication credentials must be set before invoking this method.

Parameters
propthe name of the additional property to get, if null the entire additional properties JSON object will be got
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execGetDeviceProp() [2/2]

int execGetDeviceProp ( String  idPlug,
String  prop,
RestCallback  cb 
)

Enqueue an asynchronous request for getting the value of a specific additional property of the given device. The response could fail if the authentication credentials don't have enough grants to read such property. Authentication credentials must be set before invoking this method.

Parameters
idPlugthe PlugID identifies the device to read
propthe name of the additional property to get, if null the entire additional properties JSON object will be got
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execPublishData() [1/7]

int execPublishData ( String  channelName,
String  body,
RestCallback  cb 
)

Enqueue an asynchronous request for publishing data. This is the a low level method you can specify directly the body of the request. See execPublishData(String, Object, Object, String, Object, RestCallback), execPublishData(String, Object, Object, String, RestCallback), execPublishData(String, Object, Object, Object, RestCallback) and execPublishData(String, Object, Object, RestCallback) for more convenient ways to publish data. Authentication credentials must be set before invoking this method.

Parameters
channelNamethe channel name to publish data to
bodythe JSON body of the HTTP request to send
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execPublishData() [2/7]

int execPublishData ( String  channelName,
Object  data,
Object  at,
String  of,
Object  ttlOrExpire,
RestCallback  cb 
)

Enqueue an asynchronous request for publishing data. Authentication credentials must be set before invoking this method.

Parameters
channelNamethe channel name to publish data to
datathe JSON data to publish
atthe timestamp (Number, String or java.util.Date) of the data, if null the server will automatically set this value as the current date
ofthe Plug-ID string of the publisher of the data; null means this device
ttlOrExpireif not null, an expire timestamp (Number, String or java.util.Date) to set when this data will be automatically removed or a time-to-live of the data in seconds
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execPublishData() [3/7]

int execPublishData ( String  channelName,
Object  data,
Object  at,
Object  ttlOrExpire,
RestCallback  cb 
)

Enqueue an asynchronous request for publishing data. Authentication credentials must be set before invoking this method.

Parameters
channelNamethe channel name to publish data to
datathe JSON data to publish
atthe timestamp (Number, String or java.util.Date) of the data, if null the server will automatically set this value as the current date
ttlOrExpireif not null, an expire timestamp (Number, String or java.util.Date) to set when this data will be automatically removed or a time-to-live of the data in seconds
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execPublishData() [4/7]

int execPublishData ( String  channelName,
String  id,
Object  data,
Object  at,
String  of,
Object  ttlOrExpire,
RestCallback  cb 
)

Enqueue an asynchronous request for publishing new data or changing an already published data. The response could fail if the authentication credentials don't have enough grants to complete the publication. Authentication credentials must be set before invoking this method.

Parameters
channelNamethe channel name to publish data to
idnull for publishing new data, otherwise the id of a previously published data to modify
datathe JSON data to publish
atthe timestamp (Number, String or java.util.Date) of the data, if null the server will automatically set this value as the current date
ofthe Plug-ID string of the publisher of the data; null means this device
ttlOrExpireif not null, an expire timestamp (Number, String or java.util.Date) to set when this data will be automatically removed or a time-to-live of the data in seconds
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execPublishData() [5/7]

int execPublishData ( String  channelName,
String  id,
Object  data,
Object  at,
Object  ttlOrExpire,
RestCallback  cb 
)

Enqueue an asynchronous request for publishing new data or changing an already published data. The response could fail if the authentication credentials don't have enough grants to complete the publication. Authentication credentials must be set before invoking this method.

Parameters
channelNamethe channel name to publish data to
idnull for publishing new data, otherwise the id of a previously published data to modify
datathe JSON data to publish
atthe timestamp (Number, String or java.util.Date) of the data, if null the server will automatically set this value as the current date
ttlOrExpireif not null, an expire timestamp (Number, String or java.util.Date) to set when this data will be automatically removed or a time-to-live of the data in seconds
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execPublishData() [6/7]

int execPublishData ( String  channelName,
Object  data,
Object  at,
String  of,
RestCallback  cb 
)

Enqueue an asynchronous request for publishing data. Authentication credentials must be set before invoking this method.

Parameters
channelNamethe channel name to publish data to
datathe JSON data to publish
atthe timestamp (Number, String or java.util.Date) of the data, if null the server will automatically set this value as the current date
ofthe Plug-ID string of the publisher of the data; null means this device
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execPublishData() [7/7]

int execPublishData ( String  channelName,
Object  data,
Object  at,
RestCallback  cb 
)

Enqueue an asynchronous request for publishing data. Authentication credentials must be set before invoking this method.

Parameters
channelNamethe channel name to publish data to
datathe JSON data to publish
atthe timestamp (Number, String or java.util.Date) of the data, if null the server will automatically set this value as the current date
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execRemoveData() [1/5]

int execRemoveData ( String  channelMask,
String  body,
RestCallback  cb 
)

Enqueue an asynchronous request for removing already published data. This is the a low level method you can specify directly the body of the request. See execRemoveData(String[], RestCallback), execRemoveData(String, Object, Object, String, RestCallback) and execRemoveData(String, Object, String, RestCallback) for more convenient ways to remove data. The response could fail if the authentication credentials don't have enough grants to complete the operation. Authentication credentials must be set before invoking this method.

Parameters
channelMaskthe channel mask such that all data contained in it will be removed
bodythe JSON body of the HTTP request
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execRemoveData() [2/5]

int execRemoveData ( String  channelMask,
Object  at,
String  of,
RestCallback  cb 
)

Enqueue an asynchronous request for removing already published data. The response could fail if the authentication credentials don't have enough grants to complete the operation. Authentication credentials must be set before invoking this method.

Parameters
channelMaskthe channel mask such that all data contained in it will be removed
atif not null, remove only data published at this timestamp (Number, String or java.util.Date)
ofif not null, remove only data published by this PlugID or CSV of Plug-IDs
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execRemoveData() [3/5]

int execRemoveData ( String  channelMask,
Object  before,
Object  after,
String  of,
RestCallback  cb 
)

Enqueue an asynchronous request for removing already published data. The response could fail if the authentication credentials don't have enough grants to complete the operation. Authentication credentials must be set before invoking this method.

Parameters
channelMaskthe channel mask such that all data contained in it will be removed
beforeif not null, remove only data published before this timestamp (Number, String or java.util.Date)
afterif not null, remove only data published after this timestamp (Number, String or java.util.Date)
ofif not null, remove only data published by this PlugID or CSV of Plug-IDs
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execRemoveData() [4/5]

int execRemoveData ( String []  ids,
RestCallback  cb 
)

Enqueue an asynchronous request for removing already published data. The response could fail if the authentication credentials don't have enough grants to complete the operation. Authentication credentials must be set before invoking this method.

Parameters
idsarray of all data ID to remove
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execRemoveData() [5/5]

int execRemoveData ( String  id,
RestCallback  cb 
)

Enqueue an asynchronous request for removing already published data. The response could fail if the authentication credentials don't have enough grants to complete the operation. Authentication credentials must be set before invoking this method.

Parameters
idthe data ID to remove
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execRemoveDeviceLocation() [1/2]

int execRemoveDeviceLocation ( RestCallback  cb)

Enqueue an asynchronous request for removing the location additional property of this device. Device authentication credentials must be set before invoking this method.

Parameters
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execRemoveDeviceLocation() [2/2]

int execRemoveDeviceLocation ( String  idPlug,
RestCallback  cb 
)

Enqueue an asynchronous request for removing the location additional property of the given device. The response could fail if the authentication credentials don't have enough grants to remove the property. Authentication credentials must be set before invoking this method.

Parameters
idPlugthe PlugID identifies the device to modify
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execRemoveDeviceProp() [1/2]

int execRemoveDeviceProp ( String  idPlug,
String  prop,
RestCallback  cb 
)

Enqueue an asynchronous request for removing a specific additional property of the given device. The response could fail if the authentication credentials don't have enough grants to remove the property. Authentication credentials must be set before invoking this method.

Parameters
idPlugthe PlugID identifies the device to modify
propthe name of the additional property to remove
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execRemoveDeviceProp() [2/2]

int execRemoveDeviceProp ( String  prop,
RestCallback  cb 
)

Enqueue an asynchronous request for removing a specific additional property of this device. Device authentication credentials must be set before invoking this method.

Parameters
propthe name of the additional property to remove
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execRetrieveData() [1/4]

int execRetrieveData ( String  channelMask,
RestCallback  cb 
)

Enqueue an asynchronous request for retrieving already published data. Authentication credentials must be set before invoking this method.

Parameters
channelMaskthe channel mask used to filter which data should be retrieved
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
IllegalArgumentExceptionif an argument is not valid.
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execRetrieveData() [2/4]

int execRetrieveData ( String  channelMask,
String  params,
RestCallback  cb 
)

Enqueue an asynchronous request for retrieving already published data. This is the a low level method you can specify directly the URL query of the request. See execRetrieveData(String, RestCallback), execRetrieveData(String, Object, String, int, int, RestCallback) and execRetrieveData(String, Object, Object, String, int, int, RestCallback) for more convenient ways to retrieve published data. Authentication credentials must be set before invoking this method.

Parameters
channelMaskthe channel mask used to filter which data should be retrieved
paramsif not null the parameters string of the query url
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execRetrieveData() [3/4]

int execRetrieveData ( String  channelMask,
Object  at,
String  of,
int  offset,
int  limit,
RestCallback  cb 
)

Enqueue an asynchronous request for retrieving already published data. Optionally filter the data by Plug-IDs of data publishers and/or by the timestamp atat when data has been published. Authentication credentials must be set before invoking this method.

Parameters
channelMaskthe channel mask used to filter which data should be retrieved
atif not null, the timestamp (Number, String or java.util.Date) the data has been published
ofif not null, the CSV string of Plug-IDs published the data to retrieve
offsetif greater than zero, the resulting response will contain values after the offset-th one
limitif greater than zero, the resulting response will contain at most
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execRetrieveData() [4/4]

int execRetrieveData ( String  channelMask,
Object  before,
Object  after,
String  of,
int  offset,
int  limit,
RestCallback  cb 
)

Enqueue an asynchronous request for retrieving already published data. Optionally filter the data to retrieve by Plug-IDs of data publishers and/or by choosing specific intervals with before afterafter. Authentication credentials must be set before invoking this method.

Parameters
channelMaskthe channel mask used to filter which data should be retrieved
beforeif not null, the most recent timestamp (Number, String or java.util.Date) of the data to retrieve or a String contains the published data ID before which retrieve the data
afterif not null, the minimum timestamp (Number, String or java.util.Date) of the data to retrieve or a String contains the published data ID after which retrieve the data
ofif not null, the CSV string of Plug-IDs published the data to retrieve
offsetif greater than zero, the resulting response will contain values after the offset-th one
limitif greater than zero, the resulting response will contain at most
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execSetDevice() [1/4]

int execSetDevice ( String  body,
RestCallback  cb 
)

Enqueue an asynchronous request for setting information about this device. This is the a low level method you can directly set the body of the HTTP request. See execSetDevice(String, JSONObject, RestCallback) for a more convenient way to set the information of this device. Device authentication credentials must be set before invoking this method.

Parameters
bodythe JSON body of the HTTP request to send
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execSetDevice() [2/4]

int execSetDevice ( String  idPlug,
String  body,
RestCallback  cb 
)

Enqueue an asynchronous request for setting information about a specific device. This is the a low level method you can directly set the body of the HTTP request. See execSetDevice(String, String, JSONObject, String, JSONObject, RestCallback) for a more convenient way to set the information of this device. The response could fail if the authentication credentials don't have enough grants to write such information. Authentication credentials must be set before invoking this method.

Parameters
idPlugthe PlugID identifies the device to modify
bodythe JSON body of the HTTP request to send
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execSetDevice() [3/4]

int execSetDevice ( String  name,
JSONObject  props,
RestCallback  cb 
)

Enqueue an asynchronous request for setting information of this device. Device authentication credentials must be set before invoking this method.

Parameters
nameif not null, the new name of this device
propsif not null, the additional properties (key-value pairs) to set for this device
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execSetDevice() [4/4]

int execSetDevice ( String  idPlug,
String  name,
JSONObject  props,
String  status,
JSONObject  perm,
RestCallback  cb 
)

Enqueue an asynchronous request for setting information of a specific device. The response could fail if the authentication credentials don't have enough grants to write such information. Authentication credentials must be set before invoking this method.

Parameters
idPlugthe PlugID identifies the device to modify
nameif not null, the new name of this device
propsif not null, the additional properties (key-value pairs) to set for this device
statusif not null, the new status of the device, one of STATUS_OK, STATUS_DISABLED or STATUS_REACTIVATE (the last one won't work on prototypes and controllers, but only on production things)
permif not null, a JSON of the new permission object to assign to the device
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execSetDeviceLocation() [1/4]

int execSetDeviceLocation ( Number  lon,
Number  lat,
Number  alt,
Number  accuracy,
Object  time,
RestCallback  cb 
)

Enqueue an asynchronous request for setting the value of the location additional property of this device. Device authentication credentials must be set before invoking this method.

Parameters
lonthe longitude from -180 to 180, it cannot be null
latthe latitude from -90 to 90, it cannot be null
altthe altitude in meters over the sea or null if this location has no altitude
accuracythe location accuracy in meters or null if this location has no accuracy
timeif not null, the timestamp (Number, String or java.util.Date) this location has been measured
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execSetDeviceLocation() [2/4]

int execSetDeviceLocation ( String  idPlug,
Number  lon,
Number  lat,
Number  alt,
Number  accuracy,
Object  time,
RestCallback  cb 
)

Enqueue an asynchronous request for setting the value of the location additional property of the given device. The response could fail if the authentication credentials don't have enough grants to write the location. Authentication credentials must be set before invoking this method.

Parameters
idPlugthe PlugID identifies the device to modify
lonthe longitude from -180 to 180, it cannot be null
latthe latitude from -90 to 90, it cannot be null
altthe altitude in meters over the sea or null if this location has no altitude
accuracythe location accuracy in meters or null if this location has no accuracy
timeif not null, the timestamp (Number, String or java.util.Date) this location has been measured
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execSetDeviceLocation() [3/4]

int execSetDeviceLocation ( String  idPlug,
String  location,
RestCallback  cb 
)

Enqueue an asynchronous request for setting the value of the location additional property of the given device. See execSetDeviceLocation(String, Number, Number, Number, Number, Object, RestCallback) for a more convenient way to set the location. The response could fail if the authentication credentials don't have enough grants to write the location. Authentication credentials must be set before invoking this method.

Parameters
idPlugthe PlugID identifies the device to modify
locationthe JSON object of the location to set
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execSetDeviceLocation() [4/4]

int execSetDeviceLocation ( String  location,
RestCallback  cb 
)

Enqueue an asynchronous request for setting the value of the location additional property of this device. See execSetDeviceLocation(Number, Number, Number, Number, Object, RestCallback) for a more convenient way to set the location. Device authentication credentials must be set before invoking this method.

Parameters
locationthe JSON object of the location to set
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execSetDeviceProp() [1/2]

int execSetDeviceProp ( String  prop,
String  value,
RestCallback  cb 
)

Enqueue an asynchronous request for setting the value of one or more additional properties of this device. Device authentication credentials must be set before invoking this method.

Parameters
propthe name of the additional property to set, if null then value will contain a JSON object of all additional properties to set
valuethe JSON value to set for the property prop or if prop is null it contains the JSON object of all additional properties to set
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execSetDeviceProp() [2/2]

int execSetDeviceProp ( String  idPlug,
String  prop,
String  value,
RestCallback  cb 
)

Enqueue an asynchronous request for setting the value of one or more additional properties of the given device. The response could fail if the authentication credentials don't have enough grants to write such properties. Authentication credentials must be set before invoking this method.

Parameters
idPlugthe PlugID identifies the device to modify
propthe name of the additional property to set, if null then value will contain a JSON object of all additional properties to set
valuethe JSON value to set for the property prop or if prop is null it contains the JSON object of all additional properties to set
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execUncontrolDevice() [1/2]

int execUncontrolDevice ( String  idPlug,
RestCallback  cb 
)

Enqueue an asynchronous request for releasing the control of a device. Successful responses require the control of the device was already been grant. Device authentication credentials must be set before invoking this method.

Parameters
idPlugthe PlugID identifies the device to release control; you can pass a CSV of PlugIDs to release the control of more devices at the same time
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execUncontrolDevice() [2/2]

int execUncontrolDevice ( String []  idPlugs,
RestCallback  cb 
)

Enqueue an asynchronous request for releasing the control of one or more devices. Successful responses require the control of the devices was already been grant. Device authentication credentials must be set before invoking this method.

Parameters
idPlugsone or more PlugIDs identify the devices to release control
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execUnenroll() [1/3]

int execUnenroll ( RestCallback  cb)

Unenroll this device and remove all data stored in the cloud and related to this device. Device authentication credentials must be set before invoking this method.

Parameters
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials

◆ execUnenroll() [2/3]

int execUnenroll ( String  idPlug,
RestCallback  cb 
)

Unenroll the specified device and remove all data stored in the cloud and related to that device. Email authentication credentials must be set before invoking this method.

Parameters
idPlugthe PlugID identifies the device to unenroll
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ execUnenroll() [3/3]

int execUnenroll ( String []  idPlugs,
RestCallback  cb 
)

Unenroll the specified devices and remove all data stored in the cloud and related to those devices. Email authentication credentials must be set before invoking this method.

Parameters
idPlugsthe PlugIDs identify the devices to unenroll
cbif not null, the callback will receive the Request and its Response
Returns
the identifier of this asynchronous execution
Exceptions
RestExceptionfor invalid authentication credentials or IllegalArgumentException for argument validation error

◆ makeEnrollCb()

RestCallback makeEnrollCb ( final RestCallback  cb)
protected

◆ toExpireKV()

static Object [] toExpireKV ( Object  val)
staticprotected

Member Data Documentation

◆ ACTION_CHANNEL

final String ACTION_CHANNEL = "channel"
staticprotected

◆ ACTION_DATA

final String ACTION_DATA = "data"
staticprotected

◆ ACTION_DEVICE

final String ACTION_DEVICE = "device"
staticprotected

◆ EVT_ENROLL

final String EVT_ENROLL = "enroll"
static

Event String used to notify any registered com.cloudplugs.util.Listener about a successful enroll.

◆ K_AFTER

final String K_AFTER = "after"
static

◆ K_AT

final String K_AT = "at"
static

◆ K_AUTH

final String K_AUTH = "auth"
static

◆ K_BEFORE

final String K_BEFORE = "before"
static

◆ K_CTRL

final String K_CTRL = "ctrl"
static

◆ K_DATA

final String K_DATA = "data"
static

◆ K_EXPIRE

final String K_EXPIRE = "expire_at"
static

◆ K_HWID

final String K_HWID = "hwid"
static

◆ K_ID

final String K_ID = "id"
static

◆ K_LIMIT

final String K_LIMIT = "limit"
static

◆ K_LOCATION

final String K_LOCATION = "location"
static

◆ K_MODEL

final String K_MODEL = "model"
static

◆ K_NAME

final String K_NAME = "name"
static

◆ K_OF

final String K_OF = "of"
static

◆ K_OFFSET

final String K_OFFSET = "offset"
static

◆ K_PASS

final String K_PASS = "pass"
static

◆ K_PERM

final String K_PERM = "perm"
static

◆ K_PROPS

final String K_PROPS = "props"
static

◆ K_STATUS

final String K_STATUS = "status"
static

◆ K_TTL

final String K_TTL = "ttl"
static

◆ LOCATION_ACCURACY

final String LOCATION_ACCURACY = "r"
static

◆ LOCATION_ALTITUDE

final String LOCATION_ALTITUDE = "z"
static

◆ LOCATION_LATITUDE

final String LOCATION_LATITUDE = "y"
static

◆ LOCATION_LONGITUDE

final String LOCATION_LONGITUDE = "x"
static

◆ LOCATION_TIME

final String LOCATION_TIME = "t"
static

◆ STATUS_DISABLED

final String STATUS_DISABLED = "disabled"
static

◆ STATUS_OK

final String STATUS_OK = "ok"
static

◆ STATUS_REACTIVATE

final String STATUS_REACTIVATE = "reactivate"
static