Class 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.
    • 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.
      • Methods inherited from class java.lang.Object

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

      • NTPService

        public NTPService()
        Instantiates an NTPService.
    • 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 interface ej.net.util.connectivity.SimpleNetworkCallback
      • onConnectivity

        public void onConnectivity​(boolean isConnected)
        Specified by:
        onConnectivity in interface ej.net.util.connectivity.SimpleNetworkCallback