public final class SleepRequest extends SimpleRequest implements Operation
handler, requestHandler| Modifier and Type | Method and Description |
|---|---|
SleepRequest |
before(BeforeCallback callback)
Sets a callback that will be executed before the execution of this operation starts.
|
SleepRequest |
done(SuccessCallback callback)
Use to set a completion callback.
|
SleepRequest |
fail(FailCallback callback)
Use to set a callback that will be called in case the request has failed.
|
SleepRequest |
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.
|
SleepRequest |
setHandler(android.os.Handler handler)
Sets the handler that will be used to invoke callbacks.
|
awaitcreateBond, 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 SleepRequest setHandler(@NonNull android.os.Handler handler)
RequestBleManager will be used.setHandler in class Requesthandler - The handler to invoke callbacks for this request.@NonNull public SleepRequest done(@NonNull SuccessCallback callback)
Request@NonNull public SleepRequest 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.
@NonNull public SleepRequest invalid(@NonNull InvalidRequestCallback callback)
Request@NonNull public SleepRequest before(@NonNull BeforeCallback callback)
Request