Class NetServer

  • All Implemented Interfaces:
    RxDelegate, Measured

    public class NetServer
    extends Object
    implements RxDelegate, Measured
    Represents a TCP server

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

    • Constructor Detail

      • NetServer

        public NetServer​(NetServer delegate)
      • NetServer

        public NetServer​(Object delegate)
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • 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

        @Deprecated
        public ReadStream<NetSocket> connectStream()
        Deprecated.
        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 io.reactivex.rxjava3.core.Single<NetServer> listen()
        Like listen() 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 io.reactivex.rxjava3.core.Single<NetServer> rxListen()
        Like listen() 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 io.reactivex.rxjava3.core.Single<NetServer> listen​(int port,
                                                                  String host)
        Like listen() 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 io.reactivex.rxjava3.core.Single<NetServer> rxListen​(int port,
                                                                    String host)
        Like listen() 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 io.reactivex.rxjava3.core.Single<NetServer> listen​(int port)
        Like listen() 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 io.reactivex.rxjava3.core.Single<NetServer> rxListen​(int port)
        Like listen() 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 io.reactivex.rxjava3.core.Single<NetServer> listen​(SocketAddress localAddress)
        Like listen() 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 io.reactivex.rxjava3.core.Single<NetServer> rxListen​(SocketAddress localAddress)
        Like listen() 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 io.reactivex.rxjava3.core.Completable close()
        Like close() but supplying a handler that will be notified when close is complete.
        Returns:
      • rxClose

        public io.reactivex.rxjava3.core.Completable rxClose()
        Like close() 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.
      • updateSSLOptions

        public io.reactivex.rxjava3.core.Single<Boolean> updateSSLOptions​(SSLOptions options,
                                                                          boolean force)
        Like updateSSLOptions(io.vertx.core.net.SSLOptions) but supplying a handler that will be called when the update happened (or has failed).
        Parameters:
        options - the new SSL options
        force - force the update when options are equals
        Returns:
      • rxUpdateSSLOptions

        public io.reactivex.rxjava3.core.Single<Boolean> rxUpdateSSLOptions​(SSLOptions options,
                                                                            boolean force)
        Like updateSSLOptions(io.vertx.core.net.SSLOptions) but supplying a handler that will be called when the update happened (or has failed).
        Parameters:
        options - the new SSL options
        force - force the update when options are equals
        Returns:
      • updateTrafficShapingOptions

        public void updateTrafficShapingOptions​(TrafficShapingOptions options)
        Update traffic shaping options options, the update happens if valid values are passed for traffic shaping options. This update happens synchronously and at best effort for rate update to take effect immediately.
        Parameters:
        options - the new traffic shaping options