Package com.linecorp.armeria.common.util
Enum Class TransportType
- All Implemented Interfaces:
Serializable
,Comparable<TransportType>
,java.lang.constant.Constable
Native transport types.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionClass<? extends DatagramChannel>
Returns theDatagramChannel
class that is available for this transport type.static Class<? extends DatagramChannel>
datagramChannelType(EventLoopGroup eventLoopGroup)
Returns the availableDatagramChannel
class foreventLoopGroup
.boolean
Returns whether thisTransportType
is currently available.static boolean
isSupported(EventLoopGroup eventLoopGroup)
Returns whether the specifiedEventLoopGroup
is supported by any of the currently availableTransportType
s.Returns lowercase name ofTransportType
.newEventLoopGroup(int nThreads, Function<TransportType,ThreadFactory> threadFactoryFactory)
Creates the availableEventLoopGroup
.Class<? extends ServerChannel>
Returns theServerChannel
class that is available for this transport type.static Class<? extends ServerChannel>
serverChannelType(EventLoopGroup eventLoopGroup)
Returns theServerChannel
class foreventLoopGroup
.Class<? extends SocketChannel>
Returns theSocketChannel
class that is available for this transport type.static Class<? extends SocketChannel>
socketChannelType(EventLoopGroup eventLoopGroup)
Returns the availableSocketChannel
class foreventLoopGroup
.Returns why thisTransportType
is not available.static TransportType
Returns the enum constant of this class with the specified name.static TransportType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NIO
-
EPOLL
-
IO_URING
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
serverChannelType
Returns theServerChannel
class foreventLoopGroup
.- Throws:
IllegalStateException
- if the specifiedEventLoopGroup
is not supported or itsTransportType
is not currently available.
-
serverChannelType
Returns theServerChannel
class that is available for this transport type.- Throws:
IllegalStateException
- if thisTransportType
is not currently available.
-
socketChannelType
Returns the availableSocketChannel
class foreventLoopGroup
.- Throws:
IllegalStateException
- if the specifiedEventLoopGroup
is not supported or itsTransportType
is not currently available.
-
socketChannelType
Returns theSocketChannel
class that is available for this transport type.- Throws:
IllegalStateException
- if thisTransportType
is not currently available.
-
datagramChannelType
Returns the availableDatagramChannel
class foreventLoopGroup
.- Throws:
IllegalStateException
- if the specifiedEventLoopGroup
is not supported or itsTransportType
is not currently available.
-
datagramChannelType
Returns theDatagramChannel
class that is available for this transport type.- Throws:
IllegalStateException
- if thisTransportType
is not currently available.
-
isSupported
Returns whether the specifiedEventLoopGroup
is supported by any of the currently availableTransportType
s. -
lowerCasedName
Returns lowercase name ofTransportType
. This method is a shortcut for:Ascii.toLowerCase(name());
-
isAvailable
public boolean isAvailable()Returns whether thisTransportType
is currently available.- See Also:
unavailabilityCause()
-
newEventLoopGroup
public EventLoopGroup newEventLoopGroup(int nThreads, Function<TransportType,ThreadFactory> threadFactoryFactory)Creates the availableEventLoopGroup
.
-