public abstract class AbstractRunCommand
extends io.bootique.command.CommandWithMetadata
This abstract command provides helping tools for implementing a launching command.
Modifier and Type | Field and Description |
---|---|
protected javax.inject.Provider<SreConfig> |
configuration
Launching configuration.
|
Constructor and Description |
---|
AbstractRunCommand(configuration : javax.inject.Provider<SreConfig>,
commandBuilder : io.bootique.meta.application.CommandMetadata.Builder)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected SREBootstrap |
getSREBootstrap()
Replies the SRE bootstrap.
|
protected boolean |
isAgentType(value : String)
Replies if the given value is the fully qualified name of an agent's type.
|
protected void |
startAgentsFromConfig(bootstrap : SREBootstrap,
config : BootConfig)
Start all the boot agents that are defined into the configuration.
|
protected BootConfig |
synchronizeCliWithBootConfig(args : io.bootique.cli.Cli,
maxNbAgents : int)
Synchronizes the command-line arguments and the SRE configuration.
|
protected val
configuration : javax.inject.Provider<SreConfig>
AbstractRunCommand
public new
(configuration : javax.inject.Provider<SreConfig>,
commandBuilder : io.bootique.meta.application.CommandMetadata.Builder)
configuration
- the configuration of the tool.commandBuilder
- the builder of the command.lock
- the lock to use for synchronizing.@Pure
protected def
isAgentType(value : String) : boolean
AbstractRunCommand
Class
that extends the Agent
type.value
- the value to test.true
if the given value is the fully qualified name of an agent's type.protected def
synchronizeCliWithBootConfig(args : io.bootique.cli.Cli,
maxNbAgents : int) : BootConfig
AbstractRunCommand
Cli
and
updates the SreConfig
.args
- the definition of the command line argumentsmaxNbAgents
- is the maximum number of agents to be launched.@Pure
protected def
getSREBootstrap() : SREBootstrap
AbstractRunCommand
protected def
startAgentsFromConfig(bootstrap : SREBootstrap,
config : BootConfig) : void
AbstractRunCommand
bootstrap
- the SRE bootstrap.config
- the configuration to use.Copyright © 2021 the original authors or authors.