Package ej.bluetooth.listeners.impl
Class DefaultRemoteServiceListener
- java.lang.Object
-
- ej.bluetooth.listeners.impl.DefaultRemoteServiceListener
-
- All Implemented Interfaces:
RemoteServiceListener
public class DefaultRemoteServiceListener extends Object implements RemoteServiceListener
TheDefaultRemoteServiceListenerclass provides a default implementation of theRemoteServiceListenerinterface.The implementation of each method does nothing.
-
-
Constructor Summary
Constructors Constructor Description DefaultRemoteServiceListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonNotificationReceived(BluetoothConnection connection, BluetoothCharacteristic characteristic, byte[] value)Called when a characteristic notification or indication is received.voidonReadCompleted(BluetoothConnection connection, BluetoothAttribute attribute, byte status, byte[] value)Called when a response to a read request is received.voidonWriteCompleted(BluetoothConnection connection, BluetoothAttribute attribute, byte status)Called when a response to a write request is received.
-
-
-
Method Detail
-
onReadCompleted
public void onReadCompleted(BluetoothConnection connection, BluetoothAttribute attribute, byte status, byte[] value)
Description copied from interface:RemoteServiceListenerCalled when a response to a read request is received.- Specified by:
onReadCompletedin interfaceRemoteServiceListener- Parameters:
connection- the connection with the device which has sent the response.attribute- the attribute which was read.status- the response status (seeBluetoothStatus).value- the value of the attribute.- See Also:
BluetoothConnection.sendReadRequest(BluetoothAttribute)
-
onWriteCompleted
public void onWriteCompleted(BluetoothConnection connection, BluetoothAttribute attribute, byte status)
Description copied from interface:RemoteServiceListenerCalled when a response to a write request is received.- Specified by:
onWriteCompletedin interfaceRemoteServiceListener- Parameters:
connection- the connection with the device which has sent the response.attribute- the attribute which was written.status- the response status (seeBluetoothStatus).- See Also:
BluetoothConnection.sendWriteRequest(BluetoothAttribute, byte[])
-
onNotificationReceived
public void onNotificationReceived(BluetoothConnection connection, BluetoothCharacteristic characteristic, byte[] value)
Description copied from interface:RemoteServiceListenerCalled when a characteristic notification or indication is received.- Specified by:
onNotificationReceivedin interfaceRemoteServiceListener- Parameters:
connection- the connection with the device which has sent the notification.characteristic- the characteristic which has changed.value- the value of the characteristic.
-
-