public final class ConditionalWaitRequest<T> extends AwaitingRequest<T> implements Operation
| Modifier and Type | Class and Description |
|---|---|
static interface |
ConditionalWaitRequest.Condition<T>
The condition object.
|
timeouthandler, requestHandler| Modifier and Type | Method and Description |
|---|---|
ConditionalWaitRequest<T> |
before(BeforeCallback callback)
Sets a callback that will be executed before the execution of this operation starts.
|
ConditionalWaitRequest<T> |
done(SuccessCallback callback)
Use to set a completion callback.
|
ConditionalWaitRequest<T> |
fail(FailCallback callback)
Use to set a callback that will be called in case the request has failed.
|
ConditionalWaitRequest<T> |
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.
|
ConditionalWaitRequest<T> |
negate()
Negates the expected value of the predicate.
|
ConditionalWaitRequest<T> |
setHandler(android.os.Handler handler)
Sets the handler that will be used to invoke callbacks.
|
await, triggerawait, await, await, timeout, withawait, await, enqueue, enqueuecreateBond, 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 ConditionalWaitRequest<T> setHandler(@NonNull android.os.Handler handler)
RequestBleManager will be used.setHandler in class TimeoutableRequesthandler - The handler to invoke callbacks for this request.@NonNull public ConditionalWaitRequest<T> done(@NonNull SuccessCallback callback)
Request@NonNull public ConditionalWaitRequest<T> 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 ConditionalWaitRequest<T> invalid(@NonNull InvalidRequestCallback callback)
Request@NonNull public ConditionalWaitRequest<T> before(@NonNull BeforeCallback callback)
Request@NonNull public ConditionalWaitRequest<T> negate()