public class CurrentTimeServer extends DefaultLocalServiceListener
CurrentTimeServer class represents a current time server.| Constructor and Description |
|---|
CurrentTimeServer(BluetoothService service)
Creates a current time server, using the current time service provided by this device.
|
| Modifier and Type | Method and Description |
|---|---|
void |
onReadRequest(BluetoothConnection connection,
BluetoothAttribute attribute)
Called when a read request is received.
|
void |
start()
Starts this current time server.
|
void |
stop()
Stops this current time server.
|
onExecuteWriteRequest, onNotificationSent, onPrepareWriteRequest, onReadBlobRequest, onWriteRequestpublic CurrentTimeServer(BluetoothService service)
service - the current time service provided by this device.IllegalArgumentException - if one of the mandatory attributes of the service is missing.public void onReadRequest(BluetoothConnection connection, BluetoothAttribute attribute)
LocalServiceListeneronReadRequest in interface LocalServiceListeneronReadRequest in class DefaultLocalServiceListenerconnection - the connection with the device which has sent the request.attribute - the attribute to read.public void start()
public void stop()