public class DefaultModuleConfig extends Object implements ModuleConfig
ComponentConfig.TypeMODULE_NAMECOMPONENT_CONFIG, COMPONENT_GROUP, COMPONENT_HOOKS, COMPONENT_NAME, COMPONENT_NUM_INSTANCES, COMPONENT_TYPE, COMPONENT_TYPE_MODULE, COMPONENT_TYPE_VERTICLE| Constructor and Description |
|---|
DefaultModuleConfig() |
DefaultModuleConfig(String name,
String moduleName,
NetworkConfig network) |
| Modifier and Type | Method and Description |
|---|---|
ModuleConfig |
addHook(ComponentHook hook)
Adds a hook to the component.
|
org.vertx.java.core.json.JsonObject |
getConfig()
Returns the component configuration.
|
String |
getGroup()
Returns the component deployment group.
|
List<ComponentHook> |
getHooks()
Returns a list of component hooks.
|
int |
getInstances()
Returns the number of component instances to deploy within the network.
|
String |
getModule()
Gets the module name.
|
String |
getName()
Returns the component name.
|
ComponentConfig.Type |
getType()
Returns the component type.
|
ModuleConfig |
setConfig(org.vertx.java.core.json.JsonObject config)
Sets the component configuration.
|
ModuleConfig |
setGroup(String group)
Sets the component deployment group.
|
ModuleConfig |
setInstances(int instances)
Sets the number of component instances to deploy within the network.
|
ModuleConfig |
setModule(String moduleName)
Sets the module name.
|
ModuleConfig |
setName(String name)
Sets the component name.
|
public DefaultModuleConfig()
public DefaultModuleConfig(String name, String moduleName, NetworkConfig network)
public ComponentConfig.Type getType()
ComponentConfiggetType in interface ComponentConfig<ModuleConfig>public String getName()
ComponentConfiggetName in interface ComponentConfig<ModuleConfig>public ModuleConfig setName(String name)
ComponentConfigsetName in interface ComponentConfig<ModuleConfig>name - The component name.public org.vertx.java.core.json.JsonObject getConfig()
ComponentConfiggetConfig in interface ComponentConfig<ModuleConfig>public ModuleConfig setConfig(org.vertx.java.core.json.JsonObject config)
ComponentConfigThis configuration will be passed to component implementations as the verticle or module configuration when the component is started.
setConfig in interface ComponentConfig<ModuleConfig>config - The component configuration.public int getInstances()
ComponentConfiggetInstances in interface ComponentConfig<ModuleConfig>public ModuleConfig setInstances(int instances)
ComponentConfigsetInstances in interface ComponentConfig<ModuleConfig>instances - The number of component instances.public ModuleConfig setGroup(String group)
ComponentConfigsetGroup in interface ComponentConfig<ModuleConfig>group - The component deployment group.public String getGroup()
ComponentConfiggetGroup in interface ComponentConfig<ModuleConfig>public ModuleConfig addHook(ComponentHook hook)
ComponentConfigaddHook in interface ComponentConfig<ModuleConfig>hook - The hook to add.public List<ComponentHook> getHooks()
ComponentConfiggetHooks in interface ComponentConfig<ModuleConfig>public ModuleConfig setModule(String moduleName)
ModuleConfigsetModule in interface ModuleConfigmoduleName - The module name.public String getModule()
ModuleConfiggetModule in interface ModuleConfigCopyright © 2013-2014. All Rights Reserved.