vertx / io.vertx.reactivex.core

Package io.vertx.reactivex.core

Types

AbstractVerticle

open class AbstractVerticle : AbstractVerticle

CompositeFuture

open class CompositeFuture : Future<CompositeFuture>

The composite future wraps a list of io.vertx.reactivex.core.Future, it is useful when several futures needs to be coordinated. The handlers set for the coordinated futures are overridden by the handler of the composite future. NOTE: This class has been automatically generated from the io.vertx.core.CompositeFuture non RX-ified interface using Vert.x codegen.

Context

open class Context

The execution context of a io.vertx.reactivex.core.Handler execution.

When Vert.x provides an event to a handler or calls the start or stop methods of a io.vertx.reactivex.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 io.vertx.reactivex.core.Context#put and io.vertx.reactivex.core.Context#get on the context so it can be shared easily amongst different handlers of, for example, a verticle instance.

This class also provides io.vertx.reactivex.core.Context#runOnContext which allows an action to be executed asynchronously using the same context.

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

FlowableHelper

open class FlowableHelper

Future

open class Future<T : Any>

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

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

MaybeHelper

open class MaybeHelper

MultiMap

open class 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.

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

ObservableHelper

open class ObservableHelper

RxHelper

open class RxHelper

SingleHelper

open class SingleHelper

TimeoutStream

open class TimeoutStream : ReadStream<Long>

A timeout stream is triggered by a timer, the io.vertx.reactivex.core.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.

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

Vertx

open class Vertx : 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: io.vertx.reactivex.core.Vertx#vertx, io.vertx.reactivex.core.Vertx#vertx and io.vertx.reactivex.core.Vertx#clusteredVertx.

Please see the user manual for more detailed usage information.

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

WorkerExecutor

open class WorkerExecutor : Measured

An executor for executing blocking code in Vert.x .

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

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