public class TcpTransport extends Object implements AsynchronousTransport
| Modifier and Type | Class and Description |
|---|---|
static class |
TcpTransport.State |
| Modifier and Type | Field and Description |
|---|---|
InetSocketAddress |
address |
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 |
org.slf4j.Logger |
logger |
static org.jboss.netty.handler.codec.protobuf.ProtobufDecoder |
pbDecoder |
static org.jboss.netty.handler.codec.protobuf.ProtobufEncoder |
pbEncoder |
AtomicLong |
reconnectDelay |
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 address) |
TcpTransport(int port) |
TcpTransport(String host) |
TcpTransport(String host,
int port) |
| 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 address
public final AtomicReference<SSLContext> sslContext
public volatile ExceptionReporter exceptionReporter
public TcpTransport(InetSocketAddress address)
public TcpTransport(String host, int port) throws IOException
IOExceptionpublic TcpTransport(String host) throws IOException
IOExceptionpublic TcpTransport(int port)
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 © 2015. All rights reserved.