public enum TransportType extends Enum<TransportType>
| Modifier and Type | Method and Description |
|---|---|
static Class<? extends io.netty.channel.socket.DatagramChannel> |
datagramChannelType(io.netty.channel.EventLoopGroup eventLoopGroup)
Returns the available
DatagramChannel class for eventLoopGroup. |
static TransportType |
detectTransportType()
Returns the available
TransportType. |
static boolean |
isSupported(io.netty.channel.EventLoop eventLoop)
Returns whether the specified
EventLoop supports any TransportType. |
static boolean |
isSupported(io.netty.channel.EventLoopGroup eventLoopGroup)
Returns whether the specified
EventLoopGroup supports any TransportType. |
String |
lowerCasedName()
Returns lowercase name of
TransportType. |
io.netty.channel.EventLoopGroup |
newEventLoopGroup(int nThreads,
Function<TransportType,ThreadFactory> threadFactoryFactory)
Creates the available
EventLoopGroup. |
Class<? extends io.netty.channel.ServerChannel> |
serverChannelType()
Returns the
ServerChannel class that is available for this transport type. |
static Class<? extends io.netty.channel.ServerChannel> |
serverChannelType(io.netty.channel.EventLoopGroup eventLoopGroup)
Returns the
ServerChannel class for eventLoopGroup. |
static Class<? extends io.netty.channel.socket.SocketChannel> |
socketChannelType(io.netty.channel.EventLoopGroup eventLoopGroup)
Returns the available
SocketChannel class for eventLoopGroup. |
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.
|
public static final TransportType NIO
public static final TransportType EPOLL
public static TransportType[] values()
for (TransportType c : TransportType.values()) System.out.println(c);
public static TransportType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static TransportType detectTransportType()
TransportType.public static Class<? extends io.netty.channel.ServerChannel> serverChannelType(io.netty.channel.EventLoopGroup eventLoopGroup)
ServerChannel class for eventLoopGroup.public Class<? extends io.netty.channel.ServerChannel> serverChannelType()
ServerChannel class that is available for this transport type.public static Class<? extends io.netty.channel.socket.SocketChannel> socketChannelType(io.netty.channel.EventLoopGroup eventLoopGroup)
SocketChannel class for eventLoopGroup.public static Class<? extends io.netty.channel.socket.DatagramChannel> datagramChannelType(io.netty.channel.EventLoopGroup eventLoopGroup)
DatagramChannel class for eventLoopGroup.public static boolean isSupported(io.netty.channel.EventLoop eventLoop)
EventLoop supports any TransportType.public static boolean isSupported(io.netty.channel.EventLoopGroup eventLoopGroup)
EventLoopGroup supports any TransportType.public String lowerCasedName()
TransportType.
This method is a shortcut for:
Ascii.toLowerCase(name());
public io.netty.channel.EventLoopGroup newEventLoopGroup(int nThreads,
Function<TransportType,ThreadFactory> threadFactoryFactory)
EventLoopGroup.Copyright © 2020 LeanCloud. All rights reserved.