public class Transport extends Object
Vertx instance.
| Modifier and Type | Field and Description |
|---|---|
static int |
ACCEPTOR_EVENT_LOOP_GROUP |
static int |
IO_EVENT_LOOP_GROUP |
static Transport |
JDK
The JDK transport, always there.
|
| Modifier | Constructor and Description |
|---|---|
protected |
Transport() |
| Modifier and Type | Method and Description |
|---|---|
io.netty.channel.ChannelFactory<? extends io.netty.channel.Channel> |
channelFactory(boolean domainSocket) |
void |
configure(ClientOptionsBase options,
boolean domainSocket,
io.netty.bootstrap.Bootstrap bootstrap) |
void |
configure(io.netty.channel.socket.DatagramChannel channel,
DatagramSocketOptions options) |
void |
configure(NetServerOptions options,
boolean domainSocket,
io.netty.bootstrap.ServerBootstrap bootstrap) |
SocketAddress |
convert(SocketAddress address) |
SocketAddress |
convert(SocketAddress address,
boolean resolved) |
io.netty.channel.socket.DatagramChannel |
datagramChannel() |
io.netty.channel.socket.DatagramChannel |
datagramChannel(io.netty.channel.socket.InternetProtocolFamily family) |
io.netty.channel.EventLoopGroup |
eventLoopGroup(int type,
int nThreads,
ThreadFactory threadFactory,
int ioRatio) |
boolean |
isAvailable() |
static Transport |
nativeTransport()
The native transport, it may be
null or failed. |
io.netty.channel.ChannelFactory<? extends io.netty.channel.ServerChannel> |
serverChannelFactory(boolean domainSocket) |
static Transport |
transport(boolean preferNative) |
Throwable |
unavailabilityCause() |
public static final int ACCEPTOR_EVENT_LOOP_GROUP
public static final int IO_EVENT_LOOP_GROUP
public static Transport JDK
public static Transport nativeTransport()
null or failed.public static Transport transport(boolean preferNative)
public boolean isAvailable()
public Throwable unavailabilityCause()
isAvailable() returns null.public SocketAddress convert(SocketAddress address, boolean resolved)
public SocketAddress convert(SocketAddress address)
public io.netty.channel.EventLoopGroup eventLoopGroup(int type,
int nThreads,
ThreadFactory threadFactory,
int ioRatio)
type - one of ACCEPTOR_EVENT_LOOP_GROUP or IO_EVENT_LOOP_GROUP.nThreads - the number of threads that will be used by this instance.threadFactory - the ThreadFactory to use.ioRatio - the IO ratiopublic io.netty.channel.socket.DatagramChannel datagramChannel()
public io.netty.channel.socket.DatagramChannel datagramChannel(io.netty.channel.socket.InternetProtocolFamily family)
public io.netty.channel.ChannelFactory<? extends io.netty.channel.Channel> channelFactory(boolean domainSocket)
domainSocket - whether to create a unix domain channel or a socket channelpublic io.netty.channel.ChannelFactory<? extends io.netty.channel.ServerChannel> serverChannelFactory(boolean domainSocket)
domainSocket - whether to create a server unix domain channel or a regular server socket channelpublic void configure(io.netty.channel.socket.DatagramChannel channel,
DatagramSocketOptions options)
public void configure(ClientOptionsBase options, boolean domainSocket, io.netty.bootstrap.Bootstrap bootstrap)
public void configure(NetServerOptions options, boolean domainSocket, io.netty.bootstrap.ServerBootstrap bootstrap)
Copyright © 2020. All rights reserved.