Class QuicServer

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

public class QuicServer extends QuicEndpoint implements MutinyDelegate
A Quic server.

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

Author:
Julien Viet
See Also:
  • QuicServer
  • 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<QuicServer>
     
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    io.smallrye.mutiny.Uni<io.vertx.core.net.SocketAddress>
    bind(io.vertx.core.net.SocketAddress arg0)
    Binds a UDP socket at the given address.
    io.vertx.core.net.SocketAddress
    bindAndAwait(io.vertx.core.net.SocketAddress arg0)
    Binds a UDP socket at the given address.
    bindAndForget(io.vertx.core.net.SocketAddress arg0)
    Binds a UDP socket at the given address.
    io.smallrye.mutiny.Uni<Void>
    Close the endpoint and release all associated resources.
    void
    Close the endpoint and release all associated resources.
    Close the endpoint and release all associated resources.
    Set the handler processing QuicConnection, the handler must be set before the server is bound.
    boolean
     
    Set an exception handler called for socket errors happening before the QUIC connection is established, e.g. during the TLS handshake.
    io.vertx.core.net.QuicServer
    Get the delegate instance.
    int
     
    boolean
    Whether the metrics are enabled for this measured object
    io.smallrye.mutiny.Uni<io.vertx.core.net.SocketAddress>
    Start listening on the port and host as configured in the io.vertx.mutiny.core.net.QuicServerConfig used when creating the server.
    io.smallrye.mutiny.Uni<io.vertx.core.net.SocketAddress>
    listen(int port)
    Start listening on the specified port and host "0.0.0.0".
    io.smallrye.mutiny.Uni<io.vertx.core.net.SocketAddress>
    listen(int port, String host)
    Start listening on the specified port and host.
    io.smallrye.mutiny.Uni<io.vertx.core.net.SocketAddress>
    listen(io.vertx.core.net.SocketAddress localAddress)
    Start listening on the specified local address.
    io.vertx.core.net.SocketAddress
    Start listening on the port and host as configured in the io.vertx.mutiny.core.net.QuicServerConfig used when creating the server.
    io.vertx.core.net.SocketAddress
    listenAndAwait(int port)
    Start listening on the specified port and host "0.0.0.0".
    io.vertx.core.net.SocketAddress
    listenAndAwait(int port, String host)
    Start listening on the specified port and host.
    io.vertx.core.net.SocketAddress
    listenAndAwait(io.vertx.core.net.SocketAddress localAddress)
    Start listening on the specified local address.
    Start listening on the port and host as configured in the io.vertx.mutiny.core.net.QuicServerConfig used when creating the server.
    listenAndForget(int port)
    Start listening on the specified port and host "0.0.0.0".
    listenAndForget(int port, String host)
    Start listening on the specified port and host.
    listenAndForget(io.vertx.core.net.SocketAddress localAddress)
    Start listening on the specified local address.
    static QuicServer
    newInstance(io.vertx.core.net.QuicServer delegate)
    Creates a new instance of the QuicServer.
    io.smallrye.mutiny.Uni<Void>
    Shutdown the endpoint with a 30 seconds grace period (shutdown(30, TimeUnit.SECONDS)).
    io.smallrye.mutiny.Uni<Void>
    Initiate the endpoint shutdown sequence.
    void
    Shutdown the endpoint with a 30 seconds grace period (shutdown(30, TimeUnit.SECONDS)).
    void
    Initiate the endpoint shutdown sequence.
    Shutdown the endpoint with a 30 seconds grace period (shutdown(30, TimeUnit.SECONDS)).
    Initiate the endpoint shutdown sequence.
    Set a handler processing incoming Quic streams, this is a short-cut of server.connectHandler(connection -> connection.streamHandler(stream)).
     
    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.

    Methods inherited from class io.vertx.mutiny.core.net.QuicEndpoint

    newInstance

    Methods inherited from class java.lang.Object

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

  • Constructor Details

    • QuicServer

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

      public QuicServer(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.core.net.QuicServer 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
      Overrides:
      getDelegate in class QuicEndpoint
      Returns:
      the delegate instance
    • listen

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

      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:
      • QuicServer.listen()
    • listenAndAwait

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

      Unlike the bare Vert.x variant, this method returns a SocketAddress. 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:
      • QuicServer.listen()
    • listenAndForget

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

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

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

      @CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.core.net.SocketAddress> listen(int port, String host)
      Start listening on the specified port and host.

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

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

      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:
      • QuicServer.listen(int, String)
    • listenAndAwait

      public io.vertx.core.net.SocketAddress listenAndAwait(int port, String host)
      Start listening on the specified port and host.

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

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

      Unlike the bare Vert.x variant, this method returns a SocketAddress. 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:
      • QuicServer.listen(int, String)
    • listenAndForget

      public QuicServer listenAndForget(int port, String host)
      Start listening on the specified port and host.

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

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

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

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

      @CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.core.net.SocketAddress> listen(int port)
      Start listening on the specified port and host "0.0.0.0".

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

      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:
      • QuicServer.listen(int)
    • listenAndAwait

      public io.vertx.core.net.SocketAddress listenAndAwait(int port)
      Start listening on the specified port and host "0.0.0.0".

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

      Unlike the bare Vert.x variant, this method returns a SocketAddress. 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:
      • QuicServer.listen(int)
    • listenAndForget

      public QuicServer listenAndForget(int port)
      Start listening on the specified port and host "0.0.0.0".

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

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

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

      @CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.core.net.SocketAddress> listen(io.vertx.core.net.SocketAddress localAddress)
      Start listening on the specified local address.

      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:
      • QuicServer.listen(SocketAddress)
    • listenAndAwait

      public io.vertx.core.net.SocketAddress listenAndAwait(io.vertx.core.net.SocketAddress localAddress)
      Start listening on the specified local address.

      Unlike the bare Vert.x variant, this method returns a SocketAddress. 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:
      • QuicServer.listen(SocketAddress)
    • listenAndForget

      public QuicServer listenAndForget(io.vertx.core.net.SocketAddress localAddress)
      Start listening on the specified local address.

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

      Parameters:
      localAddress - the local address to listen on
      Returns:
      The current instance to chain operations if needed.
      See Also:
      • QuicServer.listen(SocketAddress)
    • 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:
      • QuicServer.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:
      • QuicServer.updateSSLOptions(ServerSSLOptions)
    • updateSSLOptionsAndForget

      public QuicServer 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:
      • QuicServer.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:
      • QuicServer.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:
      • QuicServer.updateSSLOptions(ServerSSLOptions, boolean)
    • updateSSLOptionsAndForget

      public QuicServer 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:
      • QuicServer.updateSSLOptions(ServerSSLOptions, boolean)
    • close

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> close()
      Close the endpoint and release all associated resources.

      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.

      Overrides:
      close in class QuicEndpoint
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • QuicEndpoint.close()
    • closeAndAwait

      public void closeAndAwait()
      Close the endpoint and release all associated resources.

      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).

      Overrides:
      closeAndAwait in class QuicEndpoint
      See Also:
      • QuicEndpoint.close()
    • closeAndForget

      public QuicServer closeAndForget()
      Close the endpoint and release all associated resources.

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

      Overrides:
      closeAndForget in class QuicEndpoint
      Returns:
      The current instance to chain operations if needed.
      See Also:
      • QuicEndpoint.close()
    • shutdown

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

      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.

      Overrides:
      shutdown in class QuicEndpoint
      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:
      • QuicEndpoint.shutdown(Duration)
    • shutdownAndAwait

      public void shutdownAndAwait(Duration arg0)
      Initiate the endpoint shutdown sequence.

      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).

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

      public QuicServer shutdownAndForget(Duration arg0)
      Initiate the endpoint shutdown sequence.

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

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

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> shutdown()
      Shutdown the endpoint with a 30 seconds grace period (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.

      Overrides:
      shutdown in class QuicEndpoint
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • QuicEndpoint.shutdown()
    • shutdownAndAwait

      public void shutdownAndAwait()
      Shutdown the endpoint with a 30 seconds grace period (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).

      Overrides:
      shutdownAndAwait in class QuicEndpoint
      See Also:
      • QuicEndpoint.shutdown()
    • shutdownAndForget

      public QuicServer shutdownAndForget()
      Shutdown the endpoint with a 30 seconds grace period (shutdown(30, TimeUnit.SECONDS)).

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

      Overrides:
      shutdownAndForget in class QuicEndpoint
      Returns:
      The current instance to chain operations if needed.
      See Also:
      • QuicEndpoint.shutdown()
    • bind

      @CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.core.net.SocketAddress> bind(io.vertx.core.net.SocketAddress arg0)
      Binds a UDP socket at the given address.

      >When the endpoint is successfully bound, a</p

      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.

      Overrides:
      bind in class QuicEndpoint
      Parameters:
      address - the bind address
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • QuicEndpoint.bind(SocketAddress)
    • bindAndAwait

      public io.vertx.core.net.SocketAddress bindAndAwait(io.vertx.core.net.SocketAddress arg0)
      Binds a UDP socket at the given address.

      >When the endpoint is successfully bound, a</p

      Unlike the bare Vert.x variant, this method returns a SocketAddress. 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).

      Overrides:
      bindAndAwait in class QuicEndpoint
      Parameters:
      address - the bind address
      Returns:
      The operation result
      See Also:
      • QuicEndpoint.bind(SocketAddress)
    • bindAndForget

      public QuicServer bindAndForget(io.vertx.core.net.SocketAddress arg0)
      Binds a UDP socket at the given address.

      >When the endpoint is successfully bound, a</p

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

      Overrides:
      bindAndForget in class QuicEndpoint
      Parameters:
      address - the bind address
      Returns:
      The current instance to chain operations if needed.
      See Also:
      • QuicEndpoint.bind(SocketAddress)
    • connectHandler

      public QuicServer connectHandler(Consumer<QuicConnection> handler)
      Set the handler processing QuicConnection, the handler must be set before the server is bound.
      Parameters:
      handler - the connection handler
      Returns:
      this object instance
    • streamHandler

      public QuicServer streamHandler(Consumer<QuicStream> handler)
      Set a handler processing incoming Quic streams, this is a short-cut of server.connectHandler(connection -> connection.streamHandler(stream)).
      Parameters:
      handler - the handler processing streams
      Returns:
      this object instance
    • exceptionHandler

      public QuicServer exceptionHandler(Consumer<Throwable> handler)
      Set an exception handler called for socket errors happening before the QUIC connection is established, e.g. during the TLS handshake.
      Parameters:
      handler - the handler to set
      Returns:
      a reference to this, so the API can be used fluently
    • isMetricsEnabled

      public boolean isMetricsEnabled()
      Whether the metrics are enabled for this measured object
      Specified by:
      isMetricsEnabled in interface Measured
      Overrides:
      isMetricsEnabled in class QuicEndpoint
      Returns:
      true if metrics are enabled
    • newInstance

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

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

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

      public String toString()
      Overrides:
      toString in class QuicEndpoint