|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcgl.narada.service.time.ntptime.NtpDatagramPacket
public class NtpDatagramPacket
This class encapsulates a NtpDatagram. See rfc2030 for more details.
| Constructor Summary | |
|---|---|
NtpDatagramPacket()
Constructs an uninitialized NtpDatagram from a UDP datagram. |
|
NtpDatagramPacket(DatagramPacket dp)
Sets the UDP packet to the given one. |
|
NtpDatagramPacket(InetAddress iaddr,
int iport)
Constructs a NtpDatagram with only the transmit timestamp filled in (set to the current time). |
|
NtpDatagramPacket(NtpHeader header,
InetAddress iaddr,
int iport)
Constructs a NtpDatagram with only the transmit timestamp filled in (set to the current time). |
|
| Method Summary | |
|---|---|
DatagramPacket |
getDatagramPacket()
Gets the UDP datagram associated to NtpDatagramPacket. |
NtpHeader |
getHeader()
Gets the header associated to a NtpDatagramPacket. |
NtpInfo |
getInfo()
Gets the information in a NtpDatagramPacket. |
NtpTimestamp |
getOriginateTimeStamp()
Gets the originate timestamp. |
NtpTimestamp |
getReceiveTimeStamp()
Gets the receive timestamp. |
NtpTimestamp |
getReceptionTimeStamp()
Gets the reception timestamp. |
NtpTimestamp |
getReferenceTimeStamp()
Gets the reference timestamp. |
NtpTimestamp |
getTransmitTimeStamp()
Gets the transmit timestamp. |
void |
setNtpTimestamps()
sets ReferenceTimeStamp, OriginateTimeStamp, ReceiveTimeStamp, TransmitTimeStamp using the data value of the Ntp Packet |
String |
toString()
Gets NtpDatagramPacket in String format. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NtpDatagramPacket(NtpHeader header,
InetAddress iaddr,
int iport)
header - NtpHeaderiaddr - InetAddress - InetAddress of the serveriport - int - port number of the server
public NtpDatagramPacket(InetAddress iaddr,
int iport)
iaddr - InetAddress - InetAddress of the serveriport - int - port number of the serverpublic NtpDatagramPacket()
public NtpDatagramPacket(DatagramPacket dp)
dp - - UDP datagram packet| Method Detail |
|---|
public DatagramPacket getDatagramPacket()
public NtpHeader getHeader()
public NtpInfo getInfo()
public void setNtpTimestamps()
public NtpTimestamp getOriginateTimeStamp()
public NtpTimestamp getReceiveTimeStamp()
public NtpTimestamp getReceptionTimeStamp()
public NtpTimestamp getReferenceTimeStamp()
public NtpTimestamp getTransmitTimeStamp()
public String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||