public class TcpClientManager
extends java.lang.Object
Constructor and Description |
---|
TcpClientManager(java.util.concurrent.Executor executor) |
Modifier and Type | Method and Description |
---|---|
void |
addAllNamedChannelHandlers(java.util.List<NamedChannelHandler> namedChannelHandlers) |
void |
addNamedChannelHandler(NamedChannelHandler namedChannelHandler) |
TcpClient |
connect(java.lang.String connectionName,
java.net.SocketAddress socketAddress)
Connects to a server.
|
void |
shutdown()
Sets all
TcpClientConnection s as non-persistent and closes all open
Channel s. |
public void addNamedChannelHandler(NamedChannelHandler namedChannelHandler)
public void addAllNamedChannelHandlers(java.util.List<NamedChannelHandler> namedChannelHandlers)
public TcpClient connect(java.lang.String connectionName, java.net.SocketAddress socketAddress)
This call blocks until the connection is established or fails.
connectionName
- the name of the new connectionsocketAddress
- the SocketAddress
to connect toTcpClient
public void shutdown()
TcpClientConnection
s as non-persistent and closes all open
Channel
s.