com.github.dockerjava.api.model
Enum InternetProtocol

java.lang.Object
  extended by java.lang.Enum<InternetProtocol>
      extended by com.github.dockerjava.api.model.InternetProtocol
All Implemented Interfaces:
Serializable, Comparable<InternetProtocol>

public enum InternetProtocol
extends Enum<InternetProtocol>

The IP protocols supported by Docker.

See Also:
TCP, UDP

Enum Constant Summary
TCP
          The Transmission Control Protocol
UDP
          The User Datagram Protocol
 
Field Summary
static InternetProtocol DEFAULT
          The default InternetProtocol: TCP
 
Method Summary
static InternetProtocol parse(String serialized)
          Parses a string to an InternetProtocol.
 String toString()
          Returns a string representation of this InternetProtocol suitable for inclusion in a JSON message.
static InternetProtocol valueOf(String name)
          Returns the enum constant of this type with the specified name.
static InternetProtocol[] 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

TCP

public static final InternetProtocol TCP
The Transmission Control Protocol


UDP

public static final InternetProtocol UDP
The User Datagram Protocol

Field Detail

DEFAULT

public static final InternetProtocol DEFAULT
The default InternetProtocol: TCP

Method Detail

values

public static InternetProtocol[] 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 (InternetProtocol c : InternetProtocol.values())
    System.out.println(c);

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

valueOf

public static InternetProtocol 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

toString

public String toString()
Returns a string representation of this InternetProtocol suitable for inclusion in a JSON message. The output is the lowercased name of the Protocol, e.g. tcp.

Overrides:
toString in class Enum<InternetProtocol>
Returns:
a string representation of this InternetProtocol

parse

public static InternetProtocol parse(String serialized)
                              throws IllegalArgumentException
Parses a string to an InternetProtocol.

Parameters:
serialized - the protocol, e.g. tcp or TCP
Returns:
an InternetProtocol described by the string
Throws:
IllegalArgumentException - if the argument cannot be parsed


Copyright © 2014. All Rights Reserved.