-
public abstract class SimpleValueRequest<T> extends SimpleRequest
-
-
Method Summary
Modifier and Type Method Description SimpleValueRequest<T>with(@NonNull() T callback)Sets the value callback. <E extends T> Eawait(@NonNull() E response)Synchronously waits until the request is done. <E extends T> Eawait(@NonNull() Class<E> responseClass)Synchronously waits until the request is done. -
Methods inherited from class no.nordicsemi.android.ble.SimpleRequest
await -
Methods inherited from class no.nordicsemi.android.ble.Request
before, createBond, done, enqueue, fail, invalid, 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, setHandler, then -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
with
@NonNull() SimpleValueRequest<T> with(@NonNull() T callback)
Sets the value callback. When the request is invoked synchronously, this callback willbe ignored and the received value will be returned by the
await(...)method;- Parameters:
callback- the callback.
-
await
@NonNull() <E extends T> E await(@NonNull() E response)
Synchronously waits until the request is done. The given response object will be filledwith the request response.
Callbacks set using before, done and fail will be ignored.
This method may not be called from the main (UI) thread.
- Parameters:
response- the response object.
-
-
-
-