org.apache.directory.server.protocol.shared
Enum TransportProtocol
java.lang.Object
java.lang.Enum<TransportProtocol>
org.apache.directory.server.protocol.shared.TransportProtocol
- All Implemented Interfaces:
- Serializable, Comparable<TransportProtocol>
public enum TransportProtocol
- extends Enum<TransportProtocol>
Type safe enumeration for the transport protocol.
- Author:
- Apache Directory Project
TCP
public static final TransportProtocol TCP
UDP
public static final TransportProtocol UDP
values
public static TransportProtocol[] 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 (TransportProtocol c : TransportProtocol.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static TransportProtocol 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
getIntValue
public int getIntValue()
- Gets an integer value for switches.
- Returns:
- ordinal integer value
toString
public String toString()
- Overrides:
toString in class Enum<TransportProtocol>
Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.