public abstract class BleOp<T extends BleOp>
extends java.lang.Object
Constructor and Description |
---|
BleOp() |
BleOp(java.util.UUID characteristicUuid) |
BleOp(java.util.UUID serviceUuid,
java.util.UUID characteristicUuid) |
Modifier and Type | Method and Description |
---|---|
java.util.UUID |
getCharacteristicUuid()
Returns the characteristic UUID of this operation.
|
FutureData |
getData() |
DescriptorFilter |
getDescriptorFilter()
Returns the
DescriptorFilter set for this operation. |
java.util.UUID |
getDescriptorUuid()
Returns the UUID of the descriptor for this operation.
|
ReadWriteListener |
getReadWriteListener()
Returns the
ReadWriteListener set for this operation. |
java.util.UUID |
getServiceUuid()
Returns the
UUID of the service for this operation. |
boolean |
isCharUuidValid() |
boolean |
isNotify() |
boolean |
isRead() |
boolean |
isServiceUuidValid() |
abstract boolean |
isValid()
Returns
true if the minimum values have been set for this operation |
boolean |
isWrite() |
T |
setCharacteristicUUID(java.util.UUID uuid)
Set the characteristic UUID.
|
T |
setData(FutureData data) |
T |
setDescriptorFilter(DescriptorFilter filter)
Set the
DescriptorFilter to determine which characteristic to operate on, if there are multiple with the same UUID in the same
BluetoothGattService . |
T |
setReadWriteListener(ReadWriteListener listener)
Set the
ReadWriteListener for listening to the callback of the operation you wish to perform. |
T |
setServiceUUID(java.util.UUID uuid)
Set the service UUID for this operation.
|
public BleOp()
public BleOp(java.util.UUID serviceUuid, java.util.UUID characteristicUuid)
public BleOp(java.util.UUID characteristicUuid)
public abstract boolean isValid()
true
if the minimum values have been set for this operationpublic final T setServiceUUID(java.util.UUID uuid)
public final java.util.UUID getServiceUuid()
UUID
of the service for this operation. This may return null
.public final T setCharacteristicUUID(java.util.UUID uuid)
public final java.util.UUID getCharacteristicUuid()
public final T setReadWriteListener(ReadWriteListener listener)
ReadWriteListener
for listening to the callback of the operation you wish to perform.
NOTE: For BleNotify
, use BleNotify.setNotificationListener(NotificationListener)
instead of this method.public final ReadWriteListener getReadWriteListener()
ReadWriteListener
set for this operation. This can be null
.public final T setDescriptorFilter(DescriptorFilter filter)
DescriptorFilter
to determine which characteristic to operate on, if there are multiple with the same UUID
in the same
BluetoothGattService
.public final DescriptorFilter getDescriptorFilter()
DescriptorFilter
set for this operation. This can be null
.public final T setData(FutureData data)
public final FutureData getData()
public final boolean isRead()
public final boolean isWrite()
public final boolean isNotify()
public final boolean isServiceUuidValid()
public final boolean isCharUuidValid()
public final java.util.UUID getDescriptorUuid()
null
.