Class QuicEndpoint

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

public class QuicEndpoint extends Object implements Measured, MutinyDelegate
Represents a Quic endpoints, whose primary function is to bind a UDP socket on a given or random port.

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

Author:
Julien Viet
See Also:
  • QuicEndpoint
  • Field Details

  • Constructor Details

    • QuicEndpoint

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

      public QuicEndpoint(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.core.net.QuicEndpoint 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
    • bind

      @CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.core.net.SocketAddress> bind(io.vertx.core.net.SocketAddress address)
      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.

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

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

      public QuicEndpoint bindAndForget(io.vertx.core.net.SocketAddress address)
      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.

      Parameters:
      address - the bind address
      Returns:
      The current instance to chain operations if needed.
      See Also:
      • QuicEndpoint.bind(SocketAddress)
    • 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.

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

      See Also:
      • QuicEndpoint.close()
    • closeAndForget

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

      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:
      • QuicEndpoint.close()
    • 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.

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

      See Also:
      • QuicEndpoint.shutdown()
    • shutdownAndForget

      public QuicEndpoint 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.

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

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> shutdown(Duration timeout)
      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.

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

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

      public QuicEndpoint shutdownAndForget(Duration timeout)
      Initiate the endpoint shutdown sequence.

      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:
      • QuicEndpoint.shutdown(Duration)
    • 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 QuicEndpoint newInstance(io.vertx.core.net.QuicEndpoint delegate)
      Creates a new instance of the QuicEndpoint.
    • 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