Package ej.bluetooth.util.services.cts
Class CurrentTimeServer
- java.lang.Object
-
- ej.bluetooth.listeners.impl.DefaultLocalServiceListener
-
- ej.bluetooth.util.services.cts.CurrentTimeServer
-
- All Implemented Interfaces:
LocalServiceListener
public class CurrentTimeServer extends DefaultLocalServiceListener
TheCurrentTimeServerclass represents a current time server.
-
-
Constructor Summary
Constructors Constructor Description CurrentTimeServer(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 voidonReadRequest(BluetoothConnection connection, BluetoothAttribute attribute)voidstart()Starts this current time server.voidstop()Stops this current time server.-
Methods inherited from class ej.bluetooth.listeners.impl.DefaultLocalServiceListener
onExecuteWriteRequest, onNotificationSent, onPrepareWriteRequest, onReadBlobRequest, onWriteRequest
-
-
-
-
Constructor Detail
-
CurrentTimeServer
public CurrentTimeServer(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:
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(BluetoothConnection connection, BluetoothAttribute attribute)
- Specified by:
onReadRequestin interfaceLocalServiceListener- Overrides:
onReadRequestin classDefaultLocalServiceListener
-
-