T - What is returned from this operation onNext()public abstract class QueueOperation<T> extends java.lang.Object implements Operation<T>
run(QueueReleaseInterface)).
Implements Operation.run(QueueReleaseInterface) interface which will be subscribed and unsubscribed on the application's
main thread.| Constructor and Description |
|---|
QueueOperation() |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Operation another)
The function for determining which position in Bluetooth Radio's Priority Blocking Queue
this operation should take
|
Priority |
definedPriority()
A function returning the priority of this operation
|
protected abstract void |
protectedRun(<any> emitter,
QueueReleaseInterface queueReleaseInterface)
This method must be overridden in a concrete operation implementations and should contain specific operation logic.
|
protected abstract BleException |
provideException(android.os.DeadObjectException deadObjectException)
This function will be overridden in concrete operation implementations to provide an exception with needed context
|
<any> |
run(QueueReleaseInterface queueReleaseInterface)
A function that returns this operation as an Observable.
|
public final <any> run(QueueReleaseInterface queueReleaseInterface)
protected abstract void protectedRun(<any> emitter,
QueueReleaseInterface queueReleaseInterface)
throws java.lang.Throwable
QueueReleaseInterface.release() at appropriate point to release the queue for any other operations
that are queued.
If the emitter is cancelled, a responsibility of the operation is to call QueueReleaseInterface.release(). The radio
should be released as soon as the operation decides it won't interact with the BluetoothGatt anymore and
subsequent operations will be able to start. Check usage of QueueReleasingEmitterWrapper for convenience.emitter - the emitter to be called in order to inform the caller about the output of a particular run of the operationqueueReleaseInterface - the queue release interface to release the queue when readyjava.lang.Throwableprotected abstract BleException provideException(android.os.DeadObjectException deadObjectException)
deadObjectException - the cause for the exceptionpublic Priority definedPriority()
definedPriority in interface Operation<T>public int compareTo(Operation another)
compareTo in interface java.lang.Comparable<Operation<?>>another - another operation