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

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

public final class StratumType
extends java.lang.Object
implements java.lang.Comparable<StratumType>

Stratum: This is a eight-bit unsigned integer indicating the stratum level of the local clock, with values defined as follows: Stratum Meaning ---------------------------------------------- 0 unspecified or unavailable 1 primary reference (e.g., radio clock) 2-15 secondary reference (via NTP or SNTP) 16-255 reserved

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

Field Summary
static StratumType PRIMARY_REFERENCE
          Constant for the "Primary reference" stratum type.
static StratumType SECONDARY_REFERENCE
          Constant for the "Secondary reference" stratum type.
static StratumType UNSPECIFIED
          Constant for the "Unspecified or unavailable" stratum type.
static java.util.List<StratumType> VALUES
          A list of all the stratum type constants.
 
Method Summary
 int compareTo(StratumType that)
           
 int getOrdinal()
          Returns the number associated with this stratum type.
static StratumType getTypeByOrdinal(int type)
          Returns the stratum 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

UNSPECIFIED

public static final StratumType UNSPECIFIED
Constant for the "Unspecified or unavailable" stratum type.


PRIMARY_REFERENCE

public static final StratumType PRIMARY_REFERENCE
Constant for the "Primary reference" stratum type.


SECONDARY_REFERENCE

public static final StratumType SECONDARY_REFERENCE
Constant for the "Secondary reference" stratum type.


VALUES

public static final java.util.List<StratumType> VALUES
A list of all the stratum type constants.

Method Detail

getTypeByOrdinal

public static StratumType getTypeByOrdinal(int type)
Returns the stratum type when specified by its ordinal.

Parameters:
type -
Returns:
The stratum type.

getOrdinal

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

Returns:
The stratum type ordinal.

compareTo

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

toString

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


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