Enum SocketProtocolFamily
- All Implemented Interfaces:
Serializable, Comparable<SocketProtocolFamily>, ProtocolFamily
ProtocolFamily implementation that is used by the different transport implementations.-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic SocketProtocolFamilyof(ProtocolFamily family) Return theSocketProtocolFamilyfor the givenProtocolFamilyif possible.Return aProtocolFamilythat is "known" by the JDK itself and represent the same asSocketProtocolFamily.static SocketProtocolFamilyReturns the enum constant of this type with the specified name.static SocketProtocolFamily[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface ProtocolFamily
name
-
Enum Constant Details
-
INET
IPv4 -
INET6
IPv6 -
UNIX
Unix Domain Socket
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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 nameNullPointerException- if the argument is null
-
toJdkFamily
Return aProtocolFamilythat is "known" by the JDK itself and represent the same asSocketProtocolFamily.- Returns:
- the JDK
ProtocolFamily. - Throws:
UnsupportedOperationException- if it can't be converted.
-
of
Return theSocketProtocolFamilyfor the givenProtocolFamilyif possible.- Parameters:
family- the JDKProtocolFamilyto convert.- Returns:
- the
SocketProtocolFamily. - Throws:
UnsupportedOperationException- if it can't be converted.
-