Package net.i2p.router.time
Class RouterTimestamper
java.lang.Object
net.i2p.time.Timestamper
net.i2p.router.time.RouterTimestamper
- All Implemented Interfaces:
- Runnable
public class RouterTimestamper extends Timestamper
Periodically query a series of NTP servers and update any associated
 listeners.  It tries the NTP servers in order, contacting them using 
 SNTP (UDP port 123).
- Since:
- 0.9.1 moved from net.i2p.time
- 
Nested Class Summary
- 
Field SummaryFields Modifier and Type Field Description static StringPROP_CONCURRING_SERVERSstatic StringPROP_DISABLEDstatic StringPROP_IP_COUNTRYstatic StringPROP_QUERY_FREQUENCYstatic StringPROP_SERVER_LIST
- 
Constructor SummaryConstructors Constructor Description RouterTimestamper(I2PAppContext ctx)Does not start.RouterTimestamper(I2PAppContext ctx, Timestamper.UpdateListener lsnr)Does not start.RouterTimestamper(I2PAppContext ctx, Timestamper.UpdateListener lsnr, boolean daemon)Does not start.
- 
Method SummaryModifier and Type Method Description voidaddListener(Timestamper.UpdateListener lsnr)booleangetIsDisabled()Timestamper.UpdateListenergetListener(int index)intgetListenerCount()intgetQueryFrequencyMs()StringgetServer(int index)intgetServerCount()voidremoveListener(Timestamper.UpdateListener lsnr)voidrun()dummyvoidstartTimestamper()voidtimestampNow()Update the time immediately.voidwaitForInitialization()dummy
- 
Field Details- 
PROP_QUERY_FREQUENCY- See Also:
- Constant Field Values
 
- 
PROP_SERVER_LIST- See Also:
- Constant Field Values
 
- 
PROP_DISABLED- See Also:
- Constant Field Values
 
- 
PROP_CONCURRING_SERVERS- See Also:
- Constant Field Values
 
- 
PROP_IP_COUNTRY- See Also:
- Constant Field Values
 
 
- 
- 
Constructor Details- 
RouterTimestamperDoes not start. Caller MUST call startTimestamper()
- 
RouterTimestamperDoes not start. Caller MUST call startTimestamper()
- 
RouterTimestamperDoes not start. Caller MUST call startTimestamper()
 
- 
- 
Method Details- 
getServerCountpublic int getServerCount()
- 
getServer
- 
getQueryFrequencyMspublic int getQueryFrequencyMs()
- 
getIsDisabledpublic boolean getIsDisabled()
- 
addListener
- 
removeListener
- 
getListenerCountpublic int getListenerCount()
- 
getListener
- 
startTimestamperpublic void startTimestamper()
- 
waitForInitializationpublic void waitForInitialization()Description copied from class:Timestamperdummy- Overrides:
- waitForInitializationin class- Timestamper
 
- 
timestampNowpublic void timestampNow()Update the time immediately.- Overrides:
- timestampNowin class- Timestamper
- Since:
- 0.8.8
 
- 
runpublic void run()Description copied from class:Timestamperdummy- Specified by:
- runin interface- Runnable
- Overrides:
- runin class- Timestamper
 
 
-