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

public abstract Class ClasspathHandler

extends DefaultCommand
Class Inheritance
Known Direct Subclasses
io.vertx.core.impl.launcher.commands.BareCommand
Imports
io.vertx.core.AsyncResult, .DeploymentOptions, .Handler, .Vertx, .VertxOptions, io.vertx.core.cli.annotations.Description, .Option, io.vertx.core.impl.VertxBuilder, io.vertx.core.impl.logging.Logger, .LoggerFactory, io.vertx.core.spi.launcher.DefaultCommand, java.io.File, java.lang.reflect.InvocationTargetException, .Method, java.net.MalformedURLException, .URL, .URLClassLoader, java.util.Arrays, .Collections, .List

Command using the classpath option should extends this class as it manages the interaction with the custom classloader.
Author
Clement Escoffier

Field Summary

Modifier and TypeField and Description
private ClassLoader
protected List<String>
protected final Logger
protected Object
protected static final String
Inherited from io.vertx.core.spi.launcher.DefaultCommand:
executionContextoutsystemProperties

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected synchronized Vertx

Returns:

the created instance
create
(VertxBuilder
the builder
builder
)

Creates a new non-clustered vert.x instance.

protected synchronized void
create(VertxBuilder
the builder
builder
,
Handler<AsyncResult<Vertx>>
the result handler
resultHandler
)

Creates a new clustered vert.x instance.

protected synchronized ClassLoader

Returns:

the classloader.
createClassloader
()

Creates a classloader respecting the classpath option.

public synchronized void
deploy(String
the verticle
verticle
,
Vertx
the vert.x instance
vertx
,
DeploymentOptions
the deployment options
options
,
Handler<AsyncResult<String>>
the completion handler
completionHandler
)

Deploys the given verticle using the given deployment options.

protected synchronized Object

Returns:

the new instance.
newInstance
()

Creates a new instance of VertxIsolatedDeployer.

public void
setClasspath(String
the classpath
classpath
)

Sets the classpath.

Inherited from io.vertx.core.spi.launcher.DefaultCommand:
applySystemPropertiesgetCwdoutsetCwdsetSystemPropssetUptearDown

Field Detail

classloaderback to summary
private ClassLoader classloader
classpathback to summary
protected List<String> classpath
logback to summary
protected final Logger log
managerback to summary
protected Object manager
PATH_SEPback to summary
protected static final String PATH_SEP

Constructor Detail

ClasspathHandlerback to summary
public ClasspathHandler()

Method Detail

createback to summary
protected synchronized Vertx create(VertxBuilder builder)

Creates a new non-clustered vert.x instance.

Parameters
builder:VertxBuilder

the builder

Returns:Vertx

the created instance

createback to summary
protected synchronized void create(VertxBuilder builder, Handler<AsyncResult<Vertx>> resultHandler)

Creates a new clustered vert.x instance.

Parameters
builder:VertxBuilder

the builder

resultHandler:Handler<AsyncResult<Vertx>>

the result handler

createClassloaderback to summary
protected synchronized ClassLoader createClassloader()

Creates a classloader respecting the classpath option.

Returns:ClassLoader

the classloader.

deployback to summary
public synchronized void deploy(String verticle, Vertx vertx, DeploymentOptions options, Handler<AsyncResult<String>> completionHandler)

Deploys the given verticle using the given deployment options.

Parameters
verticle:String

the verticle

vertx:Vertx

the vert.x instance

options:DeploymentOptions

the deployment options

completionHandler:Handler<AsyncResult<String>>

the completion handler

newInstanceback to summary
protected synchronized Object newInstance()

Creates a new instance of VertxIsolatedDeployer.

Returns:Object

the new instance.

setClasspathback to summary
public void setClasspath(String classpath)

Sets the classpath.

Parameters
classpath:String

the classpath

Annotations
@Option
shortName:cp
longName:classpath
argName:classpath
@Description:Provides an extra classpath to be used for the verticle deployment.