Class QuicConnection

java.lang.Object
io.vertx.rxjava3.core.net.QuicConnection
All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate

public class QuicConnection extends Object implements io.vertx.lang.rx.RxDelegate

A Quic connection between a client and a server, providing support for handling or creating Quic streams

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

  • Field Details

    • __TYPE_ARG

      public static final io.vertx.lang.rx.TypeArg<QuicConnection> __TYPE_ARG
  • Constructor Details

    • QuicConnection

      public QuicConnection(QuicConnection delegate)
    • QuicConnection

      public QuicConnection(Object delegate)
  • Method Details

    • 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 QuicConnection getDelegate()
      Specified by:
      getDelegate in interface io.vertx.lang.rx.RxDelegate
    • streamHandler

      public QuicConnection streamHandler(Handler<QuicStream> handler)
      Set a handler processing incoming Quic streams.
      Parameters:
      handler - the handler processing streams
      Returns:
      this instance of a connection
    • closeHandler

      public QuicConnection closeHandler(Handler<Void> handler)
      Set a handler called when the connection is closed.
      Parameters:
      handler - the handler signaled with the connection close
      Returns:
      this instance of a connection
    • openStream

      public Single<QuicStream> openStream()
      Open a bidirectional stream to the remote endpoint.
      Returns:
      a Quic stream as a future
    • rxOpenStream

      public Single<QuicStream> rxOpenStream()
      Open a bidirectional stream to the remote endpoint.
      Returns:
      a Quic stream as a future
    • openStream

      public Single<QuicStream> openStream(boolean bidirectional)
      Open a stream to the remote endpoint with bidirectional parameter specifying its directionality.
      Parameters:
      bidirectional - whether the stream is unidirectional or bidirectional
      Returns:
      A Quic stream as a future
    • rxOpenStream

      public Single<QuicStream> rxOpenStream(boolean bidirectional)
      Open a stream to the remote endpoint with bidirectional parameter specifying its directionality.
      Parameters:
      bidirectional - whether the stream is unidirectional or bidirectional
      Returns:
      A Quic stream as a future
    • datagramHandler

      public QuicConnection datagramHandler(Handler<Buffer> handler)
      Set a handler called with the datagram addressed to this connection.
      Parameters:
      handler - the handler
      Returns:
      this instance of a connection
    • writeDatagram

      public Completable writeDatagram(Buffer buffer)
      Send a datagram.
      Parameters:
      buffer - the datagram
      Returns:
      a future signaling when the datagram has been written
    • rxWriteDatagram

      public Completable rxWriteDatagram(Buffer buffer)
      Send a datagram.
      Parameters:
      buffer - the datagram
      Returns:
      a future signaling when the datagram has been written
    • close

      public Completable close()
      Close the connection, all associated streams will be closed before.
      Returns:
      a future signaling the completion of the operation
    • rxClose

      public Completable rxClose()
      Close the connection, all associated streams will be closed before.
      Returns:
      a future signaling the completion of the operation
    • close

      public Completable close(QuicConnectionClose payload)
      Close the connection, all associated streams will be closed before.
      Parameters:
      payload - the close payload
      Returns:
      a future signaling the completion of the operation
    • rxClose

      public Completable rxClose(QuicConnectionClose payload)
      Close the connection, all associated streams will be closed before.
      Parameters:
      payload - the close payload
      Returns:
      a future signaling the completion of the operation
    • shutdown

      public Completable shutdown()
      Shutdown with a 30 seconds timeout.
      Returns:
      a future completed when shutdown has completed
    • rxShutdown

      public Completable rxShutdown()
      Shutdown with a 30 seconds timeout.
      Returns:
      a future completed when shutdown has completed
    • applicationLayerProtocol

      public String applicationLayerProtocol()
      Returns:
      the application-level protocol negotiated during the TLS handshake
    • indicatedServerName

      public String indicatedServerName()
      Returns:
      the server name indicated during the TLS handshake
    • transportParams

      public QuicTransportParams transportParams()
      Returns:
      the transport parameters
    • maxDatagramLength

      public int maxDatagramLength()
      Returns:
      the maximum number of bytes the datagram payload can be or 0 when the datagram extension is disabled
    • closePayload

      public QuicConnectionClose closePayload()
      Returns:
      the close payload, available after the close handler is signaled
    • remoteAddress

      public SocketAddress remoteAddress()
      Returns:
      the remote connection socket address
    • localAddress

      public SocketAddress localAddress()
      Returns:
      the local connection socket address
    • shutdownHandler

      public QuicConnection shutdownHandler(Handler<Duration> handler)
      Set a handler notified when the connection is shutdown: the client or server will close the connection within a certain amount of time. This gives the opportunity to the handler to close the connection gracefully before the socket is closed.
      Parameters:
      handler - the handler notified
      Returns:
      a reference to this, so the API can be used fluently
    • shutdown

      public Completable shutdown(Duration timeout)
      Initiate a graceful connection shutdown, the connection is taken out of service and closed when all the inflight streams are processed, otherwise after a timeout the connection will be closed.
      Parameters:
      timeout - the amount of time after which all resources are forcibly closed
      Returns:
      a future completed when shutdown has completed
    • rxShutdown

      public Completable rxShutdown(Duration timeout)
      Initiate a graceful connection shutdown, the connection is taken out of service and closed when all the inflight streams are processed, otherwise after a timeout the connection will be closed.
      Parameters:
      timeout - the amount of time after which all resources are forcibly closed
      Returns:
      a future completed when shutdown has completed
    • shutdown

      public Completable shutdown(Duration timeout, QuicConnectionClose payload)
      Initiate a graceful connection shutdown, the connection is taken out of service and closed when all the inflight streams are processed, otherwise after a timeout the connection will be closed.
      Parameters:
      timeout - the amount of time after which all resources are forcibly closed
      payload - the close payload
      Returns:
      a future completed when shutdown has completed
    • rxShutdown

      public Completable rxShutdown(Duration timeout, QuicConnectionClose payload)
      Initiate a graceful connection shutdown, the connection is taken out of service and closed when all the inflight streams are processed, otherwise after a timeout the connection will be closed.
      Parameters:
      timeout - the amount of time after which all resources are forcibly closed
      payload - the close payload
      Returns:
      a future completed when shutdown has completed
    • sslSession

      public SSLSession sslSession()
      Returns:
      SSLSession associated with the underlying socket. Returns null if connection is not SSL.
    • newInstance

      public static QuicConnection newInstance(QuicConnection arg)