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 |
|---|---|
static Promise<Proto.Msg> |
blackhole |
org.jboss.netty.bootstrap.ConnectionlessBootstrap |
bootstrap |
AtomicBoolean |
cacheDns |
org.jboss.netty.channel.group.ChannelGroup |
channels |
AtomicLong |
connectTimeout |
static int |
DEFAULT_PORT |
UdpTransport.DiscardHandler |
discardHandler |
ExceptionReporter |
exceptionReporter |
InetSocketAddress |
localAddress |
static org.jboss.netty.handler.codec.protobuf.ProtobufEncoder |
pbEncoder |
AtomicLong |
reconnectDelay |
InetSocketAddress |
remoteAddress |
AtomicInteger |
sendBufferSize |
UdpTransport.State |
state |
org.jboss.netty.util.Timer |
timer |
| 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 org.jboss.netty.handler.codec.protobuf.ProtobufEncoder pbEncoder
public final UdpTransport.DiscardHandler discardHandler
public static final int DEFAULT_PORT
public volatile UdpTransport.State state
public volatile org.jboss.netty.util.Timer timer
public volatile org.jboss.netty.bootstrap.ConnectionlessBootstrap bootstrap
public final org.jboss.netty.channel.group.ChannelGroup channels
public final AtomicLong reconnectDelay
public final AtomicLong connectTimeout
public final AtomicInteger sendBufferSize
public final AtomicBoolean cacheDns
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 © 2017. All rights reserved.