org.jetlang.remote.client

## Class JetlangTcpClient

- java.lang.Object
- - org.jetlang.remote.client.JetlangTcpClient

All Implemented Interfaces:
  JetlangClient

    public class JetlangTcpClient
    extends Object
    implements JetlangClient

### Constructor Summary

Constructors
Constructor and Description
`JetlangTcpClient(SocketConnector socketConnector, org.jetlang.fibers.Fiber sendFiber, JetlangClientConfig config, Serializer ser, ErrorHandler errorHandler)`

### Method Summary

All Methods Instance Methods Concrete Methods
`LogoutResult` `close(boolean sendLogoutIfStillConnected)`
`void` `execOnSendThread(org.jetlang.core.Callback<SocketWriter> cb)`
`org.jetlang.channels.Subscriber<CloseEvent>` `getCloseChannel()`
`org.jetlang.channels.Subscriber<ConnectEvent>` `getConnectChannel()`
`org.jetlang.channels.Subscriber<DeadMessageEvent>` `getDeadMessageChannel()`
`org.jetlang.channels.Subscriber<ReadTimeoutEvent>` `getReadTimeoutChannel()`
`<T> void` `publish(String topic, T msg)`
`<T> void` `publish(String topic, T msg, Runnable onSend)`
`<T> org.jetlang.core.Disposable` `request(String reqTopic, Object req, org.jetlang.core.DisposingExecutor executor, org.jetlang.core.Callback<T> callback, org.jetlang.core.Callback<TimeoutControls> timeoutRunnable, int timeout, TimeUnit timeUnit)`
`void` `start()`
`<T> org.jetlang.core.Disposable` `subscribe(String topic, org.jetlang.core.DisposingExecutor clientFiber, org.jetlang.core.Callback<T> cb)`
`<T> org.jetlang.core.Disposable` `subscribe(String subject, org.jetlang.channels.Subscribable<T> callback)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### JetlangTcpClient

    public JetlangTcpClient(SocketConnector socketConnector,
                            org.jetlang.fibers.Fiber sendFiber,
                            JetlangClientConfig config,
                            Serializer ser,
                            ErrorHandler errorHandler)

### Method Detail

#### subscribe

    public <T> org.jetlang.core.Disposable subscribe(String subject,
                                                     org.jetlang.channels.Subscribable<T> callback)

Specified by:
  `subscribe` in interface `JetlangClient`

#### start

    public void start()

Specified by:
  `start` in interface `JetlangClient`

#### subscribe

    public <T> org.jetlang.core.Disposable subscribe(String topic,
                                                     org.jetlang.core.DisposingExecutor clientFiber,
                                                     org.jetlang.core.Callback<T> cb)

Specified by:
  `subscribe` in interface `JetlangClient`

#### close

    public LogoutResult close(boolean sendLogoutIfStillConnected)

Specified by:
  `close` in interface `JetlangClient`

#### request

    public <T> org.jetlang.core.Disposable request(String reqTopic,
                                                   Object req,
                                                   org.jetlang.core.DisposingExecutor executor,
                                                   org.jetlang.core.Callback<T> callback,
                                                   org.jetlang.core.Callback<TimeoutControls> timeoutRunnable,
                                                   int timeout,
                                                   TimeUnit timeUnit)

Specified by:
  `request` in interface `JetlangClient`

#### getCloseChannel

    public org.jetlang.channels.Subscriber<CloseEvent> getCloseChannel()

Specified by:
  `getCloseChannel` in interface `JetlangClient`

#### getReadTimeoutChannel

    public org.jetlang.channels.Subscriber<ReadTimeoutEvent> getReadTimeoutChannel()

Specified by:
  `getReadTimeoutChannel` in interface `JetlangClient`

#### getConnectChannel

    public org.jetlang.channels.Subscriber<ConnectEvent> getConnectChannel()

Specified by:
  `getConnectChannel` in interface `JetlangClient`

#### getDeadMessageChannel

    public org.jetlang.channels.Subscriber<DeadMessageEvent> getDeadMessageChannel()

Specified by:
  `getDeadMessageChannel` in interface `JetlangClient`

#### publish

    public <T> void publish(String topic,
                            T msg)

Specified by:
  `publish` in interface `JetlangClient`

#### publish

    public <T> void publish(String topic,
                            T msg,
                            Runnable onSend)

#### execOnSendThread

    public void execOnSendThread(org.jetlang.core.Callback<SocketWriter> cb)

Specified by:
  `execOnSendThread` in interface `JetlangClient`