|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.net.ntp.TimeInfo
public class TimeInfo
Wrapper class to network time packet messages (NTP, etc) that computes related timing info and stats.
Constructor Summary | |
---|---|
TimeInfo(NtpV3Packet message,
long returnTime)
Create TimeInfo object with raw packet message and destination time received. |
|
TimeInfo(NtpV3Packet msgPacket,
long returnTime,
boolean doComputeDetails)
Create TimeInfo object with raw packet message and destination time received. |
|
TimeInfo(NtpV3Packet message,
long returnTime,
List<String> comments)
Create TimeInfo object with raw packet message and destination time received. |
|
TimeInfo(NtpV3Packet message,
long returnTime,
List<String> comments,
boolean doComputeDetails)
Create TimeInfo object with raw packet message and destination time received. |
Method Summary | |
---|---|
void |
addComment(String comment)
Add comment (error/warning) to list of comments associated with processing of NTP parameters. |
void |
computeDetails()
Compute and validate details of the NTP message packet. |
List<String> |
getComments()
Return list of comments (if any) during processing of NTP packet. |
Long |
getDelay()
Get round-trip network delay. |
NtpV3Packet |
getMessage()
Returns NTP message packet. |
Long |
getOffset()
Get clock offset needed to adjust local clock to match remote clock. |
long |
getReturnTime()
Returns time at which time message packet was received by local machine. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TimeInfo(NtpV3Packet message, long returnTime)
message
- NTP message packetreturnTime
- destination receive time
IllegalArgumentException
- if message is nullpublic TimeInfo(NtpV3Packet message, long returnTime, List<String> comments)
message
- NTP message packetreturnTime
- destination receive timecomments
- List of errors/warnings identified during processing
IllegalArgumentException
- if message is nullpublic TimeInfo(NtpV3Packet msgPacket, long returnTime, boolean doComputeDetails)
msgPacket
- NTP message packetreturnTime
- destination receive timedoComputeDetails
- flag to pre-compute delay/offset values
IllegalArgumentException
- if message is nullpublic TimeInfo(NtpV3Packet message, long returnTime, List<String> comments, boolean doComputeDetails)
message
- NTP message packetreturnTime
- destination receive timecomments
- list of comments used to store errors/warnings with messagedoComputeDetails
- flag to pre-compute delay/offset values
IllegalArgumentException
- if message is nullMethod Detail |
---|
public void addComment(String comment)
comment
- public void computeDetails()
public List<String> getComments()
public Long getDelay()
public Long getOffset()
public NtpV3Packet getMessage()
public long getReturnTime()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |