io.vertx.rxjava.core.net

## Class NetClient

- java.lang.Object
- - io.vertx.rxjava.core.net.NetClient

- All Implemented Interfaces:
    Measured

      public class NetClient
      extends Object
      implements Measured

  A TCP client.

  Multiple connections to different servers can be made using the same instance.

  This client supports a configurable number of connection attempts and a configurable delay between attempts.

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NetClient(NetClient delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Close the client.
    `NetClient` | `connect(int port, String host, Handler<AsyncResult<NetSocket>> connectHandler)` Open a connection to a server at the specific `port` and `host`.
    `Observable<NetSocket>` | `connectObservable(int port, String host)` Open a connection to a server at the specific `port` and `host`.
    `Object` | `getDelegate()`
    `boolean` | `isMetricsEnabled()` Whether the metrics are enabled for this measured object
    `static NetClient` | `newInstance(NetClient arg)`

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

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

    - ### Methods inherited from interface io.vertx.rxjava.core.metrics.Measured

      `newInstance`

- - ### Constructor Detail

    - #### NetClient

          public NetClient(NetClient delegate)

  - ### Method Detail

    - #### getDelegate

          public Object getDelegate()

      Specified by:
        `getDelegate` in interface `Measured`

    - #### isMetricsEnabled

          public boolean isMetricsEnabled()

      Whether the metrics are enabled for this measured object
      Specified by:
        `isMetricsEnabled` in interface `Measured`
      Returns:
        true if the metrics are enabled

    - #### connect

          public NetClient connect(int port,
                                   String host,
                                   Handler<AsyncResult<NetSocket>> connectHandler)

      Open a connection to a server at the specific `port` and `host`.

      `host` can be a valid host name or IP address. The connect is done asynchronously and on success, a `NetSocket` instance is supplied via the `connectHandler` instance

      Parameters:
        `port` - the port
        `host` - the host
        `connectHandler` -
      Returns:
        a reference to this, so the API can be used fluently

    - #### connectObservable

          public Observable<NetSocket> connectObservable(int port,
                                                         String host)

      Open a connection to a server at the specific `port` and `host`.

      `host` can be a valid host name or IP address. The connect is done asynchronously and on success, a `NetSocket` instance is supplied via the `connectHandler` instance

      Parameters:
        `port` - the port
        `host` - the host
      Returns:

    - #### close

          public void close()

      Close the client.

      Any sockets which have not been closed manually will be closed here. The close is asynchronous and may not complete until some time after the method has returned.

    - #### newInstance

          public static NetClient newInstance(NetClient arg)

Copyright © 2016. All rights reserved.