• Prev Type
  • Next Type

io.sarl.apputils.bootiqueapp
Class BootiqueMain
All Known Subclasses:
BootiqueBatchCompilerMain
class BootiqueMain
extends java.lang.Object
Class that implements the standard main function for running a SARL application with bootique modules.
Maven Group Identifier:
io.sarl.apputils
Maven Artifact Identifier:
bootiqueapp
Since:
0.8
Property Summary
Modifier and type Property and description
java.util.List<E> options
Replies the options of the program.
Field Summary
Modifier and type Field and description
public static val java.lang.String D_PATTERN
Pattern for command-line definition.
public static val java.lang.String DEFAULT_LOG_FORMAT
Default log format for a bootique app.
public static val int ERROR_CODE
Return code when failure.
Constructor Summary
Constructor and description
new(BQModuleProvider*)
Constructor.
new(boolean,BQModuleProvider*)
Constructor.
Action Summary
Modifier and type Action and description
protected io.bootique.BQRuntime createRuntime(String*)
Create the compiler runtime.
protected io.bootique.BQRuntime createRuntime(Class<T>,String*)
Create the compiler runtime.
static java.lang.String filterCommandLineArguments(String)
Filter the command-line arguments for extracting the -D parameters.
final java.util.List<E> getOptions
Replies the options of the program.
final java.util.List<E> getOptionsForModules(Class<T>)
Replies the options of the program that are provided by a specific set of modules.
static java.lang.Class<T> getStaticModuleProvidersFor(String)
Replies the statically defined modules.
boolean isExperimental
Replies if this application is an experimental application.
int runCommand(String*)
Run the associated commands.
Property Details
options
val options : java.util.List<E>
Replies the options of the program. This function loads any modules available on class-path that expose BQModuleProvider provider. Use with caution, you may load more modules than you expected. Make sure only needed Bootique dependencies are included on class-path. If in doubt, switch to explicit Module loading via getOptionsForModules(Class...).

This property is an alias for the action: getOptions

Returns:
the options of the program.
Field Details
D_PATTERN
public static val D_PATTERN : java.lang.String = "(?:(?:\\-\\-?)|(?:\\/))D([^=]+)=(.*)"
Pattern for command-line definition.
DEFAULT_LOG_FORMAT
public static val DEFAULT_LOG_FORMAT : java.lang.String = "%-5p %m%n"
Default log format for a bootique app.
ERROR_CODE
public static val ERROR_CODE : int = 255
Return code when failure.
Constructor Details
new(BQModuleProvider*)
new(BQModuleProvider*)
Constructor.
Parameters:
providers - the providers of module that injects application-specific components.
new(boolean,BQModuleProvider*)
new(boolean,BQModuleProvider*)
Constructor.
Parameters:
experimental - indicates if the application is experimental.
providers - the providers of module that injects application-specific components.
Action Details
createRuntime(String*)
protected def createRuntime(String*) : io.bootique.BQRuntime
Create the compiler runtime. This function loads any modules available on class-path that expose BQModuleProvider provider. Use with caution, you may load more modules than you expected. Make sure only needed Bootique dependencies are included on class-path. If in doubt, switch to explicit Module loading via createRuntime(Class[], String...).
Parameters:
args - the command line arguments.
Returns:
the runtime.
createRuntime(Class<T>,String*)
protected def createRuntime(Class<T>,String*) : io.bootique.BQRuntime
Create the compiler runtime.
Parameters:
modules - the list of module to be loaded.
args - the command line arguments.
Returns:
the runtime.
Since:
0.12
filterCommandLineArguments(String)
def filterCommandLineArguments(String) : java.lang.String
Filter the command-line arguments for extracting the -D parameters.
Parameters:
args - the arguments.
Returns:
the filtered arguments.
Since:
0.12
getOptions
def getOptions : java.util.List<E>
Replies the options of the program. This function loads any modules available on class-path that expose BQModuleProvider provider. Use with caution, you may load more modules than you expected. Make sure only needed Bootique dependencies are included on class-path. If in doubt, switch to explicit Module loading via getOptionsForModules(Class...).
Returns:
the options of the program.
getOptionsForModules(Class<T>)
def getOptionsForModules(Class<T>) : java.util.List<E>
Replies the options of the program that are provided by a specific set of modules.
Parameters:
modules - the list of modules to be loaded.
Returns:
the options of the program.
Since:
0.12
getStaticModuleProvidersFor(String)
def getStaticModuleProvidersFor(String) : java.lang.Class<T>
Replies the statically defined modules.
Parameters:
names - the list of fully-qualified names of the modules providers.
Returns:
the list of the providers.
Since:
0.12
isExperimental
def isExperimental : boolean
Replies if this application is an experimental application.

Usually a warning message is displayed at launch time when the application is experimental.
Returns:
true if experimental.
runCommand(String*)
def runCommand(String*) : int
Run the associated commands.

This function runs the command and exits with the return code.
Parameters:
args - the command line arguments.
Returns:
the exit code.