Package ej.bluetooth.listeners

## Interface RemoteServiceListener

- All Known Implementing Classes:
    `DefaultRemoteServiceListener`

      public interface RemoteServiceListener

  The `RemoteServiceListener` interface provides callbacks related to remote services.

  After `discovering the services` of a device, the application may `set the remote listener` of a service in order to be notified of the events related to this service.

  This library provides a default implementation of this interface: `DefaultRemoteServiceListener`.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `onNotificationReceived​(BluetoothConnection connection, BluetoothCharacteristic characteristic, byte[] value)` | Called when a characteristic notification or indication is received.
    `void` | `onReadCompleted​(BluetoothConnection connection, BluetoothAttribute attribute, byte status, byte[] value)` | Called when a response to a read request is received.
    `void` | `onWriteCompleted​(BluetoothConnection connection, BluetoothAttribute attribute, byte status)` | Called when a response to a write request is received.

- - ### Method Detail

    - #### onReadCompleted

          void onReadCompleted​(BluetoothConnection connection,
                               BluetoothAttribute attribute,
                               byte status,
                               byte[] value)

      Called when a response to a read request is received.
      Parameters:
        `connection` - the connection with the device which has sent the response.
        `attribute` - the attribute which was read.
        `status` - the response status (see `BluetoothStatus`).
        `value` - the value of the attribute.
      See Also:
        `BluetoothConnection.sendReadRequest(BluetoothAttribute)`

    - #### onWriteCompleted

          void onWriteCompleted​(BluetoothConnection connection,
                                BluetoothAttribute attribute,
                                byte status)

      Called when a response to a write request is received.
      Parameters:
        `connection` - the connection with the device which has sent the response.
        `attribute` - the attribute which was written.
        `status` - the response status (see `BluetoothStatus`).
      See Also:
        `BluetoothConnection.sendWriteRequest(BluetoothAttribute, byte[])`

    - #### onNotificationReceived

          void onNotificationReceived​(BluetoothConnection connection,
                                      BluetoothCharacteristic characteristic,
                                      byte[] value)

      Called when a characteristic notification or indication is received.
      Parameters:
        `connection` - the connection with the device which has sent the notification.
        `characteristic` - the characteristic which has changed.
        `value` - the value of the characteristic.