Package 

Class BleServerManager

  • All Implemented Interfaces:
    no.nordicsemi.android.ble.utils.ILogger

    
    public abstract class BleServerManager
     implements ILogger
                        

    The manager for local GATT server. To be used with one or more instances of BleManager.

    Note, that BLE Library supports only Client-only or Client-and-Server mode. It does not support Server-only mode. All interactions with the remote device, both as client and server, are performed using the BLE Manager instance, one for each connected device. For that last use case, the Client can be limited and client operations can be unused.

    • Method Summary

      Modifier and Type Method Description
      final void setServerObserver(@Nullable() ServerObserver observer) Sets the server observer.
      final boolean open() Opens the GATT server and starts initializing services.
      final void close() Closes the GATT server.
      int getMinLogPriority() Returns the minimum log priority that should be logged.
      void log(int priority, @NonNull() String message) Logs the given message with given log priority into the all managed devices' log session.
      void log(int priority, @StringRes() int messageRes, @Nullable() Array<Object> params) Logs the given message with given log priority into the all managed devices' log session.
      • Methods inherited from class no.nordicsemi.android.ble.utils.ILogger

        log, log
      • Methods inherited from class java.lang.Object

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

      • BleServerManager

        BleServerManager(Context context)
    • Method Detail

      • open

         final boolean open()

        Opens the GATT server and starts initializing services. This method only starts initializingservices. The onServerReady will be called when allservices are done.

      • close

         final void close()

        Closes the GATT server.

      • getMinLogPriority

         int getMinLogPriority()

        Returns the minimum log priority that should be logged.

      • log

         void log(int priority, @NonNull() String message)

        Logs the given message with given log priority into the all managed devices' log session.

        Parameters:
        priority - the log priority.
        message - the message to be logged.
      • log

         void log(int priority, @StringRes() int messageRes, @Nullable() Array<Object> params)

        Logs the given message with given log priority into the all managed devices' log session.

        Parameters:
        priority - the log priority.
        messageRes - string resource id.
        params - additional (optional) parameters used to fill the message.