Class GattServerCallback


  • public class GattServerCallback
    extends android.bluetooth.BluetoothGattServerCallback
    • Constructor Summary

      Constructors 
      Constructor Description
      GattServerCallback​(android.content.Context context, BleDriver bleDriver, Logger logger, GattServer gattServer, java.util.concurrent.CountDownLatch doneSignal)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void onCharacteristicReadRequest​(android.bluetooth.BluetoothDevice device, int requestId, int offset, android.bluetooth.BluetoothGattCharacteristic characteristic)  
      void onCharacteristicWriteRequest​(android.bluetooth.BluetoothDevice device, int requestId, android.bluetooth.BluetoothGattCharacteristic characteristic, boolean prepareWrite, boolean responseNeeded, int offset, byte[] value)  
      void onConnectionStateChange​(android.bluetooth.BluetoothDevice device, int status, int newState)  
      void onDescriptorReadRequest​(android.bluetooth.BluetoothDevice device, int requestId, int offset, android.bluetooth.BluetoothGattDescriptor descriptor)  
      void onDescriptorWriteRequest​(android.bluetooth.BluetoothDevice device, int requestId, android.bluetooth.BluetoothGattDescriptor descriptor, boolean preparedWrite, boolean responseNeeded, int offset, byte[] value)  
      void onExecuteWrite​(android.bluetooth.BluetoothDevice device, int requestId, boolean execute)  
      void onMtuChanged​(android.bluetooth.BluetoothDevice device, int mtu)  
      void onNotificationSent​(android.bluetooth.BluetoothDevice device, int status)  
      void onServiceAdded​(int status, android.bluetooth.BluetoothGattService service)  
      void setLocalPID​(java.lang.String peerID)  
      • Methods inherited from class android.bluetooth.BluetoothGattServerCallback

        onPhyRead, onPhyUpdate
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GattServerCallback

        public GattServerCallback​(android.content.Context context,
                                  BleDriver bleDriver,
                                  Logger logger,
                                  GattServer gattServer,
                                  java.util.concurrent.CountDownLatch doneSignal)
    • Method Detail

      • setLocalPID

        public void setLocalPID​(java.lang.String peerID)
      • onServiceAdded

        public void onServiceAdded​(int status,
                                   android.bluetooth.BluetoothGattService service)
        Overrides:
        onServiceAdded in class android.bluetooth.BluetoothGattServerCallback
      • onConnectionStateChange

        public void onConnectionStateChange​(android.bluetooth.BluetoothDevice device,
                                            int status,
                                            int newState)
        Overrides:
        onConnectionStateChange in class android.bluetooth.BluetoothGattServerCallback
      • onDescriptorReadRequest

        public void onDescriptorReadRequest​(android.bluetooth.BluetoothDevice device,
                                            int requestId,
                                            int offset,
                                            android.bluetooth.BluetoothGattDescriptor descriptor)
        Overrides:
        onDescriptorReadRequest in class android.bluetooth.BluetoothGattServerCallback
      • onDescriptorWriteRequest

        public void onDescriptorWriteRequest​(android.bluetooth.BluetoothDevice device,
                                             int requestId,
                                             android.bluetooth.BluetoothGattDescriptor descriptor,
                                             boolean preparedWrite,
                                             boolean responseNeeded,
                                             int offset,
                                             byte[] value)
        Overrides:
        onDescriptorWriteRequest in class android.bluetooth.BluetoothGattServerCallback
      • onCharacteristicReadRequest

        public void onCharacteristicReadRequest​(android.bluetooth.BluetoothDevice device,
                                                int requestId,
                                                int offset,
                                                android.bluetooth.BluetoothGattCharacteristic characteristic)
        Overrides:
        onCharacteristicReadRequest in class android.bluetooth.BluetoothGattServerCallback
      • onCharacteristicWriteRequest

        public void onCharacteristicWriteRequest​(android.bluetooth.BluetoothDevice device,
                                                 int requestId,
                                                 android.bluetooth.BluetoothGattCharacteristic characteristic,
                                                 boolean prepareWrite,
                                                 boolean responseNeeded,
                                                 int offset,
                                                 byte[] value)
        Overrides:
        onCharacteristicWriteRequest in class android.bluetooth.BluetoothGattServerCallback
      • onExecuteWrite

        public void onExecuteWrite​(android.bluetooth.BluetoothDevice device,
                                   int requestId,
                                   boolean execute)
        Overrides:
        onExecuteWrite in class android.bluetooth.BluetoothGattServerCallback
      • onMtuChanged

        public void onMtuChanged​(android.bluetooth.BluetoothDevice device,
                                 int mtu)
        Overrides:
        onMtuChanged in class android.bluetooth.BluetoothGattServerCallback
      • onNotificationSent

        public void onNotificationSent​(android.bluetooth.BluetoothDevice device,
                                       int status)
        Overrides:
        onNotificationSent in class android.bluetooth.BluetoothGattServerCallback