Package com.linecorp.armeria.common.util
Enum Class TransportType
- All Implemented Interfaces:
Serializable
,Comparable<TransportType>
,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 io.netty.channel.socket.DatagramChannel>
Returns theDatagramChannel
class that is available for this transport type.static Class<? extends io.netty.channel.socket.DatagramChannel>
datagramChannelType
(io.netty.channel.EventLoopGroup eventLoopGroup) Returns the availableDatagramChannel
class that is compatible with the specifiedEventLoopGroup
.Class<? extends io.netty.channel.unix.ServerDomainSocketChannel>
Returns theServerDomainSocketChannel
class that is available for this transport type.static Class<? extends io.netty.channel.unix.ServerDomainSocketChannel>
domainServerChannelType
(io.netty.channel.EventLoopGroup eventLoopGroup) Returns theServerDomainSocketChannel
class that is compatible with the specifiedEventLoopGroup
.Class<? extends io.netty.channel.unix.DomainSocketChannel>
Returns theDomainSocketChannel
class that is available for this transport type.static Class<? extends io.netty.channel.unix.DomainSocketChannel>
domainSocketChannelType
(io.netty.channel.EventLoopGroup eventLoopGroup) Returns the availableDomainSocketChannel
class that is compatible with the specifiedEventLoopGroup
.boolean
Returns whether thisTransportType
is currently available.static boolean
isSupported
(io.netty.channel.EventLoopGroup eventLoopGroup) Returns whether the specifiedEventLoopGroup
is supported by any of the currently availableTransportType
s.Returns lowercase name ofTransportType
.io.netty.channel.EventLoopGroup
newEventLoopGroup
(int nThreads, Function<TransportType, ThreadFactory> threadFactoryFactory) Creates the availableEventLoopGroup
.Class<? extends io.netty.channel.ServerChannel>
Returns theServerChannel
class that is available for this transport type.static Class<? extends io.netty.channel.ServerChannel>
serverChannelType
(io.netty.channel.EventLoopGroup eventLoopGroup) Returns theServerChannel
class that is compatible with the specifiedEventLoopGroup
.Class<? extends io.netty.channel.socket.SocketChannel>
Returns theSocketChannel
class that is available for this transport type.static Class<? extends io.netty.channel.socket.SocketChannel>
socketChannelType
(io.netty.channel.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
(io.netty.channel.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
public static Class<? extends io.netty.channel.ServerChannel> serverChannelType(io.netty.channel.EventLoopGroup eventLoopGroup) 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
public static Class<? extends io.netty.channel.socket.SocketChannel> socketChannelType(io.netty.channel.EventLoopGroup eventLoopGroup) 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
public static boolean supportsDomainSockets(io.netty.channel.EventLoopGroup eventLoopGroup) 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 io.netty.channel.unix.ServerDomainSocketChannel> domainServerChannelType(io.netty.channel.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 io.netty.channel.unix.DomainSocketChannel> domainSocketChannelType(io.netty.channel.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
public static Class<? extends io.netty.channel.socket.DatagramChannel> datagramChannelType(io.netty.channel.EventLoopGroup eventLoopGroup) 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
public static boolean isSupported(io.netty.channel.EventLoopGroup eventLoopGroup) 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 io.netty.channel.EventLoopGroup newEventLoopGroup(int nThreads, Function<TransportType, ThreadFactory> threadFactoryFactory) Creates the availableEventLoopGroup
.
-