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

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

public enum ModeType
extends Enum<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

Author:
Apache Directory Project

Enum Constant Summary
BROADCAST
          Constant for the "Broadcast mode" mode type.
CLIENT
          Constant for the "Client mode" mode type.
RESERVED
          Constant for the "Reserved mode" mode type.
RESERVED_FOR_NTP_CONTROL
          Constant for the "Reserved for NTP control message" mode type.
RESERVED_FOR_PRIVATE_USE
          Constant for the "Reserved for private use" mode type.
RESERVED_PASSIVE
          Constant for the "Symmetric passive mode" mode type.
SERVER
          Constant for the "Server mode" mode type.
SYMMETRIC_ACTIVE
          Constant for the "Symmetric active mode" mode type.
 
Method Summary
 int getOrdinal()
          Returns the number associated with this mode type.
static ModeType getTypeByOrdinal(int type)
          Returns the mode type when specified by its ordinal.
 String toString()
           
static ModeType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ModeType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant 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.

Method Detail

values

public static ModeType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ModeType c : ModeType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ModeType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

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.

toString

public String toString()
Overrides:
toString in class Enum<ModeType>


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