Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## examples.ntp
Class NTPClient

    java.lang.Object
      examples.ntp.NTPClient

public final class NTPClient
extends Object

This is an example program demonstrating how to use the NTPUDPClient class. This program sends a Datagram client request packet to a Network time Protocol (NTP) service port on a specified server, retrieves the time, and prints it to standard output along with the fields from the NTP message header (e.g. stratum level, reference id, poll interval, root delay, mode, ...) See the spec for details.

Usage: NTPClient
Example: NTPClient clock.psu.edu

Author:
  Jason Mathews, MITRE Corp

Constructor Summary
`NTPClient()`

Method Summary
`static void` | `main(String[] args)`
`static void` | `processResponse(TimeInfo info)` Process `TimeInfo` object and print its details.

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

Constructor Detail

### NTPClient

    public NTPClient()

Method Detail

### processResponse

    public static void processResponse(TimeInfo info)

  Process `TimeInfo` object and print its details.

  Parameters:
    `info` - `TimeInfo` object.

### main

    public static final void main(String[] args)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.