open class Vertx : Measured
The entry point into the Vert.x Core API.
You use an instance of this class for functionality including:
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.
Vertx(delegate: Vertx) |
static val __TYPE_ARG: TypeArg<Vertx> |
open fun cancelTimer(id: Long): Boolean
Cancels the timer with the specified |
|
open fun close(): Unit
Stop the the Vertx instance and release any resources held by it. The instance cannot be used after it has been closed. The actual close is asynchronous and may not complete until after the call has returned. open fun close(completionHandler: Handler<AsyncResult<Void>>): Unit
Like |
|
open static fun clusteredVertx(options: VertxOptions, resultHandler: Handler<AsyncResult<Vertx>>): Unit
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. |
|
open fun createDatagramSocket(options: DatagramSocketOptions): DatagramSocket
Create a datagram socket using the specified options open fun createDatagramSocket(): DatagramSocket
Create a datagram socket using default options |
|
open fun createDnsClient(port: Int, host: String): DnsClient
Create a DNS client to connect to a DNS server at the specified host and port open fun createDnsClient(options: DnsClientOptions): DnsClient
Create a DNS client to connect to a DNS server |
|
open fun createHttpClient(options: HttpClientOptions): HttpClient
Create a HTTP/HTTPS client using the specified options open fun createHttpClient(): HttpClient
Create a HTTP/HTTPS client using default options |
|
open fun createHttpServer(options: HttpServerOptions): HttpServer
Create an HTTP/HTTPS server using the specified options open fun createHttpServer(): HttpServer
Create an HTTP/HTTPS server using default options |
|
open fun createNetClient(options: NetClientOptions): NetClient
Create a TCP/SSL client using the specified options open fun createNetClient(): NetClient
Create a TCP/SSL client using default options |
|
open fun createNetServer(options: NetServerOptions): NetServer
Create a TCP/SSL server using the specified options open fun createNetServer(): NetServer
Create a TCP/SSL server using default options |
|
open fun createSharedWorkerExecutor(: String): WorkerExecutor
Like open fun createSharedWorkerExecutor(: String, : Int): WorkerExecutor
Like open fun createSharedWorkerExecutor(: String, : Int, : Long): WorkerExecutor
Create a named worker executor, the executor should be closed when it's not needed anymore to release resources. This method can be called mutiple times with the same The worker pool is released when all the io.vertx.reactivex.core.WorkerExecutor sharing the same name are closed. |
|
open static fun currentContext(): Context
Gets the current context |
|
open fun deployVerticle(name: String): Unit
Deploy a verticle instance given a name. Given the name, Vert.x selects a instance to use to instantiate the verticle. For the rules on how factories are selected please consult the user manual. open fun deployVerticle(name: String, completionHandler: Handler<AsyncResult<String>>): Unit
Like 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. open fun deployVerticle(name: String, options: DeploymentOptions): Unitopen fun deployVerticle(name: String, options: DeploymentOptions, completionHandler: Handler<AsyncResult<String>>): Unit
Like |
|
open fun deploymentIDs(): MutableSet<String>
Return a Set of deployment IDs for the currently deployed deploymentIDs. |
|
open fun equals(other: Any?): Boolean |
|
open fun eventBus(): EventBus
Get the event bus object. There is a single instance of EventBus per Vertx instance. |
|
open fun exceptionHandler(handler: Handler<Throwable>): Vertx
Set a default exception handler for io.vertx.reactivex.core.Context, set on at creation. |
|
open fun <T : Any> executeBlocking(blockingCodeHandler: Handler<Future<T>>, ordered: Boolean, resultHandler: Handler<AsyncResult<T>>): Unit
Safely execute some blocking code. Executes the blocking code in the handler When the code is complete the handler A In the open fun <T : Any> executeBlocking(blockingCodeHandler: Handler<Future<T>>, resultHandler: Handler<AsyncResult<T>>): Unit
Like |
|
open fun fileSystem(): FileSystem
Get the filesystem object. There is a single instance of FileSystem per Vertx instance. |
|
open fun getDelegate(): Vertx |
|
open fun getOrCreateContext(): Context
Gets the current context, or creates one if there isn't one |
|
open fun hashCode(): Int |
|
open fun isClustered(): Boolean
Is this Vert.x instance clustered? |
|
open fun isMetricsEnabled(): Boolean
Whether the metrics are enabled for this measured object |
|
open fun isNativeTransportEnabled(): Boolean |
|
open static fun newInstance(arg: Vertx): Vertx |
|
open fun periodicStream(delay: Long): TimeoutStream
Returns a periodic timer as a read stream. The timer will be fired every |
|
open fun runOnContext(action: Handler<Void>): Unit
Puts the handler on the event queue for the current context so it will be run asynchronously ASAP after all preceeding events have been handled. |
|
open fun rxClose(): Completable
Like |
|
open static fun rxClusteredVertx(options: VertxOptions): Single<Vertx>
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. |
|
open fun rxDeployVerticle(name: String): Single<String>
Like 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. open fun rxDeployVerticle(name: String, options: DeploymentOptions): Single<String>
Like |
|
open fun <T : Any> rxExecuteBlocking(blockingCodeHandler: Handler<Future<T>>, ordered: Boolean): Single<T>
Safely execute some blocking code. Executes the blocking code in the handler When the code is complete the handler A In the open fun <T : Any> rxExecuteBlocking(blockingCodeHandler: Handler<Future<T>>): Single<T>
Like |
|
open fun rxUndeploy(deploymentID: String): Completable
Like io.vertx.reactivex.core.Vertx but the completionHandler will be notified when the undeployment is complete. |
|
open fun setPeriodic(delay: Long, handler: Handler<Long>): Long
Set a periodic timer to fire every |
|
open fun setTimer(delay: Long, handler: Handler<Long>): Long
Set a one-shot timer to fire after |
|
open fun sharedData(): SharedData
Get the shared data object. There is a single instance of SharedData per Vertx instance. |
|
open fun timerStream(delay: Long): TimeoutStream
Returns a one-shot timer as a read stream. The timer will be fired after |
|
open fun toString(): String |
|
open fun undeploy(deploymentID: String): Unit
Undeploy a verticle deployment. The actual undeployment happens asynchronously and may not complete until after the method has returned. open fun undeploy(deploymentID: String, completionHandler: Handler<AsyncResult<Void>>): Unit
Like io.vertx.reactivex.core.Vertx but the completionHandler will be notified when the undeployment is complete. |
|
open static fun vertx(): Vertx
Creates a non clustered instance using default options. open static fun vertx(options: VertxOptions): Vertx
Creates a non clustered instance using the specified options |