Class NetServer

java.lang.Object
io.vertx.mutiny.core.net.NetServer
All Implemented Interfaces:
MutinyDelegate, Measured

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

NOTE: This class has been automatically generated from the original non Mutiny-ified interface.

Author:
Tim Fox
See Also:
  • NetServer
  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.vertx.mutiny.core.metrics.Measured

    Measured.MeasuredImpl
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final TypeArg<NetServer>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    NetServer(io.vertx.core.net.NetServer delegate)
    Create a new instance of NetServer delegating to the given (non-null) instance of NetServer.
    NetServer(Object delegate)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    The actual port the server is listening on.
    io.smallrye.mutiny.Uni<Void>
    Close the server.
    void
    Close the server.
    Close the server.
    Supply a connect handler for this server.
    boolean
     
    io.vertx.core.net.NetServer
    Get the delegate instance.
    int
     
    boolean
    Whether the metrics are enabled for this measured object
    io.smallrye.mutiny.Uni<NetServer>
    Start listening on the port and host as configured in the io.vertx.mutiny.core.net.NetServerOptions used when creating the server.
    io.smallrye.mutiny.Uni<NetServer>
    listen(int port)
    Start listening on the specified port and host "0.0.0.0", ignoring port and host configured in the io.vertx.mutiny.core.net.NetServerOptions used when creating the server.
    io.smallrye.mutiny.Uni<NetServer>
    listen(int port, String host)
    Start listening on the specified port and host, ignoring port and host configured in the io.vertx.mutiny.core.net.NetServerOptions used when creating the server.
    io.smallrye.mutiny.Uni<NetServer>
    listen(io.vertx.core.net.SocketAddress localAddress)
    Start listening on the specified local address, ignoring port and host configured in the io.vertx.mutiny.core.net.NetServerOptions used when creating the server.
    Start listening on the port and host as configured in the io.vertx.mutiny.core.net.NetServerOptions used when creating the server.
    listenAndAwait(int port)
    Start listening on the specified port and host "0.0.0.0", ignoring port and host configured in the io.vertx.mutiny.core.net.NetServerOptions used when creating the server.
    listenAndAwait(int port, String host)
    Start listening on the specified port and host, ignoring port and host configured in the io.vertx.mutiny.core.net.NetServerOptions used when creating the server.
    listenAndAwait(io.vertx.core.net.SocketAddress localAddress)
    Start listening on the specified local address, ignoring port and host configured in the io.vertx.mutiny.core.net.NetServerOptions used when creating the server.
    Start listening on the port and host as configured in the io.vertx.mutiny.core.net.NetServerOptions used when creating the server.
    listenAndForget(int port)
    Start listening on the specified port and host "0.0.0.0", ignoring port and host configured in the io.vertx.mutiny.core.net.NetServerOptions used when creating the server.
    listenAndForget(int port, String host)
    Start listening on the specified port and host, ignoring port and host configured in the io.vertx.mutiny.core.net.NetServerOptions used when creating the server.
    listenAndForget(io.vertx.core.net.SocketAddress localAddress)
    Start listening on the specified local address, ignoring port and host configured in the io.vertx.mutiny.core.net.NetServerOptions used when creating the server.
    static NetServer
    newInstance(io.vertx.core.net.NetServer delegate)
    Creates a new instance of the NetServer.
    io.smallrye.mutiny.Uni<Void>
    Shutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)).
    io.smallrye.mutiny.Uni<Void>
    shutdown(long timeout, TimeUnit unit)
    io.smallrye.mutiny.Uni<Void>
    shutdown(Duration timeout)
    Initiate the server shutdown sequence.
    void
    Shutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)).
    void
    shutdownAndAwait(long timeout, TimeUnit unit)
    void
    Initiate the server shutdown sequence.
    Shutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)).
    shutdownAndForget(long timeout, TimeUnit unit)
    Initiate the server shutdown sequence.
     
    io.smallrye.mutiny.Uni<Boolean>
    updateSSLOptions(io.vertx.core.net.ServerSSLOptions options)
    Update the server with new SSL options, the update happens if the options object is valid and different from the existing options object.
    io.smallrye.mutiny.Uni<Boolean>
    updateSSLOptions(io.vertx.core.net.ServerSSLOptions options, boolean force)
    Update the server with new SSL options, the update happens if the options object is valid and different from the existing options object.
    updateSSLOptionsAndAwait(io.vertx.core.net.ServerSSLOptions options)
    Update the server with new SSL options, the update happens if the options object is valid and different from the existing options object.
    updateSSLOptionsAndAwait(io.vertx.core.net.ServerSSLOptions options, boolean force)
    Update the server with new SSL options, the update happens if the options object is valid and different from the existing options object.
    updateSSLOptionsAndForget(io.vertx.core.net.ServerSSLOptions options)
    Update the server with new SSL options, the update happens if the options object is valid and different from the existing options object.
    updateSSLOptionsAndForget(io.vertx.core.net.ServerSSLOptions options, boolean force)
    Update the server with new SSL options, the update happens if the options object is valid and different from the existing options object.
    io.smallrye.mutiny.Uni<Boolean>
    updateTrafficShapingOptions(io.vertx.core.net.TrafficShapingOptions options)
    Update the server with new traffic options, the update happens if the options object is valid and different from the existing options object.
    updateTrafficShapingOptionsAndAwait(io.vertx.core.net.TrafficShapingOptions options)
    Update the server with new traffic options, the update happens if the options object is valid and different from the existing options object.
    updateTrafficShapingOptionsAndForget(io.vertx.core.net.TrafficShapingOptions options)
    Update the server with new traffic options, the update happens if the options object is valid and different from the existing options object.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • NetServer

      public NetServer(io.vertx.core.net.NetServer delegate)
      Create a new instance of NetServer delegating to the given (non-null) instance of NetServer.
    • NetServer

      public NetServer(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.core.net.NetServer getDelegate()
      Get the delegate instance.

      This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.

      Specified by:
      getDelegate in interface Measured
      Specified by:
      getDelegate in interface MutinyDelegate
      Returns:
      the delegate instance
    • listen

      @CheckReturnValue public io.smallrye.mutiny.Uni<NetServer> listen()
      Start listening on the port and host as configured in the io.vertx.mutiny.core.net.NetServerOptions used when creating the server.

      The server may not be listening until some time after the call to listen has returned.

      Unlike the bare Vert.x variant, this method returns a Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • NetServer.listen()
    • listenAndAwait

      public NetServer listenAndAwait()
      Start listening on the port and host as configured in the io.vertx.mutiny.core.net.NetServerOptions used when creating the server.

      The server may not be listening until some time after the call to listen has returned.

      Unlike the bare Vert.x variant, this method returns a NetServer. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

      Returns:
      The operation result
      See Also:
      • NetServer.listen()
    • listenAndForget

      public NetServer listenAndForget()
      Start listening on the port and host as configured in the io.vertx.mutiny.core.net.NetServerOptions used when creating the server.

      The server may not be listening until some time after the call to listen has returned.

      Unlike the bare Vert.x variant, this method ignores the NetServer result or any failure.

      Returns:
      The current instance to chain operations if needed.
      See Also:
      • NetServer.listen()
    • listen

      @CheckReturnValue public io.smallrye.mutiny.Uni<NetServer> listen(int port, String host)
      Start listening on the specified port and host, ignoring port and host configured in the io.vertx.mutiny.core.net.NetServerOptions used when creating the server.

      Port 0 can be specified meaning "choose an random port".

      Host 0.0.0.0 can be specified meaning "listen on all available interfaces".

      The server may not be listening until some time after the call to listen has returned.

      Unlike the bare Vert.x variant, this method returns a Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • NetServer.listen(int, String)
    • listenAndAwait

      public NetServer listenAndAwait(int port, String host)
      Start listening on the specified port and host, ignoring port and host configured in the io.vertx.mutiny.core.net.NetServerOptions used when creating the server.

      Port 0 can be specified meaning "choose an random port".

      Host 0.0.0.0 can be specified meaning "listen on all available interfaces".

      The server may not be listening until some time after the call to listen has returned.

      Unlike the bare Vert.x variant, this method returns a NetServer. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

      Returns:
      The operation result
      See Also:
      • NetServer.listen(int, String)
    • listenAndForget

      public NetServer listenAndForget(int port, String host)
      Start listening on the specified port and host, ignoring port and host configured in the io.vertx.mutiny.core.net.NetServerOptions used when creating the server.

      Port 0 can be specified meaning "choose an random port".

      Host 0.0.0.0 can be specified meaning "listen on all available interfaces".

      The server may not be listening until some time after the call to listen has returned.

      Unlike the bare Vert.x variant, this method ignores the NetServer result or any failure.

      Returns:
      The current instance to chain operations if needed.
      See Also:
      • NetServer.listen(int, String)
    • listen

      @CheckReturnValue public io.smallrye.mutiny.Uni<NetServer> listen(int port)
      Start listening on the specified port and host "0.0.0.0", ignoring port and host configured in the io.vertx.mutiny.core.net.NetServerOptions used when creating the server.

      Port 0 can be specified meaning "choose an random port".

      The server may not be listening until some time after the call to listen has returned.

      Unlike the bare Vert.x variant, this method returns a Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • NetServer.listen(int)
    • listenAndAwait

      public NetServer listenAndAwait(int port)
      Start listening on the specified port and host "0.0.0.0", ignoring port and host configured in the io.vertx.mutiny.core.net.NetServerOptions used when creating the server.

      Port 0 can be specified meaning "choose an random port".

      The server may not be listening until some time after the call to listen has returned.

      Unlike the bare Vert.x variant, this method returns a NetServer. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

      Returns:
      The operation result
      See Also:
      • NetServer.listen(int)
    • listenAndForget

      public NetServer listenAndForget(int port)
      Start listening on the specified port and host "0.0.0.0", ignoring port and host configured in the io.vertx.mutiny.core.net.NetServerOptions used when creating the server.

      Port 0 can be specified meaning "choose an random port".

      The server may not be listening until some time after the call to listen has returned.

      Unlike the bare Vert.x variant, this method ignores the NetServer result or any failure.

      Returns:
      The current instance to chain operations if needed.
      See Also:
      • NetServer.listen(int)
    • listen

      @CheckReturnValue public io.smallrye.mutiny.Uni<NetServer> listen(io.vertx.core.net.SocketAddress localAddress)
      Start listening on the specified local address, ignoring port and host configured in the io.vertx.mutiny.core.net.NetServerOptions used when creating the server.

      The server may not be listening until some time after the call to listen has returned.

      Unlike the bare Vert.x variant, this method returns a Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Parameters:
      localAddress - the local address to listen on
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • NetServer.listen(SocketAddress)
    • listenAndAwait

      public NetServer listenAndAwait(io.vertx.core.net.SocketAddress localAddress)
      Start listening on the specified local address, ignoring port and host configured in the io.vertx.mutiny.core.net.NetServerOptions used when creating the server.

      The server may not be listening until some time after the call to listen has returned.

      Unlike the bare Vert.x variant, this method returns a NetServer. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

      Parameters:
      localAddress - the local address to listen on
      Returns:
      The operation result
      See Also:
      • NetServer.listen(SocketAddress)
    • listenAndForget

      public NetServer listenAndForget(io.vertx.core.net.SocketAddress localAddress)
      Start listening on the specified local address, ignoring port and host configured in the io.vertx.mutiny.core.net.NetServerOptions used when creating the server.

      The server may not be listening until some time after the call to listen has returned.

      Unlike the bare Vert.x variant, this method ignores the NetServer result or any failure.

      Parameters:
      localAddress - the local address to listen on
      Returns:
      The current instance to chain operations if needed.
      See Also:
      • NetServer.listen(SocketAddress)
    • close

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> close()
      Close the server. This will close any currently open connections. The close may not complete until after this method has returned.

      Unlike the bare Vert.x variant, this method returns a Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • NetServer.close()
    • closeAndAwait

      public void closeAndAwait()
      Close the server. This will close any currently open connections. The close may not complete until after this method has returned.

      Unlike the bare Vert.x variant, this method returns a Void. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

      See Also:
      • NetServer.close()
    • closeAndForget

      public NetServer closeAndForget()
      Close the server. This will close any currently open connections. The close may not complete until after this method has returned.

      Unlike the bare Vert.x variant, this method ignores the Void result or any failure.

      Returns:
      The current instance to chain operations if needed.
      See Also:
      • NetServer.close()
    • shutdown

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> shutdown()
      Shutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)).

      Unlike the bare Vert.x variant, this method returns a Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • NetServer.shutdown()
    • shutdownAndAwait

      public void shutdownAndAwait()
      Shutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)).

      Unlike the bare Vert.x variant, this method returns a Void. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

      See Also:
      • NetServer.shutdown()
    • shutdownAndForget

      public NetServer shutdownAndForget()
      Shutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)).

      Unlike the bare Vert.x variant, this method ignores the Void result or any failure.

      Returns:
      The current instance to chain operations if needed.
      See Also:
      • NetServer.shutdown()
    • shutdown

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> shutdown(long timeout, TimeUnit unit)
      Calls shutdown(Duration).

      Unlike the bare Vert.x variant, this method returns a Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • NetServer.shutdown(long, TimeUnit)
    • shutdownAndAwait

      public void shutdownAndAwait(long timeout, TimeUnit unit)
      Calls shutdown(Duration).

      Unlike the bare Vert.x variant, this method returns a Void. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

      See Also:
      • NetServer.shutdown(long, TimeUnit)
    • shutdownAndForget

      public NetServer shutdownAndForget(long timeout, TimeUnit unit)
      Calls shutdown(Duration).

      Unlike the bare Vert.x variant, this method ignores the Void result or any failure.

      Returns:
      The current instance to chain operations if needed.
      See Also:
      • NetServer.shutdown(long, TimeUnit)
    • shutdown

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> shutdown(Duration timeout)
      Initiate the server shutdown sequence.

      Connections are taken out of service and notified the close sequence has started through NetSocket#shutdownHandler(Handler). When all connections are closed the client is closed. When the timeout expires, all unclosed connections are immediately closed.

      Unlike the bare Vert.x variant, this method returns a Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Parameters:
      timeout - the amount of time after which all resources are forcibly closed
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • NetServer.shutdown(Duration)
    • shutdownAndAwait

      public void shutdownAndAwait(Duration timeout)
      Initiate the server shutdown sequence.

      Connections are taken out of service and notified the close sequence has started through NetSocket#shutdownHandler(Handler). When all connections are closed the client is closed. When the timeout expires, all unclosed connections are immediately closed.

      Unlike the bare Vert.x variant, this method returns a Void. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

      Parameters:
      timeout - the amount of time after which all resources are forcibly closed
      See Also:
      • NetServer.shutdown(Duration)
    • shutdownAndForget

      public NetServer shutdownAndForget(Duration timeout)
      Initiate the server shutdown sequence.

      Connections are taken out of service and notified the close sequence has started through NetSocket#shutdownHandler(Handler). When all connections are closed the client is closed. When the timeout expires, all unclosed connections are immediately closed.

      Unlike the bare Vert.x variant, this method ignores the Void result or any failure.

      Parameters:
      timeout - the amount of time after which all resources are forcibly closed
      Returns:
      The current instance to chain operations if needed.
      See Also:
      • NetServer.shutdown(Duration)
    • updateSSLOptions

      @CheckReturnValue public io.smallrye.mutiny.Uni<Boolean> updateSSLOptions(io.vertx.core.net.ServerSSLOptions options)

      Update the server with new SSL options, the update happens if the options object is valid and different from the existing options object.

      The boolean succeeded uni result indicates whether the update occurred.

      Unlike the bare Vert.x variant, this method returns a Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Parameters:
      options - the new SSL options
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • NetServer.updateSSLOptions(ServerSSLOptions)
    • updateSSLOptionsAndAwait

      public Boolean updateSSLOptionsAndAwait(io.vertx.core.net.ServerSSLOptions options)

      Update the server with new SSL options, the update happens if the options object is valid and different from the existing options object.

      The boolean succeeded underlying uni result indicates whether the update occurred.

      Unlike the bare Vert.x variant, this method returns a Boolean. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

      Parameters:
      options - the new SSL options
      Returns:
      The operation result
      See Also:
      • NetServer.updateSSLOptions(ServerSSLOptions)
    • updateSSLOptionsAndForget

      public NetServer updateSSLOptionsAndForget(io.vertx.core.net.ServerSSLOptions options)

      Update the server with new SSL options, the update happens if the options object is valid and different from the existing options object.

      The boolean succeeded underlying uni result indicates whether the update occurred.

      Unlike the bare Vert.x variant, this method ignores the Boolean result or any failure.

      Parameters:
      options - the new SSL options
      Returns:
      The current instance to chain operations if needed.
      See Also:
      • NetServer.updateSSLOptions(ServerSSLOptions)
    • updateSSLOptions

      @CheckReturnValue public io.smallrye.mutiny.Uni<Boolean> updateSSLOptions(io.vertx.core.net.ServerSSLOptions options, boolean force)

      Update the server with new SSL options, the update happens if the options object is valid and different from the existing options object.

      The options object is compared using its equals method against the existing options to prevent an update when the objects are equals since loading options can be costly, this can happen for share TCP servers. When object are equals, setting force to true forces the update.

      The boolean succeeded uni result indicates whether the update occurred.

      Unlike the bare Vert.x variant, this method returns a Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Parameters:
      options - the new SSL options
      force - force the update when options are equals
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • NetServer.updateSSLOptions(ServerSSLOptions, boolean)
    • updateSSLOptionsAndAwait

      public Boolean updateSSLOptionsAndAwait(io.vertx.core.net.ServerSSLOptions options, boolean force)

      Update the server with new SSL options, the update happens if the options object is valid and different from the existing options object.

      The options object is compared using its equals method against the existing options to prevent an update when the objects are equals since loading options can be costly, this can happen for share TCP servers. When object are equals, setting force to true forces the update.

      The boolean succeeded underlying uni result indicates whether the update occurred.

      Unlike the bare Vert.x variant, this method returns a Boolean. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

      Parameters:
      options - the new SSL options
      force - force the update when options are equals
      Returns:
      The operation result
      See Also:
      • NetServer.updateSSLOptions(ServerSSLOptions, boolean)
    • updateSSLOptionsAndForget

      public NetServer updateSSLOptionsAndForget(io.vertx.core.net.ServerSSLOptions options, boolean force)

      Update the server with new SSL options, the update happens if the options object is valid and different from the existing options object.

      The options object is compared using its equals method against the existing options to prevent an update when the objects are equals since loading options can be costly, this can happen for share TCP servers. When object are equals, setting force to true forces the update.

      The boolean succeeded underlying uni result indicates whether the update occurred.

      Unlike the bare Vert.x variant, this method ignores the Boolean result or any failure.

      Parameters:
      options - the new SSL options
      force - force the update when options are equals
      Returns:
      The current instance to chain operations if needed.
      See Also:
      • NetServer.updateSSLOptions(ServerSSLOptions, boolean)
    • updateTrafficShapingOptions

      @CheckReturnValue public io.smallrye.mutiny.Uni<Boolean> updateTrafficShapingOptions(io.vertx.core.net.TrafficShapingOptions options)

      Update the server with new traffic options, the update happens if the options object is valid and different from the existing options object.

      The options object is compared using its equals method against the existing options to prevent an update when the objects are equals since loading options can be costly, this can happen for share TCP servers. When object are equals, setting force to true forces the update.

      The boolean succeeded uni result indicates whether the update occurred.

      Unlike the bare Vert.x variant, this method returns a Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Parameters:
      options - the new traffic shaping options
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • NetServer.updateTrafficShapingOptions(TrafficShapingOptions)
    • updateTrafficShapingOptionsAndAwait

      public Boolean updateTrafficShapingOptionsAndAwait(io.vertx.core.net.TrafficShapingOptions options)

      Update the server with new traffic options, the update happens if the options object is valid and different from the existing options object.

      The options object is compared using its equals method against the existing options to prevent an update when the objects are equals since loading options can be costly, this can happen for share TCP servers. When object are equals, setting force to true forces the update.

      The boolean succeeded underlying uni result indicates whether the update occurred.

      Unlike the bare Vert.x variant, this method returns a Boolean. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

      Parameters:
      options - the new traffic shaping options
      Returns:
      The operation result
      See Also:
      • NetServer.updateTrafficShapingOptions(TrafficShapingOptions)
    • updateTrafficShapingOptionsAndForget

      public NetServer updateTrafficShapingOptionsAndForget(io.vertx.core.net.TrafficShapingOptions options)

      Update the server with new traffic options, the update happens if the options object is valid and different from the existing options object.

      The options object is compared using its equals method against the existing options to prevent an update when the objects are equals since loading options can be costly, this can happen for share TCP servers. When object are equals, setting force to true forces the update.

      The boolean succeeded underlying uni result indicates whether the update occurred.

      Unlike the bare Vert.x variant, this method ignores the Boolean result or any failure.

      Parameters:
      options - the new traffic shaping options
      Returns:
      The current instance to chain operations if needed.
      See Also:
      • NetServer.updateTrafficShapingOptions(TrafficShapingOptions)
    • connectHandler

      public NetServer connectHandler(Consumer<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.
      Returns:
      a reference to this, so the API can be used fluently
    • 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.
    • 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
    • newInstance

      public static NetServer newInstance(io.vertx.core.net.NetServer delegate)
      Creates a new instance of the NetServer.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object