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 that is compatible with the specifiedEventLoopGroup
.Class<? extends ServerDomainSocketChannel>
Returns theServerDomainSocketChannel
class that is available for this transport type.static Class<? extends ServerDomainSocketChannel>
domainServerChannelType
(EventLoopGroup eventLoopGroup) Returns theServerDomainSocketChannel
class that is compatible with the specifiedEventLoopGroup
.Class<? extends DomainSocketChannel>
Returns theDomainSocketChannel
class that is available for this transport type.static Class<? extends DomainSocketChannel>
domainSocketChannelType
(EventLoopGroup eventLoopGroup) Returns the availableDomainSocketChannel
class that is compatible with the specifiedEventLoopGroup
.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 that is compatible with the specifiedEventLoopGroup
.Class<? extends SocketChannel>
Returns theSocketChannel
class that is available for this transport type.static Class<? extends SocketChannel>
socketChannelType
(EventLoopGroup eventLoopGroup) Returns the availableSocketChannel
class that is compatible with the specifiedEventLoopGroup
.boolean
Returns whether thisTransportType
supports Unix domain sockets or not.static boolean
supportsDomainSockets
(EventLoopGroup eventLoopGroup) Returns whether the specifiedEventLoopGroup
supports Unix domain sockets or not.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
-
KQUEUE
-
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 that is compatible with the specifiedEventLoopGroup
.- 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 that is compatible with the specifiedEventLoopGroup
.- 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.
-
supportsDomainSockets
Returns whether the specifiedEventLoopGroup
supports Unix domain sockets or not. -
supportsDomainSockets
public boolean supportsDomainSockets()Returns whether thisTransportType
supports Unix domain sockets or not. -
domainServerChannelType
public static Class<? extends ServerDomainSocketChannel> domainServerChannelType(EventLoopGroup eventLoopGroup) Returns theServerDomainSocketChannel
class that is compatible with the specifiedEventLoopGroup
.- Throws:
IllegalStateException
- if the specifiedEventLoopGroup
is not supported or itsTransportType
is not currently available.
-
domainServerChannelType
Returns theServerDomainSocketChannel
class that is available for this transport type.- Throws:
IllegalStateException
- if thisTransportType
is not currently available or doesn't support Unix domain sockets.
-
domainSocketChannelType
public static Class<? extends DomainSocketChannel> domainSocketChannelType(EventLoopGroup eventLoopGroup) Returns the availableDomainSocketChannel
class that is compatible with the specifiedEventLoopGroup
.- Throws:
IllegalStateException
- if the specifiedEventLoopGroup
is not supported or itsTransportType
is not currently available or doesn't support Unix domain sockets.
-
domainSocketChannelType
Returns theDomainSocketChannel
class that is available for this transport type.- Throws:
IllegalStateException
- if thisTransportType
is not currently available.
-
datagramChannelType
Returns the availableDatagramChannel
class that is compatible with the specifiedEventLoopGroup
.- 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:
-
newEventLoopGroup
public EventLoopGroup newEventLoopGroup(int nThreads, Function<TransportType, ThreadFactory> threadFactoryFactory) Creates the availableEventLoopGroup
.
-