public class TimeInfo
extends java.lang.Object
Constructor and Description |
---|
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,
java.util.List comments)
Create TimeInfo object with raw packet message and destination time received.
|
TimeInfo(NtpV3Packet message,
long returnTime,
java.util.List comments,
boolean doComputeDetails)
Create TimeInfo object with raw packet message and destination time received.
|
Modifier and Type | Method and Description |
---|---|
void |
addComment(java.lang.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.
|
java.util.List |
getComments()
Return list of comments (if any) during processing of NTP packet.
|
java.lang.Long |
getDelay()
Get round-trip network delay.
|
NtpV3Packet |
getMessage()
Returns NTP message packet.
|
java.lang.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.
|
public TimeInfo(NtpV3Packet message, long returnTime)
message
- NTP message packetreturnTime
- destination receive timejava.lang.IllegalArgumentException
- if message is nullpublic TimeInfo(NtpV3Packet message, long returnTime, java.util.List comments)
message
- NTP message packetreturnTime
- destination receive timecomments
- List of errors/warnings identified during processingjava.lang.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 valuesjava.lang.IllegalArgumentException
- if message is nullpublic TimeInfo(NtpV3Packet message, long returnTime, java.util.List 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 valuesjava.lang.IllegalArgumentException
- if message is nullpublic void addComment(java.lang.String comment)
comment
- public void computeDetails()
public java.util.List getComments()
public java.lang.Long getDelay()
public java.lang.Long getOffset()
public NtpV3Packet getMessage()
public long getReturnTime()