org.apache.directory.server.ntp.messages
Class ReferenceIdentifier

java.lang.Object
  extended by org.apache.directory.server.ntp.messages.ReferenceIdentifier
All Implemented Interfaces:
java.lang.Comparable<ReferenceIdentifier>

public class ReferenceIdentifier
extends java.lang.Object
implements java.lang.Comparable<ReferenceIdentifier>

Reference Identifier: This is a 32-bit bitstring identifying the particular reference source. In the case of NTP Version 3 or Version 4 stratum-0 (unspecified) or stratum-1 (primary) servers, this is a four-character ASCII string, left justified and zero padded to 32 bits. In NTP Version 3 secondary servers, this is the 32-bit IPv4 address of the reference source. In NTP Version 4 secondary servers, this is the low order 32 bits of the latest transmit timestamp of the reference source. NTP primary (stratum 1) servers should set this field to a code identifying the external reference source according to the following list. If the external reference is one of those listed, the associated code should be used. Codes for sources not listed can be contrived as appropriate.

Version:
$Rev: 586763 $, $Date: 2007-10-20 19:26:29 +0200 (Sa, 20 Okt 2007) $
Author:
Apache Directory Project

Field Summary
static ReferenceIdentifier ACTS
          Constant for the "ACTS" reference identifier type.
static ReferenceIdentifier CDMA
          Constant for the "CDMA" reference identifier type.
static ReferenceIdentifier CHU
          Constant for the "CHU" reference identifier type.
static ReferenceIdentifier DCF
          Constant for the "DCF" reference identifier type.
static ReferenceIdentifier GOES
          Constant for the "GOES" reference identifier type.
static ReferenceIdentifier GPS
          Constant for the "GPS" reference identifier type.
static ReferenceIdentifier INIT
          Constant for the "INIT" reference identifier type.
static ReferenceIdentifier LOCL
          Constant for the "LOCL" reference identifier type.
static ReferenceIdentifier LORC
          Constant for the "LORC" reference identifier type.
static ReferenceIdentifier MSF
          Constant for the "MSF" reference identifier type.
static ReferenceIdentifier OMEG
          Constant for the "OMEG" reference identifier type.
static ReferenceIdentifier PPS
          Constant for the "PPL" reference identifier type.
static ReferenceIdentifier PTB
          Constant for the "PTB" reference identifier type.
static ReferenceIdentifier TDF
          Constant for the "TDF" reference identifier type.
static ReferenceIdentifier USNO
          Constant for the "USNO" reference identifier type.
static java.util.List<ReferenceIdentifier> VALUES
          A list of all the reference identifier type constants.
static ReferenceIdentifier WWV
          Constant for the "WWV" reference identifier type.
static ReferenceIdentifier WWVB
          Constant for the "WWVB" reference identifier type.
static ReferenceIdentifier WWVH
          Constant for the "WWVH" reference identifier type.
 
Method Summary
 int compareTo(ReferenceIdentifier that)
           
 java.lang.String getCode()
          Returns the code associated with this reference identifier type.
 int getOrdinal()
          Returns the number associated with this reference identifier type.
static ReferenceIdentifier getTypeByName(java.lang.String type)
          Returns the reference identifier type when specified by its name.
static ReferenceIdentifier getTypeByOrdinal(int type)
          Returns the reference identifier type when specified by its ordinal.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INIT

public static final ReferenceIdentifier INIT
Constant for the "INIT" reference identifier type.


LOCL

public static final ReferenceIdentifier LOCL
Constant for the "LOCL" reference identifier type.


PPS

public static final ReferenceIdentifier PPS
Constant for the "PPL" reference identifier type.


ACTS

public static final ReferenceIdentifier ACTS
Constant for the "ACTS" reference identifier type.


USNO

public static final ReferenceIdentifier USNO
Constant for the "USNO" reference identifier type.


PTB

public static final ReferenceIdentifier PTB
Constant for the "PTB" reference identifier type.


TDF

public static final ReferenceIdentifier TDF
Constant for the "TDF" reference identifier type.


DCF

public static final ReferenceIdentifier DCF
Constant for the "DCF" reference identifier type.


MSF

public static final ReferenceIdentifier MSF
Constant for the "MSF" reference identifier type.


WWV

public static final ReferenceIdentifier WWV
Constant for the "WWV" reference identifier type.


WWVB

public static final ReferenceIdentifier WWVB
Constant for the "WWVB" reference identifier type.


WWVH

public static final ReferenceIdentifier WWVH
Constant for the "WWVH" reference identifier type.


CHU

public static final ReferenceIdentifier CHU
Constant for the "CHU" reference identifier type.


LORC

public static final ReferenceIdentifier LORC
Constant for the "LORC" reference identifier type.


OMEG

public static final ReferenceIdentifier OMEG
Constant for the "OMEG" reference identifier type.


GPS

public static final ReferenceIdentifier GPS
Constant for the "GPS" reference identifier type.


GOES

public static final ReferenceIdentifier GOES
Constant for the "GOES" reference identifier type.


CDMA

public static final ReferenceIdentifier CDMA
Constant for the "CDMA" reference identifier type.


VALUES

public static final java.util.List<ReferenceIdentifier> VALUES
A list of all the reference identifier type constants.

Method Detail

getTypeByOrdinal

public static ReferenceIdentifier getTypeByOrdinal(int type)
Returns the reference identifier type when specified by its ordinal.

Parameters:
type -
Returns:
The reference identifier type.

getTypeByName

public static ReferenceIdentifier getTypeByName(java.lang.String type)
Returns the reference identifier type when specified by its name.

Parameters:
type -
Returns:
The reference identifier type.

getCode

public java.lang.String getCode()
Returns the code associated with this reference identifier type.

Returns:
The reference identifier type code.

getOrdinal

public int getOrdinal()
Returns the number associated with this reference identifier type.

Returns:
The reference identifier type ordinal.

compareTo

public int compareTo(ReferenceIdentifier that)
Specified by:
compareTo in interface java.lang.Comparable<ReferenceIdentifier>

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.