Top Description Fields Constructors Methods
io.vertx.core.impl

public abstract Class VertxWrapper

extends Object
implements VertxInternal
Class Inheritance
All Implemented Interfaces
io.vertx.core.impl.VertxInternal, io.vertx.core.Vertx, io.vertx.core.metrics.Measured
Imports
io.netty.channel.EventLoop, .EventLoopGroup, io.netty.resolver.AddressResolverGroup, io.vertx.core.*, io.vertx.core.datagram.DatagramSocket, .DatagramSocketOptions, io.vertx.core.dns.DnsClient, .DnsClientOptions, io.vertx.core.eventbus.EventBus, io.vertx.core.file.FileSystem, io.vertx.core.http.*, io.vertx.core.http.impl.HttpServerImpl, io.vertx.core.impl.btc.BlockedThreadChecker, io.vertx.core.impl.future.PromiseInternal, io.vertx.core.net.NetClient, .NetClientOptions, .NetServer, .NetServerOptions, io.vertx.core.net.impl.NetServerImpl, .ServerID, .TCPServerBase, io.vertx.core.spi.context.storage.ContextLocal, io.vertx.core.spi.transport.Transport, io.vertx.core.shareddata.SharedData, io.vertx.core.spi.VerticleFactory, io.vertx.core.spi.cluster.ClusterManager, io.vertx.core.spi.file.FileResolver, io.vertx.core.spi.metrics.VertxMetrics, io.vertx.core.spi.tracing.VertxTracer, java.io.File, java.net.InetAddress, .InetSocketAddress, java.util.List, .Map, .Set, java.util.concurrent.Callable, .Executor, .ExecutorService, .TimeUnit, java.util.function.Function, .Supplier

A wrapper class that delegates all method calls to the delegate instance. Implementing the Vertx interface is not encouraged however if that is necessary, implementations should favor extending this class to ensure minimum breakage when new methods are added to the interace. The delegate instance can be accessed using protected final delegate field, any method of the Vertx interface can be overridden.

Field Summary

Modifier and TypeField and Description
protected final VertxInternal

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public void
public AddressResolver
public BlockedThreadChecker
public boolean
cancelTimer(long
The id of the timer to cancel
id
)

Implements io.vertx.core.Vertx.cancelTimer.

Cancels the timer with the specified id.

public Future<Void>
close()

Implements io.vertx.core.Vertx.close.

Stop the Vertx instance and release any resources held by it.

public void
close(Handler<AsyncResult<Void>>
The handler will be notified when the close is complete.
completionHandler
)

Implements io.vertx.core.Vertx.close.

Like close but the completionHandler will be called when the close is complete

public CloseFuture
public List<ContextLocal<?>>
public DatagramSocket
createDatagramSocket(DatagramSocketOptions
the options to use
options
)

Implements io.vertx.core.Vertx.createDatagramSocket.

Create a datagram socket using the specified options

public DnsClient
createDnsClient(int
the port
port
,
String
the host
host
)

Implements io.vertx.core.Vertx.createDnsClient.

Create a DNS client to connect to a DNS server at the specified host and port, with the default query timeout (5 seconds)

public DnsClient
createDnsClient()

Implements io.vertx.core.Vertx.createDnsClient.

Create a DNS client to connect to the DNS server configured by VertxOptions#getAddressResolverOptions()

DNS client takes the first configured resolver address provided by DnsResolverProvider#nameServerAddresses()}

public DnsClient
createDnsClient(DnsClientOptions
the client options
options
)

Implements io.vertx.core.Vertx.createDnsClient.

Create a DNS client to connect to a DNS server

public ContextInternal
public ContextInternal
public ContextInternal
public HttpClient
createHttpPoolClient(HttpClientOptions
the http client options to use
clientOptions
,
PoolOptions
the pool options to use
poolOptions
,
CloseFuture
the close future
closeFuture
)

Implements io.vertx.core.impl.VertxInternal.createHttpPoolClient.

Create a HTTP/HTTPS client using the specified options and close future

public HttpServer
createHttpServer(HttpServerOptions
the options to use
options
)

Implements io.vertx.core.Vertx.createHttpServer.

Create an HTTP/HTTPS server using the specified options

public HttpServer
createHttpServer()

Overrides default io.vertx.core.Vertx.createHttpServer.

Create an HTTP/HTTPS server using default options

public NetClient
createNetClient(NetClientOptions
the options to use
options
)

Implements io.vertx.core.Vertx.createNetClient.

Create a TCP/SSL client using the specified options

public NetServer
createNetServer(NetServerOptions
the options to use
options
)

Implements io.vertx.core.Vertx.createNetServer.

Create a TCP/SSL server using the specified options

public WorkerExecutorInternal
public WorkerExecutorInternal
public WorkerExecutorInternal
public WorkerExecutorInternal
createSharedWorkerExecutor(String
the name of the worker executor
name
,
int
the size of the pool
poolSize
,
long
the value of max worker execute time
maxExecuteTime
,
TimeUnit
the value of unit of max worker execute time
maxExecuteTimeUnit
)

Implements io.vertx.core.impl.VertxInternal.createSharedWorkerExecutor.

Create a named worker executor, the executor should be closed when it's not needed anymore to release resources.

public WorkerPool
createSharedWorkerPool(String name, int poolSize, long maxExecuteTime, TimeUnit maxExecuteTimeUnit)

Implements io.vertx.core.impl.VertxInternal.createSharedWorkerPool.

public ContextInternal
public ContextInternal
public ContextInternal
public WebSocketClient
createWebSocketClient(WebSocketClientOptions
the options to use
options
)

Implements io.vertx.core.Vertx.createWebSocketClient.

Create a WebSocket client using the specified options

public WebSocketClient
createWebSocketClient(WebSocketClientOptions
the options to use
options
,
CloseFuture
the close future
closeFuture
)

Implements io.vertx.core.impl.VertxInternal.createWebSocketClient.

Create a WebSocket client using the specified options and close future

public ContextInternal
public ContextInternal
public ContextInternal
public Set<String>
deploymentIDs()

Implements io.vertx.core.Vertx.deploymentIDs.

Return a Set of deployment IDs for the currently deployed deploymentIDs.

public void
deployVerticle(Verticle
the verticle instance to deploy
verticle
,
Handler<AsyncResult<String>>
a handler which will be notified when the deployment is complete
completionHandler
)

Implements io.vertx.core.Vertx.deployVerticle.

Like deployVerticle(Verticle) but the completionHandler will be notified when the deployment is complete.

public Future<String>
deployVerticle(Verticle
the verticle instance to deploy
verticle
,
DeploymentOptions
the deployment options.
options
)

Implements io.vertx.core.Vertx.deployVerticle.

Like deployVerticle(Verticle) but io.vertx.core.DeploymentOptions are provided to configure the deployment.

public Future<String>
deployVerticle(Class<? extends Verticle> verticleClass, DeploymentOptions options)

Implements io.vertx.core.Vertx.deployVerticle.

Like deployVerticle(Verticle, DeploymentOptions) but Verticle instance is created by invoking the default constructor of verticleClass.

public Future<String>
deployVerticle(Supplier<Verticle> verticleSupplier, DeploymentOptions options)

Implements io.vertx.core.Vertx.deployVerticle.

Like deployVerticle(Verticle, DeploymentOptions) but Verticle instance is created by invoking the verticleSupplier.

public void
deployVerticle(Verticle
the verticle instance to deploy
verticle
,
DeploymentOptions
the deployment options.
options
,
Handler<AsyncResult<String>>
a handler which will be notified when the deployment is complete
completionHandler
)

Implements io.vertx.core.Vertx.deployVerticle.

Like deployVerticle(Verticle, Handler) but io.vertx.core.DeploymentOptions are provided to configure the deployment.

public void
deployVerticle(Class<? extends Verticle> verticleClass, DeploymentOptions options, Handler<AsyncResult<String>> completionHandler)

Implements io.vertx.core.Vertx.deployVerticle.

Like deployVerticle(Verticle, DeploymentOptions, Handler) but Verticle instance is created by invoking the default constructor of verticleClass.

public void
deployVerticle(Supplier<Verticle> verticleSupplier, DeploymentOptions options, Handler<AsyncResult<String>> completionHandler)

Implements io.vertx.core.Vertx.deployVerticle.

Like deployVerticle(Verticle, DeploymentOptions, Handler) but Verticle instance is created by invoking the verticleSupplier.

public Future<String>
deployVerticle(String
the name
name
,
DeploymentOptions
the deployment options.
options
)

Implements io.vertx.core.Vertx.deployVerticle.

Like deployVerticle(Verticle) but io.vertx.core.DeploymentOptions are provided to configure the deployment.

public void
deployVerticle(String
the name
name
,
DeploymentOptions
the deployment options.
options
,
Handler<AsyncResult<String>>
a handler which will be notified when the deployment is complete
completionHandler
)

Implements io.vertx.core.Vertx.deployVerticle.

Like deployVerticle(String, Handler) but io.vertx.core.DeploymentOptions are provided to configure the deployment.

public EventBus
eventBus()

Implements io.vertx.core.Vertx.eventBus.

Get the event bus object.

public Vertx
public Handler<Throwable>
public void
public void
public FileResolver
public FileSystem
fileSystem()

Implements io.vertx.core.Vertx.fileSystem.

Get the filesystem object.

public EventLoopGroup
public ClusterManager
public ContextInternal
getContext()

Implements io.vertx.core.impl.VertxInternal.getContext.

Get the current context

public Deployment
public EventLoopGroup
public WorkerPool
public ContextInternal
getOrCreateContext()

Implements io.vertx.core.impl.VertxInternal.getOrCreateContext.

Gets the current context, or creates one if there isn't one

public WorkerPool
public HAManager
public HttpClientBuilder
httpClientBuilder()

Implements io.vertx.core.Vertx.httpClientBuilder.

Provide a builder for HttpClient, it can be used to configure advanced HTTP client settings like a redirect handler or a connection handler.

public boolean
isClustered()

Implements io.vertx.core.Vertx.isClustered.

Is this Vert.x instance clustered?

public boolean
public boolean
isMetricsEnabled()

Overrides default io.vertx.core.metrics.Measured.isMetricsEnabled.

Whether the metrics are enabled for this measured object

public boolean
public boolean
public long
public TimeUnit
public VertxMetrics
public AddressResolverGroup<InetSocketAddress>
public EventLoopGroup
nettyEventLoopGroup()

Implements io.vertx.core.Vertx.nettyEventLoopGroup.

Return the Netty EventLoopGroup used by Vert.x

public TimeoutStream
periodicStream(long
the initial delay in milliseconds
initialDelay
,
long
the delay in milliseconds, after which the timer will fire
delay
)

Implements io.vertx.core.Vertx.periodicStream.

References Deprecated TimeoutStream is deprecated or references (maybe indirectly) at least one deprecated element.

Returns a periodic timer as a read stream.

public <T> PromiseInternal<T>
public <T> PromiseInternal<T>
public void
registerVerticleFactory(VerticleFactory
the factory to register
factory
)

Implements io.vertx.core.Vertx.registerVerticleFactory.

Register a VerticleFactory that can be used for deploying Verticles based on an identifier.

public void
public void
resolveAddress(String
the hostname to resolve
hostname
,
Handler<AsyncResult<InetAddress>>
the result handler
resultHandler
)

Implements io.vertx.core.impl.VertxInternal.resolveAddress.

Resolve an address (e.g. vertx.io into the first found A (IPv4) or AAAA (IPv6) record.

public File
public void
runOnContext(Handler<Void>
- a handler representing the action to execute
action
)

Implements io.vertx.core.Vertx.runOnContext.

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.

public long
setPeriodic(long
the initial delay in milliseconds
initialDelay
,
long
the delay in milliseconds, after which the timer will fire
delay
,
Handler<Long>
the handler that will be called with the timer ID when the timer fires
handler
)

Implements io.vertx.core.Vertx.setPeriodic.

Set a periodic timer to fire every delay milliseconds with initial delay, at which point handler will be called with the id of the timer.

public long
setTimer(long
the delay in milliseconds, after which the timer will fire
delay
,
Handler<Long>
the handler that will be called with the timer ID when the timer fires
handler
)

Implements io.vertx.core.Vertx.setTimer.

Set a one-shot timer to fire after delay milliseconds, at which point handler will be called with the id of the timer.

public SharedData
sharedData()

Implements io.vertx.core.Vertx.sharedData.

Get the shared data object.

public Map<ServerID, HttpServerImpl>
public Map<ServerID, NetServerImpl>
public <S extends TCPServerBase> Map<ServerID, S>
public void
public Timer
timer(long
the delay
delay
,
TimeUnit
the delay unit
unit
)

Implements io.vertx.core.Vertx.timer.

Create a timer task configured with the specified delay, when the timeout fires the timer future is succeeded, when the timeout is cancelled the timer future is failed with a java.util.concurrent.CancellationException instance.

public TimeoutStream
timerStream(long
the delay in milliseconds, after which the timer will fire
delay
)

Implements io.vertx.core.Vertx.timerStream.

References Deprecated TimeoutStream is deprecated or references (maybe indirectly) at least one deprecated element.

Returns a one-shot timer as a read stream.

public VertxTracer<I, O>
public Transport
public Throwable
public Future<Void>
undeploy(String
the deployment ID
deploymentID
)

Implements io.vertx.core.Vertx.undeploy.

Undeploy a verticle deployment.

public void
undeploy(String
the deployment ID
deploymentID
,
Handler<AsyncResult<Void>>
a handler which will be notified when the undeployment is complete
completionHandler
)

Implements io.vertx.core.Vertx.undeploy.

Like undeploy(String) but the completionHandler will be notified when the undeployment is complete.

public void
unregisterVerticleFactory(VerticleFactory
the factory to unregister
factory
)

Implements io.vertx.core.Vertx.unregisterVerticleFactory.

Unregister a VerticleFactory

public Set<VerticleFactory>
verticleFactories()

Implements io.vertx.core.Vertx.verticleFactories.

Return the Set of currently registered verticle factories.

public WorkerPool
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait