Package com.linecorp.armeria.common.util
Enum TransportType
- All Implemented Interfaces:
Serializable
,Comparable<TransportType>
,java.lang.constant.Constable
public enum TransportType extends Enum<TransportType>
Native transport types.
-
Nested Class Summary
-
Enum Constant Summary
-
Method Summary
Modifier and Type Method Description static Class<? extends DatagramChannel>
datagramChannelType(EventLoopGroup eventLoopGroup)
Returns the availableDatagramChannel
class foreventLoopGroup
.static boolean
isSupported(EventLoopGroup eventLoopGroup)
Returns whether the specifiedEventLoopGroup
supports anyTransportType
.String
lowerCasedName()
Returns lowercase name ofTransportType
.EventLoopGroup
newEventLoopGroup(int nThreads, Function<TransportType,ThreadFactory> threadFactoryFactory)
Creates the availableEventLoopGroup
.Class<? extends ServerChannel>
serverChannelType()
Returns theServerChannel
class that is available for this transport type.static Class<? extends ServerChannel>
serverChannelType(EventLoopGroup eventLoopGroup)
Returns theServerChannel
class foreventLoopGroup
.static Class<? extends SocketChannel>
socketChannelType(EventLoopGroup eventLoopGroup)
Returns the availableSocketChannel
class foreventLoopGroup
.static TransportType
valueOf(String name)
Returns the enum constant of this type with the specified name.static TransportType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
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
-
serverChannelType
Returns theServerChannel
class foreventLoopGroup
. -
serverChannelType
Returns theServerChannel
class that is available for this transport type. -
socketChannelType
Returns the availableSocketChannel
class foreventLoopGroup
. -
datagramChannelType
Returns the availableDatagramChannel
class foreventLoopGroup
. -
isSupported
Returns whether the specifiedEventLoopGroup
supports anyTransportType
. -
lowerCasedName
Returns lowercase name ofTransportType
. This method is a shortcut for:Ascii.toLowerCase(name());
-
newEventLoopGroup
public EventLoopGroup newEventLoopGroup(int nThreads, Function<TransportType,ThreadFactory> threadFactoryFactory)Creates the availableEventLoopGroup
.
-