public abstract class TcpClient
extends java.lang.Object
implements java.io.Closeable
| 限定符和类型 | 字段和说明 |
|---|---|
protected static int |
CLIENTNO |
protected java.util.concurrent.ConcurrentHashMap<java.lang.Object,RequestContext> |
contexts |
protected java.lang.String |
host |
protected int |
port |
protected static java.util.concurrent.ScheduledExecutorService |
scheduler |
protected org.apache.eventmesh.common.protocol.tcp.UserAgent |
userAgent |
| 构造器和说明 |
|---|
TcpClient(EventMeshTCPClientConfig eventMeshTcpClientConfig) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
protected void |
goodbye() |
protected void |
heartbeat() |
protected void |
hello() |
protected org.apache.eventmesh.common.protocol.tcp.Package |
io(org.apache.eventmesh.common.protocol.tcp.Package msg,
long timeout) |
protected boolean |
isActive() |
protected void |
open(io.netty.channel.SimpleChannelInboundHandler<org.apache.eventmesh.common.protocol.tcp.Package> handler) |
protected void |
reconnect() |
protected void |
send(org.apache.eventmesh.common.protocol.tcp.Package msg) |
protected static transient int CLIENTNO
protected final transient java.util.concurrent.ConcurrentHashMap<java.lang.Object,RequestContext> contexts
protected final transient java.lang.String host
protected final transient int port
protected final transient org.apache.eventmesh.common.protocol.tcp.UserAgent userAgent
protected static final java.util.concurrent.ScheduledExecutorService scheduler
public TcpClient(EventMeshTCPClientConfig eventMeshTcpClientConfig)
protected void open(io.netty.channel.SimpleChannelInboundHandler<org.apache.eventmesh.common.protocol.tcp.Package> handler)
throws java.lang.Exception
java.lang.Exceptionpublic void close()
close 在接口中 java.io.Closeableclose 在接口中 java.lang.AutoCloseableprotected void heartbeat()
protected void reconnect()
throws java.lang.Exception
java.lang.Exceptionprotected boolean isActive()
protected void send(org.apache.eventmesh.common.protocol.tcp.Package msg)
throws java.lang.Exception
java.lang.Exceptionprotected org.apache.eventmesh.common.protocol.tcp.Package io(org.apache.eventmesh.common.protocol.tcp.Package msg,
long timeout)
throws java.lang.Exception
java.lang.Exceptionprotected void hello()
throws java.lang.Exception
java.lang.Exceptionprotected void goodbye()
throws java.lang.Exception
java.lang.Exception