Skip to content

Commit

Permalink
[sre] Add the lifecycle configuration "--Xinjectagents".
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Galland <galland@arakhne.org>
  • Loading branch information
gallandarakhneorg committed Feb 17, 2020
1 parent 849d87f commit be6db6a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
Expand Up @@ -26,13 +26,17 @@ import io.bootique.BQModule
import io.bootique.BQModuleProvider
import io.bootique.annotation.BQConfig
import io.bootique.annotation.BQConfigProperty
import io.bootique.meta.application.OptionMetadata
import java.lang.reflect.Type
import java.util.Collections
import java.util.Map
import org.arakhne.afc.bootique.variables.VariableDecls
import org.eclipse.xtend.lib.annotations.Accessors

import static io.sarl.sre.boot.configs.subconfigs.LifecycleConfig.*

import static extension io.bootique.BQCoreModule.extend

/**
* Configuration for the agent lifecycle management.
*
Expand Down Expand Up @@ -91,7 +95,13 @@ class LifecycleConfig {
*/
class LifecycleConfigModule extends AbstractModule {

static val XINJECTAGENT_OPTION = "Xinjectagents"

override configure : void {
VariableDecls::extend(binder).declareVar(CREATE_AGENT_WITH_INJECTOR_NAME)
binder.extend.addOption(
OptionMetadata::builder(XINJECTAGENT_OPTION, Messages::LifecycleConfigModule_0).valueRequired(
Messages::LifecycleConfigModule_1).build).mapConfigPath(XINJECTAGENT_OPTION, CREATE_AGENT_WITH_INJECTOR_NAME)
}

}
Expand Down
Expand Up @@ -57,6 +57,8 @@ final class Messages extends NLS {
public static var ExecutorsConfigModule_9 : String
public static var ExecutorsConfigModule_10 : String
public static var ExecutorsConfigModuleProvider_0 : String
public static var LifecycleConfigModule_0 : String
public static var LifecycleConfigModule_1 : String
public static var LifecycleConfigModuleProvider_0 : String
public static var LoggingConfigModuleProvider_0 : String
public static var ServicesConfigModule_0 : String
Expand Down
Expand Up @@ -17,6 +17,8 @@ ExecutorsConfigModule_8 = level
ExecutorsConfigModule_9 = Specify if the executor service is periodically purging the thread pools; Default is: {0}.
ExecutorsConfigModule_10 = {true|false}
ExecutorsConfigModuleProvider_0 = The configuration for the parallel executors.
LifecycleConfigModule_0 = Specify the agents should be injected with field values by the SRE.
LifecycleConfigModule_1 = {true|false}
LifecycleConfigModuleProvider_0 = The configuration for the agent lifecycle management.
LoggingConfigModuleProvider_0 = The configuration for the logging service of the SRE.
ServicesConfigModule_0 = Specify the timeout for waiting a service to be started (in milliseconds); A value equal to zero \
Expand Down

0 comments on commit be6db6a

Please sign in to comment.