Class CurrentTimeServer

  • All Implemented Interfaces:
    ej.bluetooth.listeners.LocalServiceListener

    public class CurrentTimeServer
    extends ej.bluetooth.listeners.impl.DefaultLocalServiceListener
    The CurrentTimeServer class represents a current time server.
    • Constructor Summary

      Constructors 
      Constructor Description
      CurrentTimeServer​(ej.bluetooth.BluetoothService service)
      Creates a current time server, using the current time service provided by this device.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void onReadRequest​(ej.bluetooth.BluetoothConnection connection, ej.bluetooth.BluetoothAttribute attribute)  
      void start()
      Starts this current time server.
      void stop()
      Stops this current time server.
      • Methods inherited from class ej.bluetooth.listeners.impl.DefaultLocalServiceListener

        onExecuteWriteRequest, onNotificationSent, onPrepareWriteRequest, onReadBlobRequest, onWriteRequest
      • Methods inherited from class java.lang.Object

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

      • CurrentTimeServer

        public CurrentTimeServer​(ej.bluetooth.BluetoothService service)
        Creates a current time server, using the current time service provided by this device.
        Parameters:
        service - the current time service provided by this device.
        Throws:
        java.lang.IllegalArgumentException - if one of the mandatory attributes of the service is missing.
    • Method Detail

      • start

        public void start()
        Starts this current time server.
      • stop

        public void stop()
        Stops this current time server.
      • onReadRequest

        public void onReadRequest​(ej.bluetooth.BluetoothConnection connection,
                                  ej.bluetooth.BluetoothAttribute attribute)
        Specified by:
        onReadRequest in interface ej.bluetooth.listeners.LocalServiceListener
        Overrides:
        onReadRequest in class ej.bluetooth.listeners.impl.DefaultLocalServiceListener