Class DefaultLocalServiceListener

    • Constructor Detail

      • DefaultLocalServiceListener

        public DefaultLocalServiceListener()
    • Method Detail

      • onPrepareWriteRequest

        public void onPrepareWriteRequest​(BluetoothConnection connection,
                                          BluetoothAttribute attribute,
                                          byte[] value,
                                          int offset)
        Description copied from interface: LocalServiceListener
        Called when a prepare write request is received. The write operation is queued until an execute write request is received.
        Specified by:
        onPrepareWriteRequest in interface LocalServiceListener
        Parameters:
        connection - the connection with the device which has sent the request.
        attribute - the attribute to write.
        value - the value to write.
        offset - the offset of the first octet to write.
      • onExecuteWriteRequest

        public void onExecuteWriteRequest​(BluetoothConnection connection,
                                          BluetoothAttribute attribute,
                                          boolean execute)
        Description copied from interface: LocalServiceListener
        Called when an execute write request is received. All pending prepared write operations are executed or cancelled.
        Specified by:
        onExecuteWriteRequest in interface LocalServiceListener
        Parameters:
        connection - the connection with the device which has sent the request.
        attribute - the attribute to write.
        execute - true if the pending prepared writes should be executed, false if they should be cancelled.