public class TCPClientConnector extends Object implements ActorClientConnector
| Modifier and Type | Class and Description |
|---|---|
static class |
TCPClientConnector.RemotingHelper |
| Modifier and Type | Field and Description |
|---|---|
protected Callback<ActorClientConnector> |
disconnectCallback |
protected String |
host |
protected int |
port |
protected static AtomicReference<TCPClientConnector.RemotingHelper> |
singleton |
protected org.nustaq.kontraktor.remoting.tcp.TCPClientConnector.MyTCPSocket |
socket |
OBJECT_MAX_BATCH_SIZE| Constructor and Description |
|---|
TCPClientConnector(int port,
String host,
Callback<ActorClientConnector> disconnectCallback) |
| Modifier and Type | Method and Description |
|---|---|
IPromise |
closeClient() |
IPromise |
connect(Function<ObjectSocket,ObjectSink> factory) |
protected static TCPClientConnector.RemotingHelper |
get()
in case clients are connected from non actor world, provide a global actor(thread) for remote client processing
(=polling queues, encoding)
|
protected static AtomicReference<TCPClientConnector.RemotingHelper> singleton
protected int port
protected String host
protected org.nustaq.kontraktor.remoting.tcp.TCPClientConnector.MyTCPSocket socket
protected Callback<ActorClientConnector> disconnectCallback
public TCPClientConnector(int port,
String host,
Callback<ActorClientConnector> disconnectCallback)
protected static TCPClientConnector.RemotingHelper get()
public IPromise connect(Function<ObjectSocket,ObjectSink> factory) throws Exception
connect in interface ActorClientConnectorExceptionpublic IPromise closeClient()
closeClient in interface ActorClientConnectorCopyright © 2019. All rights reserved.