io.vertx.reactivex.core.net

## Class NetServer

- java.lang.Object
- - io.vertx.reactivex.core.net.NetServer

- All Implemented Interfaces:
    Measured

      public class NetServer
      extends Object
      implements Measured

  Represents a TCP server

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

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static io.vertx.lang.rx.TypeArg<NetServer>` | `__TYPE_ARG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NetServer(NetServer delegate)`
    `NetServer(Object delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `actualPort()` The actual port the server is listening on.
    `void` | `close()` Like `close(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)` but supplying a handler that will be notified when close is complete.
    `void` | `close(Handler<AsyncResult<Void>> completionHandler)` Like `close(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)` but supplying a handler that will be notified when close is complete.
    `NetServer` | `connectHandler(Handler<NetSocket> handler)` Supply a connect handler for this server.
    `ReadStream<NetSocket>` | `connectStream()` Return the connect stream for this server.
    `boolean` | `equals(Object o)`
    `NetServer` | `getDelegate()`
    `int` | `hashCode()`
    `boolean` | `isMetricsEnabled()` Whether the metrics are enabled for this measured object
    `NetServer` | `listen()` Like `listen(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.core.net.NetServer>>)` but providing a handler that will be notified when the server is listening, or fails.
    `NetServer` | `listen(Handler<AsyncResult<NetServer>> listenHandler)` Like `listen(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.core.net.NetServer>>)` but providing a handler that will be notified when the server is listening, or fails.
    `NetServer` | `listen(int port)` Like `listen(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.core.net.NetServer>>)` but providing a handler that will be notified when the server is listening, or fails.
    `NetServer` | `listen(int port, Handler<AsyncResult<NetServer>> listenHandler)` Like `listen(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.core.net.NetServer>>)` but providing a handler that will be notified when the server is listening, or fails.
    `NetServer` | `listen(int port, String host)` Like `listen(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.core.net.NetServer>>)` but providing a handler that will be notified when the server is listening, or fails.
    `NetServer` | `listen(int port, String host, Handler<AsyncResult<NetServer>> listenHandler)` Like `listen(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.core.net.NetServer>>)` but providing a handler that will be notified when the server is listening, or fails.
    `NetServer` | `listen(SocketAddress localAddress)` Like `listen(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.core.net.NetServer>>)` but providing a handler that will be notified when the server is listening, or fails.
    `NetServer` | `listen(SocketAddress localAddress, Handler<AsyncResult<NetServer>> listenHandler)` Like `listen(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.core.net.NetServer>>)` but providing a handler that will be notified when the server is listening, or fails.
    `static NetServer` | `newInstance(NetServer arg)`
    `Completable` | `rxClose()` Like `close(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)` but supplying a handler that will be notified when close is complete.
    `Single<NetServer>` | `rxListen()` Like `listen(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.core.net.NetServer>>)` but providing a handler that will be notified when the server is listening, or fails.
    `Single<NetServer>` | `rxListen(int port)` Like `listen(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.core.net.NetServer>>)` but providing a handler that will be notified when the server is listening, or fails.
    `Single<NetServer>` | `rxListen(int port, String host)` Like `listen(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.core.net.NetServer>>)` but providing a handler that will be notified when the server is listening, or fails.
    `Single<NetServer>` | `rxListen(SocketAddress localAddress)` Like `listen(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.core.net.NetServer>>)` but providing a handler that will be notified when the server is listening, or fails.
    `String` | `toString()`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

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

      `newInstance`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<NetServer> __TYPE_ARG

  - ### Constructor Detail

    - #### NetServer

          public NetServer(NetServer delegate)

    - #### NetServer

          public NetServer(Object delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getDelegate

          public NetServer 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 metrics are enabled

    - #### connectStream

          public ReadStream<NetSocket> connectStream()

      Return the connect stream for this server. The server can only have at most one handler at any one time. As the server accepts TCP or SSL connections it creates an instance of `NetSocket` and passes it to the connect stream .
      Returns:
        the connect stream

    - #### connectHandler

          public NetServer connectHandler(Handler<NetSocket> handler)

      Supply a connect handler for this server. The server can only have at most one connect handler at any one time. As the server accepts TCP or SSL connections it creates an instance of `NetSocket` and passes it to the connect handler.
      Parameters:
        `handler` -
      Returns:
        a reference to this, so the API can be used fluently

    - #### listen

          public NetServer listen(Handler<AsyncResult<NetServer>> listenHandler)

      Like `listen(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.core.net.NetServer>>)` but providing a handler that will be notified when the server is listening, or fails.
      Parameters:
        `listenHandler` - handler that will be notified when listening or failed
      Returns:
        a reference to this, so the API can be used fluently

    - #### listen

          public NetServer listen()

      Like `listen(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.core.net.NetServer>>)` but providing a handler that will be notified when the server is listening, or fails.
      Returns:
        a reference to this, so the API can be used fluently

    - #### rxListen

          public Single<NetServer> rxListen()

      Like `listen(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.core.net.NetServer>>)` but providing a handler that will be notified when the server is listening, or fails.
      Returns:
        a reference to this, so the API can be used fluently

    - #### listen

          public NetServer listen(int port,
                                  String host,
                                  Handler<AsyncResult<NetServer>> listenHandler)

      Like `listen(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.core.net.NetServer>>)` but providing a handler that will be notified when the server is listening, or fails.
      Parameters:
        `port` - the port to listen on
        `host` - the host to listen on
        `listenHandler` - handler that will be notified when listening or failed
      Returns:
        a reference to this, so the API can be used fluently

    - #### listen

          public NetServer listen(int port,
                                  String host)

      Like `listen(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.core.net.NetServer>>)` but providing a handler that will be notified when the server is listening, or fails.
      Parameters:
        `port` - the port to listen on
        `host` - the host to listen on
      Returns:
        a reference to this, so the API can be used fluently

    - #### rxListen

          public Single<NetServer> rxListen(int port,
                                            String host)

      Like `listen(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.core.net.NetServer>>)` but providing a handler that will be notified when the server is listening, or fails.
      Parameters:
        `port` - the port to listen on
        `host` - the host to listen on
      Returns:
        a reference to this, so the API can be used fluently

    - #### listen

          public NetServer listen(int port,
                                  Handler<AsyncResult<NetServer>> listenHandler)

      Like `listen(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.core.net.NetServer>>)` but providing a handler that will be notified when the server is listening, or fails.
      Parameters:
        `port` - the port to listen on
        `listenHandler` - handler that will be notified when listening or failed
      Returns:
        a reference to this, so the API can be used fluently

    - #### listen

          public NetServer listen(int port)

      Like `listen(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.core.net.NetServer>>)` but providing a handler that will be notified when the server is listening, or fails.
      Parameters:
        `port` - the port to listen on
      Returns:
        a reference to this, so the API can be used fluently

    - #### rxListen

          public Single<NetServer> rxListen(int port)

      Like `listen(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.core.net.NetServer>>)` but providing a handler that will be notified when the server is listening, or fails.
      Parameters:
        `port` - the port to listen on
      Returns:
        a reference to this, so the API can be used fluently

    - #### listen

          public NetServer listen(SocketAddress localAddress,
                                  Handler<AsyncResult<NetServer>> listenHandler)

      Like `listen(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.core.net.NetServer>>)` but providing a handler that will be notified when the server is listening, or fails.
      Parameters:
        `localAddress` - the local address to listen on
        `listenHandler` - handler that will be notified when listening or failed
      Returns:
        a reference to this, so the API can be used fluently

    - #### listen

          public NetServer listen(SocketAddress localAddress)

      Like `listen(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.core.net.NetServer>>)` but providing a handler that will be notified when the server is listening, or fails.
      Parameters:
        `localAddress` - the local address to listen on
      Returns:
        a reference to this, so the API can be used fluently

    - #### rxListen

          public Single<NetServer> rxListen(SocketAddress localAddress)

      Like `listen(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.core.net.NetServer>>)` but providing a handler that will be notified when the server is listening, or fails.
      Parameters:
        `localAddress` - the local address to listen on
      Returns:
        a reference to this, so the API can be used fluently

    - #### close

          public void close(Handler<AsyncResult<Void>> completionHandler)

      Like `close(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)` but supplying a handler that will be notified when close is complete.
      Parameters:
        `completionHandler` - the handler

    - #### close

          public void close()

      Like `close(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)` but supplying a handler that will be notified when close is complete.

    - #### rxClose

          public Completable rxClose()

      Like `close(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)` but supplying a handler that will be notified when close is complete.
      Returns:

    - #### actualPort

          public int actualPort()

      The actual port the server is listening on. This is useful if you bound the server specifying 0 as port number signifying an ephemeral port
      Returns:
        the actual port the server is listening on.

    - #### newInstance

          public static NetServer newInstance(NetServer arg)

Copyright © 2021 Eclipse. All rights reserved.