public class HttpClock extends NetTimeConnector<NetTimeConfiguration>
Represents a connection to a web server via the HTTP-protocol in order to evaluate the DATE-header of the HTTP-response.
| Constructor and Description |
|---|
HttpClock(String server)
Creates a new clock which connects to given web server.
|
| Modifier and Type | Method and Description |
|---|---|
protected Moment |
doConnect()
Will be called by
connect(). |
protected Class<NetTimeConfiguration> |
getConfigurationType()
Yields the configuration type.
|
connect, currentTime, getLastConnectionTime, getLastOffsetInMicros, getNetTimeConfiguration, isLogEnabled, isRunning, loadNetTimeConfiguration, log, reconfigure, setLogWriterinLocalView, inZonalView, inZonalViewpublic HttpClock(String server)
Creates a new clock which connects to given web server.
server - web server address (example: www.google.com)protected Moment doConnect() throws IOException, ParseException
NetTimeConnectorWill be called by connect().
doConnect in class NetTimeConnector<NetTimeConfiguration>IOException - in case of any connection failureParseException - if the server reply is not readableNetTimeConnector.connect()protected Class<NetTimeConfiguration> getConfigurationType()
NetTimeConnectorYields the configuration type.
getConfigurationType in class NetTimeConnector<NetTimeConfiguration>Copyright © 2014–2015. All rights reserved.