Class NetServer
- All Implemented Interfaces:
MutinyDelegate,Measured
original non Mutiny-ified interface using Vert.x codegen.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintio.smallrye.mutiny.Uni<Void>close()Likeclose()but supplying a handler that will be notified when close is complete.Blocking variant ofclose().voidVariant ofclose()that ignores the result of the operation.connectHandler(Consumer<NetSocket> handler) Deprecated.booleanio.vertx.core.net.NetServerinthashCode()booleanio.smallrye.mutiny.Uni<NetServer>listen()Likelisten()but providing a handler that will be notified when the server is listening, or fails.io.smallrye.mutiny.Uni<NetServer>listen(int port) Likelisten()but providing a handler that will be notified when the server is listening, or fails.io.smallrye.mutiny.Uni<NetServer>Likelisten()but providing a handler that will be notified when the server is listening, or fails.io.smallrye.mutiny.Uni<NetServer>listen(SocketAddress localAddress) Likelisten()but providing a handler that will be notified when the server is listening, or fails.Blocking variant oflisten().listenAndAwait(int port) Blocking variant oflisten(int).listenAndAwait(int port, String host) Blocking variant oflisten(int,String).listenAndAwait(SocketAddress localAddress) Blocking variant oflisten(io.vertx.mutiny.core.net.SocketAddress).Variant oflisten()that ignores the result of the operation.listenAndForget(int port) Variant oflisten(int)that ignores the result of the operation.listenAndForget(int port, String host) Variant oflisten(int,String)that ignores the result of the operation.listenAndForget(SocketAddress localAddress) Variant oflisten(io.vertx.mutiny.core.net.SocketAddress)that ignores the result of the operation.static NetServernewInstance(io.vertx.core.net.NetServer arg) toString()io.smallrye.mutiny.Uni<Boolean>updateSSLOptions(io.vertx.core.net.SSLOptions options) LikeupdateSSLOptions(io.vertx.core.net.SSLOptions)but supplying a handler that will be called when the update happened (or has failed).io.smallrye.mutiny.Uni<Boolean>updateSSLOptions(io.vertx.core.net.SSLOptions options, boolean force) LikeupdateSSLOptions(io.vertx.core.net.SSLOptions)but supplying a handler that will be called when the update happened (or has failed).updateSSLOptionsAndAwait(io.vertx.core.net.SSLOptions options) Blocking variant ofupdateSSLOptions(SSLOptions).updateSSLOptionsAndAwait(io.vertx.core.net.SSLOptions options, boolean force) Blocking variant ofupdateSSLOptions(SSLOptions,boolean).voidupdateSSLOptionsAndForget(io.vertx.core.net.SSLOptions options) Variant ofupdateSSLOptions(SSLOptions)that ignores the result of the operation.voidupdateSSLOptionsAndForget(io.vertx.core.net.SSLOptions options, boolean force) Variant ofupdateSSLOptions(SSLOptions,boolean)that ignores the result of the operation.voidupdateTrafficShapingOptions(io.vertx.core.net.TrafficShapingOptions options)
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
NetServer
public NetServer(io.vertx.core.net.NetServer delegate) -
NetServer
-
-
Method Details
-
getDelegate
public io.vertx.core.net.NetServer getDelegate()- Specified by:
getDelegatein interfaceMeasured- Specified by:
getDelegatein interfaceMutinyDelegate- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
isMetricsEnabled
public boolean isMetricsEnabled()- Specified by:
isMetricsEnabledin interfaceMeasured- Returns:
trueif metrics are enabled
-
connectStream
Deprecated.instead use#connectHandler(Handler)- Returns:
- the connect stream
-
connectHandler
- Parameters:
handler-- Returns:
-
listen
Likelisten()but providing a handler that will be notified when the server is listening, or fails.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
listenAndAwait
Blocking variant oflisten().This method waits 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 NetServer instance produced by the operation.
-
listenAndForget
Variant oflisten()that ignores the result of the operation.This method subscribes on the result of
listen(), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromlisten()but you don't need to compose it with other operations.- Returns:
- the instance of NetServer to chain method calls.
-
listen
Likelisten()but providing a handler that will be notified when the server is listening, or fails.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
port- the port to listen onhost- the host to listen on- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
listenAndAwait
Blocking variant oflisten(int,String).This method waits 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:
port- the port to listen onhost- the host to listen on- Returns:
- the NetServer instance produced by the operation.
-
listenAndForget
Variant oflisten(int,String)that ignores the result of the operation.This method subscribes on the result of
listen(int,String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromlisten(int,String)but you don't need to compose it with other operations.- Parameters:
port- the port to listen onhost- the host to listen on- Returns:
- the instance of NetServer to chain method calls.
-
listen
Likelisten()but providing a handler that will be notified when the server is listening, or fails.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
port- the port to listen on- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
listenAndAwait
Blocking variant oflisten(int).This method waits 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:
port- the port to listen on- Returns:
- the NetServer instance produced by the operation.
-
listenAndForget
Variant oflisten(int)that ignores the result of the operation.This method subscribes on the result of
listen(int), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromlisten(int)but you don't need to compose it with other operations.- Parameters:
port- the port to listen on- Returns:
- the instance of NetServer to chain method calls.
-
listen
Likelisten()but providing a handler that will be notified when the server is listening, or fails.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
localAddress- the local address to listen on- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
listenAndAwait
Blocking variant oflisten(io.vertx.mutiny.core.net.SocketAddress).This method waits 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 NetServer instance produced by the operation.
-
listenAndForget
Variant oflisten(io.vertx.mutiny.core.net.SocketAddress)that ignores the result of the operation.This method subscribes on the result of
listen(io.vertx.mutiny.core.net.SocketAddress), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromlisten(io.vertx.mutiny.core.net.SocketAddress)but you don't need to compose it with other operations.- Parameters:
localAddress- the local address to listen on- Returns:
- the instance of NetServer to chain method calls.
-
close
Likeclose()but supplying a handler that will be notified when close is complete.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
closeAndAwait
Blocking variant ofclose().This method waits 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 Void instance produced by the operation.
-
closeAndForget
public void closeAndForget() -
actualPort
public int actualPort()- Returns:
- the actual port the server is listening on.
-
updateSSLOptions
@CheckReturnValue public io.smallrye.mutiny.Uni<Boolean> updateSSLOptions(io.vertx.core.net.SSLOptions options) LikeupdateSSLOptions(io.vertx.core.net.SSLOptions)but supplying a handler that will be called when the update happened (or has failed).Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
options- the new SSL options- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
updateSSLOptionsAndAwait
Blocking variant ofupdateSSLOptions(SSLOptions).This method waits 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 Boolean instance produced by the operation.
-
updateSSLOptionsAndForget
public void updateSSLOptionsAndForget(io.vertx.core.net.SSLOptions options) Variant ofupdateSSLOptions(SSLOptions)that ignores the result of the operation.This method subscribes on the result of
updateSSLOptions(SSLOptions), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromupdateSSLOptions(SSLOptions)but you don't need to compose it with other operations.- Parameters:
options- the new SSL options
-
updateSSLOptions
@CheckReturnValue public io.smallrye.mutiny.Uni<Boolean> updateSSLOptions(io.vertx.core.net.SSLOptions options, boolean force) LikeupdateSSLOptions(io.vertx.core.net.SSLOptions)but supplying a handler that will be called when the update happened (or has failed).Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
options- the new SSL optionsforce- force the update when options are equals- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
updateSSLOptionsAndAwait
Blocking variant ofupdateSSLOptions(SSLOptions,boolean).This method waits 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 optionsforce- force the update when options are equals- Returns:
- the Boolean instance produced by the operation.
-
updateSSLOptionsAndForget
public void updateSSLOptionsAndForget(io.vertx.core.net.SSLOptions options, boolean force) Variant ofupdateSSLOptions(SSLOptions,boolean)that ignores the result of the operation.This method subscribes on the result of
updateSSLOptions(SSLOptions,boolean), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromupdateSSLOptions(SSLOptions,boolean)but you don't need to compose it with other operations.- Parameters:
options- the new SSL optionsforce- force the update when options are equals
-
updateTrafficShapingOptions
public void updateTrafficShapingOptions(io.vertx.core.net.TrafficShapingOptions options) - Parameters:
options- the new traffic shaping options
-
newInstance
-
#connectHandler(Handler)