|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.globus.cog.util.ntp.NTPClient
A simple NTPClient based on the RFC2030.
| Constructor Summary | |
NTPClient(String NTPserver)
Creates a new NTPClient instance. |
|
| Method Summary | |
String |
convertMode(int mode)
Converts the mode as described in RFC2030. |
long |
getDelay()
returns the delay between the remote server and the local time. |
String |
getMode()
The mode as described in RFC2030. |
String |
getServer()
Returns the NTP server name. |
String |
getType()
Returns the type of the serevr. |
long |
getVariation()
Describe getVariation method here. |
void |
update()
queries the NTP serevr and calculates the time difference. |
boolean |
withinDelta(long delta)
returns true if the timedelay is smaller than a specified value. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public NTPClient(String NTPserver)
NTPClient instance.
NTPserver - is the name of an ntpserver such as
time.nist.gov| Method Detail |
public String getMode()
String returning a readble form of the mode.
Mode Meaning
------------------------------------
0 reserved
1 symmetric active
2 symmetric passive
3 client
4 server
5 broadcast
6 reserved for NTP control message
7 reserved for private usepublic String convertMode(int mode)
String returning a readble form of the mode.
Mode Meaning
------------------------------------
0 reserved
1 symmetric active
2 symmetric passive
3 client
4 server
5 broadcast
6 reserved for NTP control message
7 reserved for private usepublic String getServer()
String with the server namepublic String getType()
String with the typepublic long getDelay()
long value representing the difference
in milliseconds.public long getVariation()
getVariation method here.
long valuepublic boolean withinDelta(long delta)
delta - a long value representing the interval
boolean value returns true if the time
difference is smaller than delta
public void update()
throws IOException
IOException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||