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
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionClass<? extends DatagramChannel>Returns theDatagramChannelclass that is available for this transport type.static Class<? extends DatagramChannel>datagramChannelType(EventLoopGroup eventLoopGroup) Returns the availableDatagramChannelclass foreventLoopGroup.booleanReturns whether thisTransportTypeis currently available.static booleanisSupported(EventLoopGroup eventLoopGroup) Returns whether the specifiedEventLoopGroupis supported by any of the currently availableTransportTypes.Returns lowercase name ofTransportType.newEventLoopGroup(int nThreads, Function<TransportType, ThreadFactory> threadFactoryFactory) Creates the availableEventLoopGroup.Class<? extends ServerChannel>Returns theServerChannelclass that is available for this transport type.static Class<? extends ServerChannel>serverChannelType(EventLoopGroup eventLoopGroup) Returns theServerChannelclass foreventLoopGroup.Class<? extends SocketChannel>Returns theSocketChannelclass that is available for this transport type.static Class<? extends SocketChannel>socketChannelType(EventLoopGroup eventLoopGroup) Returns the availableSocketChannelclass foreventLoopGroup.Returns why thisTransportTypeis not available.static TransportTypeReturns 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 theServerChannelclass foreventLoopGroup.- Throws:
IllegalStateException- if the specifiedEventLoopGroupis not supported or itsTransportTypeis not currently available.
-
serverChannelType
Returns theServerChannelclass that is available for this transport type.- Throws:
IllegalStateException- if thisTransportTypeis not currently available.
-
socketChannelType
Returns the availableSocketChannelclass foreventLoopGroup.- Throws:
IllegalStateException- if the specifiedEventLoopGroupis not supported or itsTransportTypeis not currently available.
-
socketChannelType
Returns theSocketChannelclass that is available for this transport type.- Throws:
IllegalStateException- if thisTransportTypeis not currently available.
-
datagramChannelType
Returns the availableDatagramChannelclass foreventLoopGroup.- Throws:
IllegalStateException- if the specifiedEventLoopGroupis not supported or itsTransportTypeis not currently available.
-
datagramChannelType
Returns theDatagramChannelclass that is available for this transport type.- Throws:
IllegalStateException- if thisTransportTypeis not currently available.
-
isSupported
Returns whether the specifiedEventLoopGroupis supported by any of the currently availableTransportTypes. -
lowerCasedName
Returns lowercase name ofTransportType. This method is a shortcut for:Ascii.toLowerCase(name()); -
isAvailable
public boolean isAvailable()Returns whether thisTransportTypeis currently available.- See Also:
-
newEventLoopGroup
public EventLoopGroup newEventLoopGroup(int nThreads, Function<TransportType, ThreadFactory> threadFactoryFactory) Creates the availableEventLoopGroup.
-