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

public Class StartCommand

extends DefaultCommand
Class Inheritance
Annotations
@Name:start
@Summary:Start a vert.x application in background
@Description:Start a vert.x application as a background service. The application is identified with an id that can be set using the `vertx-id` option. If not set a random UUID is generated. The application can be stopped with the `stop` command.
Imports
io.vertx.core.cli.annotations.*, io.vertx.core.impl.launcher.CommandLineUtils, io.vertx.core.spi.launcher.DefaultCommand, java.io.File, java.util.*, java.util.stream.Collectors

A command starting a vert.x application in the background.
Author
Clement Escoffier

Field Summary

Modifier and TypeField and Description
private String
private String
private String
private boolean
Inherited from io.vertx.core.spi.launcher.DefaultCommand:
executionContextoutsystemProperties

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
private List<String>
private String
private File
private boolean
public void
run()

Implements io.vertx.core.spi.launcher.Command.run.

Starts the application in background.

public void
setApplicationId(String
the id
id
)

Sets the "application id" that would be to stop the application and be lsited in the list command.

public void
setJavaOptions(String
the jvm options
options
)

Sets the Java Virtual Machine options to pass to the spawned process.

public void
setLauncherClass(String
the class
clazz
)

A hidden option to set the launcher class.

public void
setRedirect(boolean
true to enable redirection, false otherwise
redirect
)

Whether or not the created process error streams and output streams needs to be redirected to the launcher process.

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

Field Detail

idback to summary
private String id
jvmOptionsback to summary
private String jvmOptions
launcherback to summary
private String launcher
redirectback to summary
private boolean redirect

Constructor Detail

StartCommandback to summary
public StartCommand()

Method Detail

addJavaCommandback to summary
private void addJavaCommand(List<String> cmd)
getArgumentsback to summary
private List<String> getArguments()
getIdback to summary
private String getId()
getJavaback to summary
private File getJava()
isLaunchedAsFatJarback to summary
private boolean isLaunchedAsFatJar()
runback to summary
public void run()

Implements io.vertx.core.spi.launcher.Command.run.

Starts the application in background.

Annotations
@Override
setApplicationIdback to summary
public void setApplicationId(String id)

Sets the "application id" that would be to stop the application and be lsited in the list command.

Parameters
id:String

the id

Annotations
@Option
longName:vertx-id
shortName:id
required:false
acceptValue:true
@Description:The id of the application, a random UUID by default
setJavaOptionsback to summary
public void setJavaOptions(String options)

Sets the Java Virtual Machine options to pass to the spawned process. If not set, the JAVA_OPTS environment variable is used.

Parameters
options:String

the jvm options

Annotations
@Option
longName:java-opts
required:false
acceptValue:true
@Description:Java Virtual Machine options to pass to the spawned process such as "-Xmx1G -Xms256m -XX:MaxPermSize=256m". If not set the `JAVA_OPTS` environment variable is used.
setLauncherClassback to summary
public void setLauncherClass(String clazz)

A hidden option to set the launcher class.

Parameters
clazz:String

the class

Annotations
@Option
longName:launcher-class
@Hidden
setRedirectback to summary
public void setRedirect(boolean redirect)

Whether or not the created process error streams and output streams needs to be redirected to the launcher process.

Parameters
redirect:boolean

true to enable redirection, false otherwise

Annotations
@Option
longName:redirect-output
flag:true
@Hidden