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: vertx, vertx and clusteredVertx.
Please see the user manual for more detailed usage information.
Anything
Object
no subtypes hierarchy
Initializer |
Vertx(Vertx unknown) |
Inherited Attributes |
Attributes inherited from: Object hash , string |
Methods | |
cancelTimer | shared default Boolean cancelTimer(Integer id) Cancels the timer with the specified Parameters:
|
close | shared default void close() 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. |
close | shared default void close(Anything(Throwable?) completionHandler) Like close but the completionHandler will be called when the close is complete Parameters:
|
createDatagramSocket | shared default DatagramSocket createDatagramSocket() Create a datagram socket using default options |
createDatagramSocket | shared default DatagramSocket createDatagramSocket(DatagramSocketOptions options) Create a datagram socket using the specified options Parameters:
|
createDnsClient | shared default DnsClient createDnsClient(Integer port, String host) Create a DNS client to connect to a DNS server at the specified host and port Parameters:
|
createHttpClient | shared default HttpClient createHttpClient() Create a HTTP/HTTPS client using default options |
createHttpClient | shared default HttpClient createHttpClient(HttpClientOptions options) Create a HTTP/HTTPS client using the specified options Parameters:
|
createHttpServer | shared default HttpServer createHttpServer() Create an HTTP/HTTPS server using default options |
createHttpServer | shared default HttpServer createHttpServer(HttpServerOptions options) Create an HTTP/HTTPS server using the specified options Parameters:
|
createNetClient | shared default NetClient createNetClient() Create a TCP/SSL client using default options |
createNetClient | shared default NetClient createNetClient(NetClientOptions options) Create a TCP/SSL client using the specified options Parameters:
|
createNetServer | shared default NetServer createNetServer() Create a TCP/SSL server using default options |
createNetServer | shared default NetServer createNetServer(NetServerOptions options) Create a TCP/SSL server using the specified options Parameters:
|
createSharedWorkerExecutor | shared default WorkerExecutor createSharedWorkerExecutor(String name) Like createSharedWorkerExecutor but with the setWorkerPoolSize |
createSharedWorkerExecutor | shared default WorkerExecutor createSharedWorkerExecutor(String name, Integer poolSize) Like createSharedWorkerExecutor but with the setMaxWorkerExecuteTime |
createSharedWorkerExecutor | shared default WorkerExecutor createSharedWorkerExecutor(String name, Integer poolSize, Integer maxExecuteTime) 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 WorkerExecutor sharing the same name are closed. Parameters:
|
deployVerticle | shared default void deployVerticle(String name) 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. Parameters:
|
deployVerticle | shared default void deployVerticle(String name, Anything(Throwable|String) completionHandler) Like deployVerticle 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. Parameters:
|
deployVerticle | shared default void deployVerticle(String name, DeploymentOptions options) Like deployVerticle but DeploymentOptions are provided to configure the deployment. Parameters:
|
deployVerticle | shared default void deployVerticle(String name, DeploymentOptions options, Anything(Throwable|String) completionHandler) Like deployVerticle but DeploymentOptions are provided to configure the deployment. Parameters:
|
deploymentIDs | shared default Set<String> deploymentIDs() Return a Set of deployment IDs for the currently deployed deploymentIDs. |
eventBus | shared default EventBus eventBus() Get the event bus object. There is a single instance of EventBus per Vertx instance. |
exceptionHandler | shared default Vertx exceptionHandler(Anything(Throwable)? handler) Set a default exception handler for Context, set on at creation. Parameters:
|
executeBlocking | shared default void executeBlocking<T>(Anything(Future<T?>) blockingCodeHandler, Anything(Throwable|T?) resultHandler) Like executeBlocking called with ordered = true. |
executeBlocking | shared default void executeBlocking<T>(Anything(Future<T?>) blockingCodeHandler, Boolean ordered, Anything(Throwable|T?) resultHandler) Safely execute some blocking code.
Executes the blocking code in the handler
When the code is complete the handler
A
In the Parameters:
|
fileSystem | shared default FileSystem fileSystem() Get the filesystem object. There is a single instance of FileSystem per Vertx instance. |
getOrCreateContext | shared default Context getOrCreateContext() Gets the current context, or creates one if there isn't one |
isClustered | shared default Boolean isClustered() Is this Vert.x instance clustered? |
isMetricsEnabled | shared actual default Boolean isMetricsEnabled() Whether the metrics are enabled for this measured object Refines Measured.isMetricsEnabled |
periodicStream | shared default TimeoutStream periodicStream(Integer delay) Returns a periodic timer as a read stream. The timer will be fired every Parameters:
|
runOnContext | shared default void runOnContext(Anything() action) 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. Parameters:
|
setPeriodic | shared default Integer setPeriodic(Integer delay, Anything(Integer) handler) Set a periodic timer to fire every Parameters:
|
setTimer | shared default Integer setTimer(Integer delay, Anything(Integer) handler) Set a one-shot timer to fire after Parameters:
|
sharedData | shared default SharedData sharedData() Get the shared data object. There is a single instance of SharedData per Vertx instance. |
timerStream | shared default TimeoutStream timerStream(Integer delay) Returns a one-shot timer as a read stream. The timer will be fired after Parameters:
|
undeploy | shared default void undeploy(String deploymentID) Undeploy a verticle deployment. The actual undeployment happens asynchronously and may not complete until after the method has returned. Parameters:
|
undeploy | shared default void undeploy(String deploymentID, Anything(Throwable?) completionHandler) Like #undeploy(String) but the completionHandler will be notified when the undeployment is complete. Parameters:
|
Inherited Methods |
Methods inherited from: Object equals |
Methods inherited from: Measured |