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

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

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

Mode: This is a three-bit integer indicating the mode, with values defined as follows: Mode Meaning ------------------------------------ 0 reserved 1 symmetric active 2 symmetric passive 3 client 4 server 5 broadcast 6 reserved for NTP control message 7 reserved for private use

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

Field Summary
static ModeType BROADCAST
          Constant for the "Broadcast mode" mode type.
static ModeType CLIENT
          Constant for the "Client mode" mode type.
static ModeType RESERVED
          Constant for the "Reserved mode" mode type.
static ModeType RESERVED_FOR_NTP_CONTROL
          Constant for the "Reserved for NTP control message" mode type.
static ModeType RESERVED_FOR_PRIVATE_USE
          Constant for the "Reserved for private use" mode type.
static ModeType RESERVED_PASSIVE
          Constant for the "Symmetric passive mode" mode type.
static ModeType SERVER
          Constant for the "Server mode" mode type.
static ModeType SYMMETRIC_ACTIVE
          Constant for the "Symmetric active mode" mode type.
static java.util.List<ModeType> VALUES
          A list of all the mode type constants.
 
Method Summary
 int compareTo(ModeType that)
           
 int getOrdinal()
          Returns the number associated with this mode type.
static ModeType getTypeByOrdinal(int type)
          Returns the mode 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

RESERVED

public static final ModeType RESERVED
Constant for the "Reserved mode" mode type.


SYMMETRIC_ACTIVE

public static final ModeType SYMMETRIC_ACTIVE
Constant for the "Symmetric active mode" mode type.


RESERVED_PASSIVE

public static final ModeType RESERVED_PASSIVE
Constant for the "Symmetric passive mode" mode type.


CLIENT

public static final ModeType CLIENT
Constant for the "Client mode" mode type.


SERVER

public static final ModeType SERVER
Constant for the "Server mode" mode type.


BROADCAST

public static final ModeType BROADCAST
Constant for the "Broadcast mode" mode type.


RESERVED_FOR_NTP_CONTROL

public static final ModeType RESERVED_FOR_NTP_CONTROL
Constant for the "Reserved for NTP control message" mode type.


RESERVED_FOR_PRIVATE_USE

public static final ModeType RESERVED_FOR_PRIVATE_USE
Constant for the "Reserved for private use" mode type.


VALUES

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

Method Detail

getTypeByOrdinal

public static ModeType getTypeByOrdinal(int type)
Returns the mode type when specified by its ordinal.

Parameters:
type -
Returns:
The mode type.

getOrdinal

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

Returns:
The mode type ordinal.

compareTo

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

toString

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


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