public class DefaultClientCallbacks extends java.lang.Object implements ClientCallbacks
DefaultClientCallbacks
class provides a default implementation of the ClientCallbacks
interface.
The implementation of each of the methods does nothing.
Constructor and Description |
---|
DefaultClientCallbacks() |
Modifier and Type | Method and Description |
---|---|
void |
onNotificationReceived(BluetoothCharacteristic characteristic,
byte[] value)
Called when a characteristic notification is received.
|
void |
onReadCompleted(BluetoothCharacteristic characteristic,
int status,
byte[] value)
Called when a response to a read characteristic request is received.
|
void |
onReadCompleted(BluetoothDescriptor descriptor,
int status,
byte[] value)
Called when a response to a read descriptor request is received.
|
void |
onWriteCompleted(BluetoothCharacteristic characteristic,
int status)
Called when a response to a write characteristic request is received.
|
void |
onWriteCompleted(BluetoothDescriptor descriptor,
int status)
Called when a response to a write descriptor request is received.
|
public void onReadCompleted(BluetoothCharacteristic characteristic, int status, byte[] value)
ClientCallbacks
onReadCompleted
in interface ClientCallbacks
characteristic
- the characteristic which was read.status
- the response status (see BluetoothStatus
).value
- the value of the characteristic.BluetoothAttribute.sendReadRequest()
public void onWriteCompleted(BluetoothCharacteristic characteristic, int status)
ClientCallbacks
onWriteCompleted
in interface ClientCallbacks
characteristic
- the characteristic which was written.status
- the response status (see BluetoothStatus
).BluetoothAttribute.sendWriteRequest(byte[])
public void onNotificationReceived(BluetoothCharacteristic characteristic, byte[] value)
ClientCallbacks
onNotificationReceived
in interface ClientCallbacks
characteristic
- the characteristic which has changed.value
- the value of the characteristic.public void onReadCompleted(BluetoothDescriptor descriptor, int status, byte[] value)
ClientCallbacks
onReadCompleted
in interface ClientCallbacks
descriptor
- the descriptor which was read.status
- the response status (see BluetoothStatus
).value
- the value of the descriptor.BluetoothAttribute.sendReadRequest()
public void onWriteCompleted(BluetoothDescriptor descriptor, int status)
ClientCallbacks
onWriteCompleted
in interface ClientCallbacks
descriptor
- the descriptor which was written.status
- the response status (see BluetoothStatus
).BluetoothAttribute.sendWriteRequest(byte[])