Class QuicConnection
- All Implemented Interfaces:
MutinyDelegate
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 Mutiny-ified interface.
- Author:
- Julien Viet
- See Also:
-
QuicConnection
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionQuicConnection(io.vertx.core.net.QuicConnection delegate) Create a new instance ofQuicConnectiondelegating to the given (non-null) instance ofQuicConnection.QuicConnection(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionio.smallrye.mutiny.Uni<Void>close()Close the connection, all associated streams will be closed before.io.smallrye.mutiny.Uni<Void>close(io.vertx.core.net.QuicConnectionClose payload) Close the connection, all associated streams will be closed before.voidClose the connection, all associated streams will be closed before.voidcloseAndAwait(io.vertx.core.net.QuicConnectionClose payload) Close the connection, all associated streams will be closed before.Close the connection, all associated streams will be closed before.closeAndForget(io.vertx.core.net.QuicConnectionClose payload) Close the connection, all associated streams will be closed before.closeHandler(Runnable handler) Set a handler called when the connection is closed.io.vertx.core.net.QuicConnectionClosedatagramHandler(Consumer<io.vertx.core.buffer.Buffer> handler) Set a handler called with the datagram addressed to this connection.booleanio.vertx.core.net.QuicConnectionGet the delegate instance.inthashCode()io.vertx.core.net.SocketAddressintstatic QuicConnectionnewInstance(io.vertx.core.net.QuicConnection delegate) Creates a new instance of theQuicConnection.io.smallrye.mutiny.Uni<QuicStream>Open a bidirectional stream to the remote endpoint.io.smallrye.mutiny.Uni<QuicStream>openStream(boolean bidirectional) Open a stream to the remote endpoint withbidirectional parameterspecifying its directionality.Open a bidirectional stream to the remote endpoint.openStreamAndAwait(boolean bidirectional) Open a stream to the remote endpoint withbidirectional parameterspecifying its directionality.Open a bidirectional stream to the remote endpoint.openStreamAndForget(boolean bidirectional) Open a stream to the remote endpoint withbidirectional parameterspecifying its directionality.io.vertx.core.net.SocketAddressio.smallrye.mutiny.Uni<Void>shutdown()Shutdown with a 30 seconds timeout.io.smallrye.mutiny.Uni<Void>Initiate a graceful connection shutdown, the connection is taken out of service and closed when all the inflight streams are processed, otherwise after atimeoutthe connection will be closed.io.smallrye.mutiny.Uni<Void>Initiate a graceful connection shutdown, the connection is taken out of service and closed when all the inflight streams are processed, otherwise after atimeoutthe connection will be closed.voidShutdown with a 30 seconds timeout.voidshutdownAndAwait(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 atimeoutthe connection will be closed.voidshutdownAndAwait(Duration timeout, io.vertx.core.net.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 atimeoutthe connection will be closed.Shutdown with a 30 seconds timeout.shutdownAndForget(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 atimeoutthe connection will be closed.shutdownAndForget(Duration timeout, io.vertx.core.net.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 atimeoutthe connection will be closed.shutdownHandler(Consumer<Duration> handler) Set ahandlernotified when the connection is shutdown: the client or server will close the connection within a certain amount of time.streamHandler(Consumer<QuicStream> handler) Set a handler processing incoming Quic streams.toString()io.vertx.core.net.QuicTransportParamsio.smallrye.mutiny.Uni<Void>writeDatagram(io.vertx.core.buffer.Buffer buffer) Send a datagram.voidwriteDatagramAndAwait(io.vertx.core.buffer.Buffer buffer) Send a datagram.writeDatagramAndForget(io.vertx.core.buffer.Buffer buffer) Send a datagram.
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
QuicConnection
public QuicConnection(io.vertx.core.net.QuicConnection delegate) Create a new instance ofQuicConnectiondelegating to the given (non-null) instance ofQuicConnection. -
QuicConnection
-
-
Method Details
-
getDelegate
public io.vertx.core.net.QuicConnection 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:
getDelegatein interfaceMutinyDelegate- Returns:
- the delegate instance
-
openStream
Open a bidirectional stream to the remote endpoint.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
Unirepresenting the asynchronous result of this operation. - See Also:
-
QuicConnection.openStream()
-
openStreamAndAwait
Open a bidirectional stream to the remote endpoint.Unlike the bare Vert.x variant, this method returns a
QuicStream. 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 aRuntimeException).- Returns:
- The operation result
- See Also:
-
QuicConnection.openStream()
-
openStreamAndForget
Open a bidirectional stream to the remote endpoint.Unlike the bare Vert.x variant, this method ignores the
QuicStreamresult or any failure.- Returns:
- The current instance to chain operations if needed.
- See Also:
-
QuicConnection.openStream()
-
openStream
Open a stream to the remote endpoint withbidirectional parameterspecifying its directionality.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:
bidirectional- whether the stream is unidirectional or bidirectional- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
QuicConnection.openStream(boolean)
-
openStreamAndAwait
Open a stream to the remote endpoint withbidirectional parameterspecifying its directionality.Unlike the bare Vert.x variant, this method returns a
QuicStream. 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 aRuntimeException).- Parameters:
bidirectional- whether the stream is unidirectional or bidirectional- Returns:
- The operation result
- See Also:
-
QuicConnection.openStream(boolean)
-
openStreamAndForget
Open a stream to the remote endpoint withbidirectional parameterspecifying its directionality.Unlike the bare Vert.x variant, this method ignores the
QuicStreamresult or any failure.- Parameters:
bidirectional- whether the stream is unidirectional or bidirectional- Returns:
- The current instance to chain operations if needed.
- See Also:
-
QuicConnection.openStream(boolean)
-
writeDatagram
@CheckReturnValue public io.smallrye.mutiny.Uni<Void> writeDatagram(io.vertx.core.buffer.Buffer buffer) Send a datagram.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:
buffer- the datagram- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
QuicConnection.writeDatagram(Buffer)
-
writeDatagramAndAwait
public void writeDatagramAndAwait(io.vertx.core.buffer.Buffer buffer) Send a datagram.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 aRuntimeException).- Parameters:
buffer- the datagram- See Also:
-
QuicConnection.writeDatagram(Buffer)
-
writeDatagramAndForget
Send a datagram.Unlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Parameters:
buffer- the datagram- Returns:
- The current instance to chain operations if needed.
- See Also:
-
QuicConnection.writeDatagram(Buffer)
-
close
Close the connection, all associated streams will be closed before.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
Unirepresenting the asynchronous result of this operation. - See Also:
-
QuicConnection.close()
-
closeAndAwait
public void closeAndAwait()Close the connection, all associated streams will be closed before.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 aRuntimeException).- See Also:
-
QuicConnection.close()
-
closeAndForget
Close the connection, all associated streams will be closed before.Unlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Returns:
- The current instance to chain operations if needed.
- See Also:
-
QuicConnection.close()
-
close
@CheckReturnValue public io.smallrye.mutiny.Uni<Void> close(io.vertx.core.net.QuicConnectionClose payload) Close the connection, all associated streams will be closed before.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:
payload- the close payload- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
QuicConnection.close(QuicConnectionClose)
-
closeAndAwait
public void closeAndAwait(io.vertx.core.net.QuicConnectionClose payload) Close the connection, all associated streams will be closed before.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 aRuntimeException).- Parameters:
payload- the close payload- See Also:
-
QuicConnection.close(QuicConnectionClose)
-
closeAndForget
Close the connection, all associated streams will be closed before.Unlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Parameters:
payload- the close payload- Returns:
- The current instance to chain operations if needed.
- See Also:
-
QuicConnection.close(QuicConnectionClose)
-
shutdown
Shutdown with a 30 seconds timeout.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
Unirepresenting the asynchronous result of this operation. - See Also:
-
QuicConnection.shutdown()
-
shutdownAndAwait
public void shutdownAndAwait()Shutdown with a 30 seconds timeout.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 aRuntimeException).- See Also:
-
QuicConnection.shutdown()
-
shutdownAndForget
Shutdown with a 30 seconds timeout.Unlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Returns:
- The current instance to chain operations if needed.
- See Also:
-
QuicConnection.shutdown()
-
shutdown
Initiate a graceful connection shutdown, the connection is taken out of service and closed when all the inflight streams are processed, otherwise after atimeoutthe connection will be 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
Unirepresenting the asynchronous result of this operation. - See Also:
-
QuicConnection.shutdown(Duration)
-
shutdownAndAwait
Initiate a graceful connection shutdown, the connection is taken out of service and closed when all the inflight streams are processed, otherwise after atimeoutthe connection will be 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 aRuntimeException).- Parameters:
timeout- the amount of time after which all resources are forcibly closed- See Also:
-
QuicConnection.shutdown(Duration)
-
shutdownAndForget
Initiate a graceful connection shutdown, the connection is taken out of service and closed when all the inflight streams are processed, otherwise after atimeoutthe connection will be closed.Unlike the bare Vert.x variant, this method ignores the
Voidresult 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:
-
QuicConnection.shutdown(Duration)
-
shutdown
@CheckReturnValue public io.smallrye.mutiny.Uni<Void> shutdown(Duration timeout, io.vertx.core.net.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 atimeoutthe connection will be 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 closedpayload- the close payload- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
QuicConnection.shutdown(Duration, QuicConnectionClose)
-
shutdownAndAwait
Initiate a graceful connection shutdown, the connection is taken out of service and closed when all the inflight streams are processed, otherwise after atimeoutthe connection will be 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 aRuntimeException).- Parameters:
timeout- the amount of time after which all resources are forcibly closedpayload- the close payload- See Also:
-
QuicConnection.shutdown(Duration, QuicConnectionClose)
-
shutdownAndForget
public QuicConnection shutdownAndForget(Duration timeout, io.vertx.core.net.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 atimeoutthe connection will be closed.Unlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Parameters:
timeout- the amount of time after which all resources are forcibly closedpayload- the close payload- Returns:
- The current instance to chain operations if needed.
- See Also:
-
QuicConnection.shutdown(Duration, QuicConnectionClose)
-
streamHandler
Set a handler processing incoming Quic streams.- Parameters:
handler- the handler processing streams- Returns:
- this instance of a connection
-
shutdownHandler
Set ahandlernotified when the connection is shutdown: the client or server will close the connection within a certain amount of time. This gives the opportunity to thehandlerto 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
-
closeHandler
Set a handler called when the connection is closed.- Parameters:
handler- the handler signaled with the connection close- Returns:
- this instance of a connection
-
datagramHandler
Set a handler called with the datagram addressed to this connection.- Parameters:
handler- the handler- Returns:
- this instance of a connection
-
applicationLayerProtocol
- Returns:
- the application-level protocol negotiated during the TLS handshake
-
indicatedServerName
- Returns:
- the server name indicated during the TLS handshake
-
transportParams
public io.vertx.core.net.QuicTransportParams transportParams()- Returns:
- the transport parameters
-
maxDatagramLength
public int maxDatagramLength()- Returns:
- the maximum number of bytes the datagram payload can be or
0when the datagram extension is disabled
-
sslSession
- Returns:
- SSLSession associated with the underlying socket. Returns null if connection is not SSL.
- See Also:
-
closePayload
public io.vertx.core.net.QuicConnectionClose closePayload()- Returns:
- the close payload, available after the close handler is signaled
-
remoteAddress
public io.vertx.core.net.SocketAddress remoteAddress()- Returns:
- the remote connection socket address
-
localAddress
public io.vertx.core.net.SocketAddress localAddress()- Returns:
- the local connection socket address
-
newInstance
Creates a new instance of theQuicConnection. -
hashCode
public int hashCode() -
equals
-
toString
-