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 |
AtomicLong |
connectTimeout |
static int |
DEFAULT_PORT |
ExceptionReporter |
exceptionReporter |
static org.jboss.netty.handler.codec.frame.LengthFieldPrepender |
frameEncoder |
org.slf4j.Logger |
logger |
AtomicInteger |
maxInflightRequests |
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 |
| Constructor and Description |
|---|
TcpTransport(InetSocketAddress address) |
TcpTransport(int port) |
TcpTransport(String host) |
TcpTransport(String host,
int port) |
| Modifier and Type | Method and Description |
|---|---|
Promise<Proto.Msg> |
aSendMaybeRecvMessage(Proto.Msg msg) |
Promise<Proto.Msg> |
aSendRecvMessage(Proto.Msg msg) |
void |
connect() |
void |
disconnect() |
void |
disconnect(boolean force) |
void |
flush() |
boolean |
isConnected() |
void |
reconnect() |
void |
setExceptionReporter(ExceptionReporter exceptionReporter) |
org.jboss.netty.handler.ssl.SslHandler |
sslHandler() |
Promise<Proto.Msg> |
write(Proto.Msg msg,
Promise<Proto.Msg> promise) |
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 final AtomicLong reconnectDelay
public final AtomicLong connectTimeout
public final AtomicInteger maxInflightRequests
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 boolean isConnected()
isConnected in interface Transportpublic org.jboss.netty.handler.ssl.SslHandler sslHandler()
public void connect()
throws IOException
connect in interface TransportIOExceptionpublic void disconnect()
throws IOException
disconnect in interface TransportIOExceptionpublic void disconnect(boolean force)
throws IOException
IOExceptionpublic void reconnect()
throws IOException
reconnect in interface TransportIOExceptionpublic void flush()
throws IOException
flush in interface TransportIOExceptionpublic Promise<Proto.Msg> aSendRecvMessage(Proto.Msg msg)
aSendRecvMessage in interface AsynchronousTransportpublic Promise<Proto.Msg> aSendMaybeRecvMessage(Proto.Msg msg)
aSendMaybeRecvMessage in interface AsynchronousTransportCopyright © 2014. All rights reserved.