Class Vertx

java.lang.Object
io.vertx.mutiny.core.Vertx
All Implemented Interfaces:
MutinyDelegate, Measured

public class Vertx extends Object implements MutinyDelegate, Measured
The entry point into the Vert.x Core API.

You use an instance of this class for functionality including:

  • Creating TCP clients and servers
  • Creating HTTP clients and servers
  • Creating DNS clients
  • Creating Datagram sockets
  • Setting and cancelling periodic and one-shot timers
  • Getting a reference to the event bus API
  • Getting a reference to the file system API
  • Getting a reference to the shared data API
  • Deploying and undeploying verticles

Most functionality in Vert.x core is fairly low level.

To create an instance of this class you can use the static factory methods: vertx(), vertx() and clusteredVertx(io.vertx.core.VertxOptions).

Please see the user manual for more detailed usage information.

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

  • Field Details

    • __TYPE_ARG

      public static final TypeArg<Vertx> __TYPE_ARG
  • Constructor Details

    • Vertx

      public Vertx(io.vertx.core.Vertx delegate)
    • Vertx

      public Vertx(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.core.Vertx getDelegate()
      Specified by:
      getDelegate in interface Measured
      Specified by:
      getDelegate in interface MutinyDelegate
      Returns:
      the delegate used by this Mutiny object of generated type
    • 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
    • isMetricsEnabled

      public boolean isMetricsEnabled()
      Specified by:
      isMetricsEnabled in interface Measured
      Returns:
      true if metrics are enabled
    • builder

      public static VertxBuilder builder()
    • vertx

      public static Vertx vertx()
      Returns:
      the instance
    • vertx

      public static Vertx vertx(io.vertx.core.VertxOptions options)
      Parameters:
      options - the options to use
      Returns:
      the instance
    • clusteredVertx

      @CheckReturnValue public static io.smallrye.mutiny.Uni<Vertx> clusteredVertx(io.vertx.core.VertxOptions options)
      Creates a clustered instance using the specified options.

      The instance is created asynchronously and the resultHandler is called with the result when it is ready.

      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 options to use
      Returns:
      the uni firing the result of the operation when completed, or a failure if the operation failed.
    • clusteredVertxAndAwait

      public static Vertx clusteredVertxAndAwait(io.vertx.core.VertxOptions options)
      Blocking variant of clusteredVertx(VertxOptions).

      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 options to use
      Returns:
      the Vertx instance produced by the operation.
    • clusteredVertxAndForget

      public static void clusteredVertxAndForget(io.vertx.core.VertxOptions options)
      Variant of clusteredVertx(VertxOptions) that ignores the result of the operation.

      This method subscribes on the result of clusteredVertx(VertxOptions), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from clusteredVertx(VertxOptions) but you don't need to compose it with other operations.

      Parameters:
      options - the options to use
    • currentContext

      public static Context currentContext()
      Returns:
      The current context or null if there is no current context
    • getOrCreateContext

      public Context getOrCreateContext()
      Returns:
      The current context (created if didn't exist)
    • createNetServer

      public NetServer createNetServer(io.vertx.core.net.NetServerOptions options)
      Parameters:
      options - the options to use
      Returns:
      the server
    • createNetServer

      public NetServer createNetServer()
      Returns:
      the server
    • createNetClient

      public NetClient createNetClient(io.vertx.core.net.NetClientOptions options)
      Parameters:
      options - the options to use
      Returns:
      the client
    • createNetClient

      public NetClient createNetClient()
      Returns:
      the client
    • createHttpServer

      public HttpServer createHttpServer(io.vertx.core.http.HttpServerOptions options)
      Parameters:
      options - the options to use
      Returns:
      the server
    • createHttpServer

      public HttpServer createHttpServer()
      Returns:
      the server
    • createWebSocketClient

      public WebSocketClient createWebSocketClient()
      Returns:
      the client
    • createWebSocketClient

      public WebSocketClient createWebSocketClient(io.vertx.core.http.WebSocketClientOptions options)
      Parameters:
      options - the options to use
      Returns:
      the client
    • httpClientBuilder

      public HttpClientBuilder httpClientBuilder()
      Returns:
    • createHttpClient

      public HttpClient createHttpClient(io.vertx.core.http.HttpClientOptions clientOptions, io.vertx.core.http.PoolOptions poolOptions)
      Parameters:
      clientOptions - the client options to use
      poolOptions - the pool options to use
      Returns:
      the client
    • createHttpClient

      public HttpClient createHttpClient(io.vertx.core.http.HttpClientOptions clientOptions)
      Parameters:
      clientOptions - the options to use
      Returns:
      the client
    • createHttpClient

      public HttpClient createHttpClient(io.vertx.core.http.PoolOptions poolOptions)
      Parameters:
      poolOptions - the pool options to use
      Returns:
      the client
    • createHttpClient

      public HttpClient createHttpClient()
      Returns:
      the client
    • createDatagramSocket

      public DatagramSocket createDatagramSocket(io.vertx.core.datagram.DatagramSocketOptions options)
      Parameters:
      options - the options to use
      Returns:
      the socket
    • createDatagramSocket

      public DatagramSocket createDatagramSocket()
      Returns:
      the socket
    • fileSystem

      public FileSystem fileSystem()
      Returns:
      the filesystem object
    • eventBus

      public EventBus eventBus()
      Returns:
      the event bus object
    • createDnsClient

      public DnsClient createDnsClient(int port, String host)
      Parameters:
      port - the port
      host - the host
      Returns:
      the DNS client
    • createDnsClient

      public DnsClient createDnsClient()
      Returns:
      the DNS client
    • createDnsClient

      public DnsClient createDnsClient(io.vertx.core.dns.DnsClientOptions options)
      Parameters:
      options - the client options
      Returns:
      the DNS client
    • sharedData

      public SharedData sharedData()
      Returns:
      the shared data object
    • timer

      public Timer timer(long delay)
      Parameters:
      delay -
      Returns:
    • timer

      public Timer timer(long delay, TimeUnit unit)
      Parameters:
      delay - the delay
      unit - the delay unit
      Returns:
      the timer object
    • setTimer

      public long setTimer(long delay, Consumer<Long> handler)
      Parameters:
      delay - the delay in milliseconds, after which the timer will fire
      handler - the handler that will be called with the timer ID when the timer fires
      Returns:
    • timerStream

      @Deprecated public TimeoutStream timerStream(long delay)
      Deprecated.
      use setTimer(long, java.util.function.Consumer<java.lang.Long>) instead. RxJava like integrations should use the Vert.x scheduler integration.
      Parameters:
      delay - the delay in milliseconds, after which the timer will fire
      Returns:
      the timer stream
    • setPeriodic

      public long setPeriodic(long delay, Consumer<Long> handler)
      Parameters:
      delay - the delay in milliseconds, after which the timer will fire
      handler - the handler that will be called with the timer ID when the timer fires
      Returns:
    • setPeriodic

      public long setPeriodic(long initialDelay, long delay, Consumer<Long> handler)
      Parameters:
      initialDelay - the initial delay in milliseconds
      delay - the delay in milliseconds, after which the timer will fire
      handler - the handler that will be called with the timer ID when the timer fires
      Returns:
    • periodicStream

      @Deprecated public TimeoutStream periodicStream(long delay)
      Deprecated.
      use setPeriodic(long, java.util.function.Consumer<java.lang.Long>) instead. RxJava like integrations should use the Vert.x scheduler integration.
      Parameters:
      delay - the delay in milliseconds, after which the timer will fire
      Returns:
      the periodic stream
    • periodicStream

      @Deprecated public TimeoutStream periodicStream(long initialDelay, long delay)
      Deprecated.
      use setPeriodic(long, java.util.function.Consumer<java.lang.Long>) instead. RxJava like integrations should use the Vert.x scheduler integration.
      Parameters:
      initialDelay - the initial delay in milliseconds
      delay - the delay in milliseconds, after which the timer will fire
      Returns:
      the periodic stream
    • cancelTimer

      public boolean cancelTimer(long id)
      Parameters:
      id - The id of the timer to cancel
      Returns:
      true if the timer was successfully cancelled, or false if the timer does not exist.
    • runOnContext

      public void runOnContext(Runnable action)
      Parameters:
      action - - a handler representing the action to execute
    • close

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> close()
      Like close() but the completionHandler will be called when the 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 uni firing the result of the operation when completed, or a failure if the operation failed.
    • closeAndAwait

      public Void closeAndAwait()
      Blocking variant of close().

      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()
      Variant of close() that ignores the result of the operation.

      This method subscribes on the result of close(), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from close() but you don't need to compose it with other operations.

    • deployVerticle

      @CheckReturnValue public io.smallrye.mutiny.Uni<String> deployVerticle(String name)
      Like deployVerticle(java.lang.String) but the completionHandler will be notified when the deployment is complete.

      If the deployment is successful the result will contain a String representing the unique deployment ID of the deployment.

      This deployment ID can subsequently be used to undeploy the verticle.

      Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

      Parameters:
      name - The identifier
      Returns:
      the uni firing the result of the operation when completed, or a failure if the operation failed.
    • deployVerticleAndAwait

      public String deployVerticleAndAwait(String name)
      Blocking variant of deployVerticle(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:
      name - The identifier
      Returns:
      the String instance produced by the operation.
    • deployVerticleAndForget

      public void deployVerticleAndForget(String name)
      Variant of deployVerticle(String) that ignores the result of the operation.

      This method subscribes on the result of deployVerticle(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from deployVerticle(String) but you don't need to compose it with other operations.

      Parameters:
      name - The identifier
    • deployVerticle

      @CheckReturnValue public io.smallrye.mutiny.Uni<String> deployVerticle(String name, io.vertx.core.DeploymentOptions options)
      Like deployVerticle(java.lang.String) but DeploymentOptions are provided to configure the deployment.

      Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

      Parameters:
      name - the name
      options - the deployment options.
      Returns:
      the uni firing the result of the operation when completed, or a failure if the operation failed.
    • deployVerticleAndAwait

      public String deployVerticleAndAwait(String name, io.vertx.core.DeploymentOptions options)
      Blocking variant of deployVerticle(String,DeploymentOptions).

      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:
      name - the name
      options - the deployment options.
      Returns:
      the String instance produced by the operation.
    • deployVerticleAndForget

      public void deployVerticleAndForget(String name, io.vertx.core.DeploymentOptions options)
      Variant of deployVerticle(String,DeploymentOptions) that ignores the result of the operation.

      This method subscribes on the result of deployVerticle(String,DeploymentOptions), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from deployVerticle(String,DeploymentOptions) but you don't need to compose it with other operations.

      Parameters:
      name - the name
      options - the deployment options.
    • undeploy

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> undeploy(String deploymentID)
      Like #undeploy(String) but the completionHandler will be notified when the undeployment is complete.

      Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

      Parameters:
      deploymentID - the deployment ID
      Returns:
      the uni firing the result of the operation when completed, or a failure if the operation failed.
    • undeployAndAwait

      public Void undeployAndAwait(String deploymentID)
      Blocking variant of undeploy(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:
      deploymentID - the deployment ID
      Returns:
      the Void instance produced by the operation.
    • undeployAndForget

      public void undeployAndForget(String deploymentID)
      Variant of undeploy(String) that ignores the result of the operation.

      This method subscribes on the result of undeploy(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from undeploy(String) but you don't need to compose it with other operations.

      Parameters:
      deploymentID - the deployment ID
    • deploymentIDs

      public Set<String> deploymentIDs()
      Returns:
      Set of deployment IDs
    • isClustered

      public boolean isClustered()
      Returns:
      true if clustered
    • executeBlocking

      @CheckReturnValue public <T> io.smallrye.mutiny.Uni<T> executeBlocking(io.smallrye.mutiny.Uni<T> blockingCodeHandler, boolean ordered)
      Safely execute some blocking code.

      Executes the blocking code in the handler blockingCodeHandler using a thread from the worker pool.

      The returned future will be completed with the result on the original context (i.e. on the original event loop of the caller) or failed when the handler throws an exception.

      A Future instance is passed into blockingCodeHandler. When the blocking code successfully completes, the handler should call the Promise.complete(T) or Promise.complete(T) method, or the Promise.fail(java.lang.Throwable) method if it failed.

      In the blockingCodeHandler the current context remains the original context and therefore any task scheduled in the blockingCodeHandler will be executed on this context and not on the worker thread.

      The blocking code should block for a reasonable amount of time (i.e no more than a few seconds). Long blocking operations or polling operations (i.e a thread that spin in a loop polling events in a blocking fashion) are precluded.

      When the blocking operation lasts more than the 10 seconds, a message will be printed on the console by the blocked thread checker.

      Long blocking operations should use a dedicated thread managed by the application, which can interact with verticles using the event-bus or Context.runOnContext(java.lang.Runnable)

      Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

      Parameters:
      blockingCodeHandler - handler representing the blocking code to run
      ordered - if true then if executeBlocking is called several times on the same context, the executions for that context will be executed serially, not in parallel. if false then they will be no ordering guarantees
      Returns:
      the uni firing the result of the operation when completed, or a failure if the operation failed.
    • executeBlockingAndAwait

      @Deprecated public <T> T executeBlockingAndAwait(io.smallrye.mutiny.Uni<T> blockingCodeHandler, boolean ordered)
      Deprecated.
      Blocking variant of executeBlocking(Consumer,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:
      blockingCodeHandler - handler representing the blocking code to run
      ordered - if true then if executeBlocking is called several times on the same context, the executions for that context will be executed serially, not in parallel. if false then they will be no ordering guarantees
      Returns:
      the T instance produced by the operation.
    • executeBlockingAndForget

      @Deprecated public <T> void executeBlockingAndForget(io.smallrye.mutiny.Uni<T> blockingCodeHandler, boolean ordered)
      Deprecated.
      Variant of executeBlocking(Consumer,boolean) that ignores the result of the operation.

      This method subscribes on the result of executeBlocking(Consumer,boolean), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from executeBlocking(Consumer,boolean) but you don't need to compose it with other operations.

      Parameters:
      blockingCodeHandler - handler representing the blocking code to run
      ordered - if true then if executeBlocking is called several times on the same context, the executions for that context will be executed serially, not in parallel. if false then they will be no ordering guarantees
    • executeBlocking

      @CheckReturnValue public <T> io.smallrye.mutiny.Uni<T> executeBlocking(io.smallrye.mutiny.Uni<T> blockingCodeHandler)
      Like executeBlocking(io.smallrye.mutiny.Uni<T>, boolean) called with ordered = true.

      Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

      Parameters:
      blockingCodeHandler -
      Returns:
      the uni firing the result of the operation when completed, or a failure if the operation failed.
    • executeBlockingAndAwait

      @Deprecated public <T> T executeBlockingAndAwait(io.smallrye.mutiny.Uni<T> blockingCodeHandler)
      Deprecated.
      Blocking variant of executeBlocking(Consumer).

      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:
      blockingCodeHandler -
      Returns:
      the T instance produced by the operation.
    • executeBlockingAndForget

      @Deprecated public <T> void executeBlockingAndForget(io.smallrye.mutiny.Uni<T> blockingCodeHandler)
      Deprecated.
      Variant of executeBlocking(Consumer) that ignores the result of the operation.

      This method subscribes on the result of executeBlocking(Consumer), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from executeBlocking(Consumer) but you don't need to compose it with other operations.

      Parameters:
      blockingCodeHandler -
    • createSharedWorkerExecutor

      public WorkerExecutor createSharedWorkerExecutor(String name)
      Parameters:
      name -
      Returns:
    • createSharedWorkerExecutor

      public WorkerExecutor createSharedWorkerExecutor(String name, int poolSize)
      Parameters:
      name -
      poolSize -
      Returns:
    • createSharedWorkerExecutor

      public WorkerExecutor createSharedWorkerExecutor(String name, int poolSize, long maxExecuteTime)
      Parameters:
      name -
      poolSize -
      maxExecuteTime -
      Returns:
    • createSharedWorkerExecutor

      public WorkerExecutor createSharedWorkerExecutor(String name, int poolSize, long maxExecuteTime, TimeUnit maxExecuteTimeUnit)
      Parameters:
      name - the name of the worker executor
      poolSize - the size of the pool
      maxExecuteTime - the value of max worker execute time
      maxExecuteTimeUnit - the value of unit of max worker execute time
      Returns:
      the named worker executor
    • isNativeTransportEnabled

      public boolean isNativeTransportEnabled()
      Returns:
      whether the native transport is used
    • unavailableNativeTransportCause

      public Throwable unavailableNativeTransportCause()
      Returns:
      the error (if any) that cause the unavailability of native transport when isNativeTransportEnabled() returns false.
    • exceptionHandler

      public Vertx exceptionHandler(Consumer<Throwable> handler)
      Parameters:
      handler - the exception handler
      Returns:
    • deployVerticle

      @CheckReturnValue public io.smallrye.mutiny.Uni<String> deployVerticle(io.vertx.core.Verticle verticle)
      Like deployVerticle(java.lang.String) but the completionHandler will be notified when the deployment is complete.

      If the deployment is successful the result will contain a string representing the unique deployment ID of the deployment.

      This deployment ID can subsequently be used to undeploy the verticle.

      Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

      Parameters:
      verticle - the verticle instance to deploy
      Returns:
      the uni firing the result of the operation when completed, or a failure if the operation failed.
    • deployVerticleAndAwait

      public String deployVerticleAndAwait(io.vertx.core.Verticle verticle)
      Blocking variant of deployVerticle(Verticle).

      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:
      verticle - the verticle instance to deploy
      Returns:
      the String instance produced by the operation.
    • deployVerticleAndForget

      public void deployVerticleAndForget(io.vertx.core.Verticle verticle)
      Variant of deployVerticle(Verticle) that ignores the result of the operation.

      This method subscribes on the result of deployVerticle(Verticle), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from deployVerticle(Verticle) but you don't need to compose it with other operations.

      Parameters:
      verticle - the verticle instance to deploy
    • deployVerticle

      @CheckReturnValue public io.smallrye.mutiny.Uni<String> deployVerticle(io.vertx.core.Verticle verticle, io.vertx.core.DeploymentOptions options)
      Like deployVerticle(java.lang.String) but DeploymentOptions are provided to configure the deployment.

      Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

      Parameters:
      verticle - the verticle instance to deploy
      options - the deployment options.
      Returns:
      the uni firing the result of the operation when completed, or a failure if the operation failed.
    • deployVerticleAndAwait

      public String deployVerticleAndAwait(io.vertx.core.Verticle verticle, io.vertx.core.DeploymentOptions options)
      Blocking variant of deployVerticle(Verticle,DeploymentOptions).

      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:
      verticle - the verticle instance to deploy
      options - the deployment options.
      Returns:
      the String instance produced by the operation.
    • deployVerticleAndForget

      public void deployVerticleAndForget(io.vertx.core.Verticle verticle, io.vertx.core.DeploymentOptions options)
      Variant of deployVerticle(Verticle,DeploymentOptions) that ignores the result of the operation.

      This method subscribes on the result of deployVerticle(Verticle,DeploymentOptions), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from deployVerticle(Verticle,DeploymentOptions) but you don't need to compose it with other operations.

      Parameters:
      verticle - the verticle instance to deploy
      options - the deployment options.
    • deployVerticle

      @CheckReturnValue public io.smallrye.mutiny.Uni<String> deployVerticle(Supplier<io.vertx.core.Verticle> verticleSupplier, io.vertx.core.DeploymentOptions options)
      Like deployVerticle(java.lang.String) but Verticle instance is created by invoking the verticleSupplier.

      The supplier will be invoked as many times as DeploymentOptions. It must not return the same instance twice.

      Note that the supplier will be invoked on the caller thread.

      Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

      Parameters:
      verticleSupplier -
      options -
      Returns:
      the uni firing the result of the operation when completed, or a failure if the operation failed.
    • deployVerticleAndAwait

      public String deployVerticleAndAwait(Supplier<io.vertx.core.Verticle> verticleSupplier, io.vertx.core.DeploymentOptions options)
      Blocking variant of deployVerticle(Supplier,DeploymentOptions).

      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:
      verticleSupplier -
      options -
      Returns:
      the String instance produced by the operation.
    • deployVerticleAndForget

      public void deployVerticleAndForget(Supplier<io.vertx.core.Verticle> verticleSupplier, io.vertx.core.DeploymentOptions options)
      Variant of deployVerticle(Supplier,DeploymentOptions) that ignores the result of the operation.

      This method subscribes on the result of deployVerticle(Supplier,DeploymentOptions), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from deployVerticle(Supplier,DeploymentOptions) but you don't need to compose it with other operations.

      Parameters:
      verticleSupplier -
      options -
    • registerVerticleFactory

      public void registerVerticleFactory(io.vertx.core.spi.VerticleFactory factory)
      Parameters:
      factory - the factory to register
    • unregisterVerticleFactory

      public void unregisterVerticleFactory(io.vertx.core.spi.VerticleFactory factory)
      Parameters:
      factory - the factory to unregister
    • verticleFactories

      public Set<io.vertx.core.spi.VerticleFactory> verticleFactories()
      Returns:
      the set of verticle factories
    • executeBlocking

      @CheckReturnValue public <T> io.smallrye.mutiny.Uni<T> executeBlocking(Callable<T> blockingCodeHandler)
      Like executeBlocking(io.smallrye.mutiny.Uni<T>, boolean) but using a callback.

      Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

      Parameters:
      blockingCodeHandler -
      Returns:
      the uni firing the result of the operation when completed, or a failure if the operation failed.
    • executeBlockingAndAwait

      public <T> T executeBlockingAndAwait(Callable<T> blockingCodeHandler)
      Blocking variant of executeBlocking(Callable).

      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:
      blockingCodeHandler -
      Returns:
      the T instance produced by the operation.
    • executeBlockingAndForget

      public <T> void executeBlockingAndForget(Callable<T> blockingCodeHandler)
      Variant of executeBlocking(Callable) that ignores the result of the operation.

      This method subscribes on the result of executeBlocking(Callable), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from executeBlocking(Callable) but you don't need to compose it with other operations.

      Parameters:
      blockingCodeHandler -
    • executeBlocking

      @CheckReturnValue public <T> io.smallrye.mutiny.Uni<T> executeBlocking(Callable<T> blockingCodeHandler, boolean ordered)
      Like executeBlocking(io.smallrye.mutiny.Uni<T>, boolean) but using a callback.

      Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

      Parameters:
      blockingCodeHandler -
      ordered -
      Returns:
      the uni firing the result of the operation when completed, or a failure if the operation failed.
    • executeBlockingAndAwait

      public <T> T executeBlockingAndAwait(Callable<T> blockingCodeHandler, boolean ordered)
      Blocking variant of executeBlocking(Callable,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:
      blockingCodeHandler -
      ordered -
      Returns:
      the T instance produced by the operation.
    • executeBlockingAndForget

      public <T> void executeBlockingAndForget(Callable<T> blockingCodeHandler, boolean ordered)
      Variant of executeBlocking(Callable,boolean) that ignores the result of the operation.

      This method subscribes on the result of executeBlocking(Callable,boolean), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from executeBlocking(Callable,boolean) but you don't need to compose it with other operations.

      Parameters:
      blockingCodeHandler -
      ordered -
    • nettyEventLoopGroup

      @Deprecated public io.netty.channel.EventLoopGroup nettyEventLoopGroup()
      Deprecated.
      removed from public API in Vert.x 5
      Returns:
      the EventLoopGroup
    • newInstance

      public static Vertx newInstance(io.vertx.core.Vertx arg)