public final class WaitForReadRequest extends AwaitingRequest<DataSentCallback> implements Operation
timeouthandler, requestHandler| Modifier and Type | Method and Description |
|---|---|
WaitForReadRequest |
before(BeforeCallback callback)
Sets a callback that will be executed before the execution of this operation starts.
|
WaitForReadRequest |
done(SuccessCallback callback)
Use to set a completion callback.
|
WaitForReadRequest |
fail(FailCallback callback)
Use to set a callback that will be called in case the request has failed.
|
WaitForReadRequest |
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.
|
WaitForReadRequest |
setHandler(android.os.Handler handler)
Sets the handler that will be used to invoke callbacks.
|
WaitForReadRequest |
split()
Adds a default MTU splitter that will be used to cut given data into at-most MTU-3
bytes long packets.
|
WaitForReadRequest |
split(DataSplitter splitter)
Adds a splitter that will be used to cut given data into multiple packets.
|
WaitForReadRequest |
split(DataSplitter splitter,
WriteProgressCallback callback)
Adds a splitter that will be used to cut given data into multiple packets.
|
WaitForReadRequest |
split(WriteProgressCallback callback)
Adds a default MTU splitter that will be used to cut given data into at-most MTU-3
bytes long packets.
|
WaitForReadRequest |
trigger(Operation trigger)
Sets an optional request that is suppose to trigger the notification or indication.
|
WaitForReadRequest |
with(DataSentCallback callback)
Sets the value callback.
|
awaitawait, await, await, timeoutawait, 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 WaitForReadRequest setHandler(@NonNull android.os.Handler handler)
RequestBleManager will be used.setHandler in class TimeoutableRequesthandler - The handler to invoke callbacks for this request.@NonNull public WaitForReadRequest done(@NonNull SuccessCallback callback)
Request@NonNull public WaitForReadRequest 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 WaitForReadRequest invalid(@NonNull InvalidRequestCallback callback)
Request@NonNull public WaitForReadRequest before(@NonNull BeforeCallback callback)
Request@NonNull public WaitForReadRequest with(@NonNull DataSentCallback callback)
TimeoutableValueRequestawait(...) method;with in class TimeoutableValueRequest<DataSentCallback>callback - the callback.@NonNull public WaitForReadRequest trigger(@NonNull Operation trigger)
AwaitingRequesttrigger in class AwaitingRequest<DataSentCallback>trigger - the operation that triggers the notification, usually a write characteristic
request that write some OP CODE.@NonNull public WaitForReadRequest split(@NonNull DataSplitter splitter)
splitter - an implementation of a splitter.split()@NonNull public WaitForReadRequest split(@NonNull DataSplitter splitter, @NonNull WriteProgressCallback callback)
splitter - an implementation of a splitter.callback - the progress callback that will be notified each time a packet was sent.split()@NonNull public WaitForReadRequest split()
@NonNull public WaitForReadRequest split(@NonNull WriteProgressCallback callback)
callback - the progress callback that will be notified each time a packet was sent.