Interface SntpConfiguration
- All Superinterfaces:
- NetTimeConfiguration
Represents a configuration for a connection to a NTP-Server.
Implementations of this SPI-interface must be
 immutable or at least threadsafe. Instances can be
 created manually or via a ServiceLoader. 
Note: All implementations must have a public no-arg constructor.
- Since:
- 2.1
- Author:
- Meno Hochschild
- See Also:
- ServiceLoader
- 
Field SummaryFields inherited from interface net.time4j.clock.NetTimeConfigurationDEFAULT_CONNECTION_TIMEOUT
- 
Method SummaryModifier and TypeMethodDescriptionshortDetermines how often a SNTP-Client will send queries during a connection for the purpose of the calculation of an arithmetic mean value.intDetermines the rate by which a SNTP-client sends queries during a connection for the purpose of the calculation of an arithmetic mean value.booleanisNTP4()Determines if NTP3 or NTP4 should be used.Methods inherited from interface net.time4j.clock.NetTimeConfigurationgetClockShiftWindow, getConnectionTimeout, getTimeServerAddress, getTimeServerPort
- 
Method Details- 
isNTP4boolean isNTP4()Determines if NTP3 or NTP4 should be used. - Returns:
- trueif NTP4 shall be used else- false
- Since:
- 2.1
 
- 
getRequestIntervalint getRequestInterval()Determines the rate by which a SNTP-client sends queries during a connection for the purpose of the calculation of an arithmetic mean value. Default value is 60 * 4(that is 4 minutes). This method is only relevant ifgetRequestCount()yields at least the value2. One single connection request can contain several queries this way. Note that some servers will block requests if they happen too often.- Returns:
- time distance between two messages in seconds as positive number
- Since:
- 2.1
 
- 
getRequestCountshort getRequestCount()Determines how often a SNTP-Client will send queries during a connection for the purpose of the calculation of an arithmetic mean value. Default value is 1(single query). The value0is also permitted and effectively stops any query. If any bigger value (> 1) is configured then an asynchronous connection to the NTP-server is recommended. One single connection request can contain several queries this way. Note that some servers will block requests if they happen too often.- Returns:
- number in range 0 <= x < 1000
- Since:
- 2.1
- See Also:
- NetTimeConnector.connect()
 
 
-