public class CCCDescriptor extends BasicServerDescriptor
Constructor and Description |
---|
CCCDescriptor()
Instantiates a
CCCDescriptor . |
Modifier and Type | Method and Description |
---|---|
void |
onReadRequest(ej.bluetooth.BluetoothDevice device)
Called back when a read request is received.
|
void |
onWriteRequest(ej.bluetooth.BluetoothDevice device,
byte[] value)
Called back when a write request is received.
|
boolean |
shouldIndicate(ej.bluetooth.BluetoothDevice device)
Checks whether a device should be indicated.
|
boolean |
shouldNotify(ej.bluetooth.BluetoothDevice device)
Checks whether a device should be notified.
|
public CCCDescriptor()
CCCDescriptor
.public void onReadRequest(ej.bluetooth.BluetoothDevice device)
ReadWriteCallbackServer
onReadRequest
in interface ReadWriteCallbackServer
onReadRequest
in class BasicServerDescriptor
device
- the device doing the read request.public void onWriteRequest(ej.bluetooth.BluetoothDevice device, byte[] value)
ReadWriteCallbackServer
onWriteRequest
in interface ReadWriteCallbackServer
onWriteRequest
in class BasicServerDescriptor
device
- the device doing the write request.value
- the value to write.public boolean shouldNotify(ej.bluetooth.BluetoothDevice device)
device
- the device to check.true
if the device should be notified.public boolean shouldIndicate(ej.bluetooth.BluetoothDevice device)
device
- the device to check.true
if the device should be indicated.