Package com.microej.kernel.green.ntp
Class NTPService
- java.lang.Object
-
- com.microej.kernel.green.ntp.NTPService
-
- All Implemented Interfaces:
ej.net.util.connectivity.SimpleNetworkCallback
public class NTPService extends java.lang.Object implements ej.net.util.connectivity.SimpleNetworkCallback
Class that handles the process of updating the NTP.
-
-
Constructor Summary
Constructors Constructor Description NTPService()
Instantiates anNTPService
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onConnectivity(boolean isConnected)
void
onInternet(boolean hasInternet)
void
start()
Starts the NTP client.void
stop()
Stops the NTP client.boolean
update()
Tries an update.
-
-
-
Constructor Detail
-
NTPService
public NTPService()
Instantiates anNTPService
.
-
-
Method Detail
-
start
public void start()
Starts the NTP client.
-
stop
public void stop()
Stops the NTP client.
-
update
public boolean update()
Tries an update.- Returns:
true
if the update is successful.
-
onInternet
public void onInternet(boolean hasInternet)
- Specified by:
onInternet
in interfaceej.net.util.connectivity.SimpleNetworkCallback
-
onConnectivity
public void onConnectivity(boolean isConnected)
- Specified by:
onConnectivity
in interfaceej.net.util.connectivity.SimpleNetworkCallback
-
-