Platform: Java
java.base (jvm)8
compositeFutureshared compositeFuture compositeFuture
contextshared context context
deploymentOptionsshared deploymentOptions deploymentOptions
futureshared future future
multiMapshared multiMap multiMap
vertxshared vertx vertx
vertxOptionsshared vertxOptions vertxOptions
CompositeFutureshared CompositeFuture

The composite future wraps a list of futures, it is useful when several futures needs to be coordinated.

Contextshared Context

The execution context of a handler execution.

When Vert.x provides an event to a handler or calls the start or stop methods of a io.vertx.core.Verticle, the execution is associated with a Context.

Usually a context is an event-loop context and is tied to a specific event loop thread. So executions for that context always occur on that exact same event loop thread.

In the case of worker verticles and running inline blocking code a worker context will be associated with the execution which will use a thread from the worker thread pool.

When a handler is set by a thread associated with a specific context, the Vert.x will guarantee that when that handler is executed, that execution will be associated with the same context.

If a handler is set by a thread not associated with a context (i.e. a non Vert.x thread). Then a new context will be created for that handler.

In other words, a context is propagated.

This means that when a verticle is deployed, any handlers it sets will be associated with the same context - the context of the verticle.

This means (in the case of a standard verticle) that the verticle code will always be executed with the exact same thread, so you don't have to worry about multi-threaded acccess to the verticle state and you can code your application as single threaded.

This class also allows arbitrary data to be put and get on the context so it can be shared easily amongst different handlers of, for example, a verticle instance.

This class also provides runOnContext which allows an action to be executed asynchronously using the same context.

DeploymentOptionsshared DeploymentOptions

Options for configuring a verticle deployment.

Futureshared Future<T>

Represents the result of an action that may, or may not, have occurred yet.

MultiMapshared MultiMap

This class represents a MultiMap of String keys to a List of String values.

It's useful in Vert.x to represent things in Vert.x like HTTP headers and HTTP parameters which allow multiple values for keys.

TimeoutStreamshared TimeoutStream

A timeout stream is triggered by a timer, the handler will be call when the timer is fired, it can be once or several times depending on the nature of the timer related to this stream. The will be called after the timer handler has been called.

Pausing the timer inhibits the timer shots until the stream is resumed. Setting a null handler callback cancels the timer.

Verticleshared abstract Verticle
Vertxshared Vertx

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.

Please see the user manual for more detailed usage information.

VertxOptionsshared VertxOptions

Instances of this class are used to configure Vertx instances.

WorkerExecutorshared WorkerExecutor

An executor for executing blocking code in Vert.x .

It provides the same executeBlocking operation than Context and Vertx but on a separate worker pool.

compositeFutureshared compositeFuture
contextshared context
deploymentOptionsshared deploymentOptions
futureshared future
multiMapshared multiMap
vertxshared vertx
vertxOptionsshared vertxOptions