public class UdpTransport extends Object implements SynchronousTransport
| Modifier and Type | Class and Description |
|---|---|
class |
UdpTransport.DiscardHandler |
static class |
UdpTransport.State |
| Modifier and Type | Field and Description |
|---|---|
AtomicBoolean |
autoFlush |
static Promise<Proto.Msg> |
blackhole |
io.netty.bootstrap.Bootstrap |
bootstrap |
io.netty.channel.group.ChannelGroup |
channels |
AtomicLong |
connectTimeout |
static int |
DEFAULT_PORT |
UdpTransport.DiscardHandler |
discardHandler |
io.netty.channel.EventLoopGroup |
eventLoopGroup |
ExceptionReporter |
exceptionReporter |
InetSocketAddress |
localAddress |
static io.netty.handler.codec.protobuf.ProtobufEncoder |
pbEncoder |
AtomicLong |
reconnectDelay |
InetSocketAddress |
remoteAddress |
AtomicInteger |
sendBufferSize |
UdpTransport.State |
state |
| Constructor and Description |
|---|
UdpTransport(InetSocketAddress remoteAddress) |
UdpTransport(InetSocketAddress remoteAddress,
InetSocketAddress localAddress) |
UdpTransport(int port) |
UdpTransport(String remoteHost) |
UdpTransport(String host,
int port) |
UdpTransport(String remoteHost,
int remotePort,
String localHost,
int localPort) |
UdpTransport(String remoteHost,
String localHost) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
close(boolean force) |
void |
connect() |
void |
flush() |
boolean |
isConnected() |
void |
reconnect() |
Proto.Msg |
sendMessage(Proto.Msg msg) |
void |
setExceptionReporter(ExceptionReporter exceptionReporter) |
Transport |
transport() |
public static final io.netty.handler.codec.protobuf.ProtobufEncoder pbEncoder
public final UdpTransport.DiscardHandler discardHandler
public static final int DEFAULT_PORT
public volatile UdpTransport.State state
public volatile io.netty.bootstrap.Bootstrap bootstrap
public final io.netty.channel.EventLoopGroup eventLoopGroup
public final io.netty.channel.group.ChannelGroup channels
public final AtomicLong reconnectDelay
public final AtomicLong connectTimeout
public final AtomicInteger sendBufferSize
public final AtomicBoolean autoFlush
public final InetSocketAddress remoteAddress
public final InetSocketAddress localAddress
public volatile ExceptionReporter exceptionReporter
public UdpTransport(InetSocketAddress remoteAddress)
public UdpTransport(InetSocketAddress remoteAddress, InetSocketAddress localAddress)
public UdpTransport(String host, int port) throws IOException
IOExceptionpublic UdpTransport(String remoteHost, int remotePort, String localHost, int localPort) throws IOException
IOExceptionpublic UdpTransport(String remoteHost) throws IOException
IOExceptionpublic UdpTransport(String remoteHost, String localHost) throws IOException
IOExceptionpublic UdpTransport(int port)
throws IOException
IOExceptionpublic void setExceptionReporter(ExceptionReporter exceptionReporter)
public boolean isConnected()
isConnected in interface Transportpublic void connect()
throws IOException
connect in interface TransportIOExceptionpublic void close()
close in interface Transportclose in interface AutoCloseablepublic void close(boolean force)
public void reconnect()
throws IOException
reconnect in interface TransportIOExceptionpublic void flush()
throws IOException
flush in interface TransportIOExceptionpublic Proto.Msg sendMessage(Proto.Msg msg)
sendMessage in interface SynchronousTransportCopyright © 2019. All rights reserved.