NtpResponse (Hyperic HQ Plugin API)
Keywords: org.hyperic.util.ntp.NtpResponse class

Overview | Package | Class | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hyperic.util.ntp
Class NtpResponse

    java.lang.Object
      org.hyperic.util.ntp.NtpResponse

    public class NtpResponse

extends java.lang.Object

Java representation of an NTP response as described in RFC 2030 http://www.faqs.org/rfcs/rfc2030.html Packet format: 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |LI | VN |Mode | Stratum | Poll | Precision | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Root Delay | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Root Dispersion | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Reference Identifier | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Reference Timestamp (64) | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Originate Timestamp (64) | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Receive Timestamp (64) | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Transmit Timestamp (64) | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Key Identifier (optional) (32) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | | | Message Digest (optional) (128) | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Field Summary
`protected byte` | `interval`
`protected byte` | `leapIndicator`
`protected double` | `localClockOffset`
`protected byte` | `mode`
`protected double` | `originateTimestamp`
`protected byte` | `precision`
`protected double` | `receiveTimestamp`
`protected byte[]` | `referenceIdentifier`
`protected double` | `referenceTimestamp`
`protected double` | `rootDelay`
`protected double` | `rootDispersion`
`protected double` | `roundTripDelay`
`protected short` | `stratum`
`protected double` | `transmitTimestamp`
`protected byte` | `version`

Method Summary
`static NtpResponse` | `decodeResponse(double ts, byte[] data)` Decode the NTP server response
`double` | `getLocalClockOffset()`
`static byte[]` | `getRequestBytes()` Generate the NTP request
`double` | `getRootDelay()`
`double` | `getRootDispersion()`
`double` | `getRoundTripDelay()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### leapIndicator

    protected byte leapIndicator

### version

    protected byte version

### mode

    protected byte mode

### stratum

    protected short stratum

### interval

    protected byte interval

### precision

    protected byte precision

### rootDelay

    protected double rootDelay

### rootDispersion

    protected double rootDispersion

### referenceIdentifier

    protected byte[] referenceIdentifier

### referenceTimestamp

    protected double referenceTimestamp

### originateTimestamp

    protected double originateTimestamp

### receiveTimestamp

    protected double receiveTimestamp

### transmitTimestamp

    protected double transmitTimestamp

### roundTripDelay

    protected double roundTripDelay

### localClockOffset

    protected double localClockOffset

Method Detail

### getRequestBytes

    public static byte[] getRequestBytes()

  Generate the NTP request

### decodeResponse

    public static NtpResponse decodeResponse(double ts,
                                             byte[] data)

  Decode the NTP server response

### getLocalClockOffset

    public double getLocalClockOffset()

### getRoundTripDelay

    public double getRoundTripDelay()

### getRootDelay

    public double getRootDelay()

### getRootDispersion

    public double getRootDispersion()

Overview | Package | Class | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2006 Hyperic, Inc. support@hyperic.net, All Rights Reserved.