com.eurotech.framework.linux.clock
Class AbstractNtpClockSyncProvider

java.lang.Object
  extended by com.eurotech.framework.linux.clock.AbstractNtpClockSyncProvider
All Implemented Interfaces:
ClockSyncProvider
Direct Known Subclasses:
JavaNtpClockSyncProvider, NtpdClockSyncProvider

public abstract class AbstractNtpClockSyncProvider
extends Object
implements ClockSyncProvider


Field Summary
protected  Date m_lastSync
           
protected  ClockSyncListener m_listener
           
protected  String m_ntpHost
           
protected  int m_ntpPort
           
protected  int m_ntpTimeout
           
protected  Map<String,Object> m_properties
           
protected  int m_refreshInterval
           
protected  ScheduledThreadPoolExecutor m_scheduler
           
 
Constructor Summary
AbstractNtpClockSyncProvider()
           
 
Method Summary
 Date getLastSync()
           
 void init(Map<String,Object> properties, ClockSyncListener listener)
           
 void start()
           
 void stop()
           
protected abstract  void syncClock()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_properties

protected Map<String,Object> m_properties

m_listener

protected ClockSyncListener m_listener

m_ntpHost

protected String m_ntpHost

m_ntpPort

protected int m_ntpPort

m_ntpTimeout

protected int m_ntpTimeout

m_refreshInterval

protected int m_refreshInterval

m_lastSync

protected Date m_lastSync

m_scheduler

protected ScheduledThreadPoolExecutor m_scheduler
Constructor Detail

AbstractNtpClockSyncProvider

public AbstractNtpClockSyncProvider()
Method Detail

init

public void init(Map<String,Object> properties,
                 ClockSyncListener listener)
          throws EsfException
Specified by:
init in interface ClockSyncProvider
Throws:
EsfException

start

public void start()
           throws EsfException
Specified by:
start in interface ClockSyncProvider
Throws:
EsfException

stop

public void stop()
          throws EsfException
Specified by:
stop in interface ClockSyncProvider
Throws:
EsfException

getLastSync

public Date getLastSync()
Specified by:
getLastSync in interface ClockSyncProvider

syncClock

protected abstract void syncClock()
                           throws EsfException
Throws:
EsfException


Copyright © 2013. All Rights Reserved.