public class TcpTransport extends Object implements AsynchronousTransport
| Modifier and Type | Class and Description |
|---|---|
static class |
TcpTransport.State |
| Modifier and Type | Field and Description |
|---|---|
org.jboss.netty.bootstrap.ClientBootstrap |
bootstrap |
AtomicBoolean |
cacheDns |
org.jboss.netty.channel.group.ChannelGroup |
channels |
AtomicInteger |
connectTimeout |
static int |
DEFAULT_PORT |
ExceptionReporter |
exceptionReporter |
static org.jboss.netty.handler.codec.frame.LengthFieldPrepender |
frameEncoder |
InetSocketAddress |
localAddress |
org.slf4j.Logger |
logger |
static org.jboss.netty.handler.codec.protobuf.ProtobufDecoder |
pbDecoder |
static org.jboss.netty.handler.codec.protobuf.ProtobufEncoder |
pbEncoder |
AtomicLong |
reconnectDelay |
InetSocketAddress |
remoteAddress |
AtomicReference<SSLContext> |
sslContext |
TcpTransport.State |
state |
org.jboss.netty.util.Timer |
timer |
AtomicInteger |
writeBufferHigh |
AtomicInteger |
writeBufferLow |
AtomicInteger |
writeLimit |
Semaphore |
writeLimiter |
AtomicInteger |
writeTimeout |
| Constructor and Description |
|---|
TcpTransport(InetSocketAddress remoteAddress) |
TcpTransport(InetSocketAddress remoteAddress,
InetSocketAddress localAddress) |
TcpTransport(int remotePort) |
TcpTransport(String remoteHost) |
TcpTransport(String remoteHost,
int remotePort) |
TcpTransport(String remoteHost,
int remotePort,
String localHost,
int localPort) |
TcpTransport(String remoteHost,
String localHost) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
close(boolean force) |
void |
connect() |
void |
flush() |
boolean |
isConnected() |
void |
reconnect() |
IPromise<Proto.Msg> |
sendMessage(Proto.Msg msg) |
Promise<Proto.Msg> |
sendMessage(Proto.Msg msg,
Promise<Proto.Msg> promise) |
void |
setExceptionReporter(ExceptionReporter exceptionReporter) |
TcpTransport |
setWriteBufferLimit(int limit) |
org.jboss.netty.handler.ssl.SslHandler |
sslHandler() |
Transport |
transport() |
public final org.slf4j.Logger logger
public static final org.jboss.netty.handler.codec.protobuf.ProtobufDecoder pbDecoder
public static final org.jboss.netty.handler.codec.protobuf.ProtobufEncoder pbEncoder
public static final org.jboss.netty.handler.codec.frame.LengthFieldPrepender frameEncoder
public static final int DEFAULT_PORT
public volatile TcpTransport.State state
public final org.jboss.netty.channel.group.ChannelGroup channels
public volatile org.jboss.netty.util.Timer timer
public volatile org.jboss.netty.bootstrap.ClientBootstrap bootstrap
public volatile Semaphore writeLimiter
public final AtomicInteger writeLimit
public final AtomicLong reconnectDelay
public final AtomicInteger connectTimeout
public final AtomicInteger writeTimeout
public final AtomicInteger writeBufferHigh
public final AtomicInteger writeBufferLow
public final AtomicBoolean cacheDns
public final InetSocketAddress remoteAddress
public final InetSocketAddress localAddress
public final AtomicReference<SSLContext> sslContext
public volatile ExceptionReporter exceptionReporter
public TcpTransport(InetSocketAddress remoteAddress)
public TcpTransport(InetSocketAddress remoteAddress, InetSocketAddress localAddress)
public TcpTransport(String remoteHost, int remotePort) throws IOException
IOExceptionpublic TcpTransport(String remoteHost, int remotePort, String localHost, int localPort) throws IOException
IOExceptionpublic TcpTransport(String remoteHost) throws IOException
IOExceptionpublic TcpTransport(String remoteHost, String localHost) throws IOException
IOExceptionpublic TcpTransport(int remotePort)
throws IOException
IOExceptionpublic void setExceptionReporter(ExceptionReporter exceptionReporter)
public TcpTransport setWriteBufferLimit(int limit)
public boolean isConnected()
isConnected in interface Transportpublic org.jboss.netty.handler.ssl.SslHandler sslHandler()
public 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 IPromise<Proto.Msg> sendMessage(Proto.Msg msg)
sendMessage in interface AsynchronousTransportCopyright © 2017. All rights reserved.