public final class ReliableWriteRequest extends RequestQueue
handler, requestHandler| Constructor and Description |
|---|
ReliableWriteRequest() |
| Modifier and Type | Method and Description |
|---|---|
void |
abort()
Alias for
cancelQueue(). |
ReliableWriteRequest |
add(Operation operation)
Enqueues a new operation.
|
ReliableWriteRequest |
before(BeforeCallback callback)
Sets a callback that will be executed before the execution of this operation starts.
|
void |
cancelQueue()
Cancels all the enqueued operations that were not executed yet.
|
ReliableWriteRequest |
done(SuccessCallback callback)
Use to set a completion callback.
|
ReliableWriteRequest |
fail(FailCallback callback)
Use to set a callback that will be called in case the request has failed.
|
ReliableWriteRequest |
invalid(InvalidRequestCallback callback)
Use to set a callback that will be called in case the request was invalid, for example
called before the device was connected.
|
ReliableWriteRequest |
setHandler(android.os.Handler handler)
Sets the handler that will be used to invoke callbacks.
|
int |
size()
Returns number of enqueued operations.
|
await, isEmptycreateBond, enqueue, newConnectionPriorityRequest, newDisableBatteryLevelNotificationsRequest, newDisableIndicationsRequest, newDisableNotificationsRequest, newEnableBatteryLevelNotificationsRequest, newEnableIndicationsRequest, newEnableNotificationsRequest, newMtuRequest, newReadBatteryLevelRequest, newReadPhyRequest, newReadRequest, newReadRequest, newReadRssiRequest, newRefreshCacheRequest, newSetPreferredPhyRequest, newSleepRequest, newWaitForIndicationRequest, newWaitForNotificationRequest, newWriteRequest, newWriteRequest, newWriteRequest, newWriteRequest, newWriteRequest, newWriteRequest, removeBond@NonNull public ReliableWriteRequest setHandler(@NonNull android.os.Handler handler)
RequestBleManager will be used.setHandler in class RequestQueuehandler - The handler to invoke callbacks for this request.@NonNull public ReliableWriteRequest done(@NonNull SuccessCallback callback)
Requestdone in class RequestQueuecallback - the callback.@NonNull public ReliableWriteRequest fail(@NonNull FailCallback callback)
RequestBleManager.connect(BluetoothDevice) was never called), the
Request.invalid(InvalidRequestCallback) will be used instead, as the
BluetoothDevice is not known.
This callback will be ignored if request was executed synchronously, in which case the error will be returned as an exception.
fail in class RequestQueuecallback - the callback.@NonNull public ReliableWriteRequest invalid(@NonNull InvalidRequestCallback callback)
Requestinvalid in class RequestQueuecallback - the callback.@NonNull public ReliableWriteRequest before(@NonNull BeforeCallback callback)
Requestbefore in class RequestQueuecallback - the callback.@NonNull public ReliableWriteRequest add(@NonNull Operation operation)
RequestQueueadd in class RequestQueueoperation - the new operation to be enqueued.public void cancelQueue()
RequestQueue
It is safe to call this method in Request.done(SuccessCallback) or
Request.fail(FailCallback) callback;
cancelQueue in class RequestQueuepublic void abort()
cancelQueue().public int size()
RequestQueuesize in class RequestQueue