public interface ComponentConfig<T extends ComponentConfig<T>> extends Config<T>
| Modifier and Type | Interface and Description |
|---|---|
static class |
ComponentConfig.Type
Component type.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
COMPONENT_CONFIG
config is an object defining the configuration to pass to each instance
of the component. |
static String |
COMPONENT_GROUP
group is a component deployment group for HA. |
static String |
COMPONENT_HOOKS
hooks is an array defining component hooks. |
static String |
COMPONENT_NAME
name is a string indicating the network unique component name. |
static String |
COMPONENT_NUM_INSTANCES
instances is a number indicating the number of instances of the
component to deploy. |
static String |
COMPONENT_TYPE
type is a string indicating the type of component that will be deployed. |
static String |
COMPONENT_TYPE_MODULE
module is the module component type. |
static String |
COMPONENT_TYPE_VERTICLE
verticle is the verticle component type. |
| Modifier and Type | Method and Description |
|---|---|
T |
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 |
getName()
Returns the component name.
|
ComponentConfig.Type |
getType()
Returns the component type.
|
T |
setConfig(org.vertx.java.core.json.JsonObject config)
Sets the component configuration.
|
T |
setGroup(String group)
Sets the component deployment group.
|
T |
setInstances(int instances)
Sets the number of component instances to deploy within the network.
|
T |
setName(String name)
Sets the component name.
|
static final String COMPONENT_NAME
name is a string indicating the network unique component name. This
name is used as the basis for generating unique event bus addresses.static final String COMPONENT_TYPE
type is a string indicating the type of component that will be deployed.
This can be either module or verticle. This field is required.static final String COMPONENT_TYPE_MODULE
module is the module component type.static final String COMPONENT_TYPE_VERTICLE
verticle is the verticle component type.static final String COMPONENT_CONFIG
config is an object defining the configuration to pass to each instance
of the component. If no configuration is provided then an empty configuration will be
passed to component instances.static final String COMPONENT_NUM_INSTANCES
instances is a number indicating the number of instances of the
component to deploy. Defaults to 1static final String COMPONENT_GROUP
group is a component deployment group for HA. This option applies when
deploying the network to a cluster.static final String COMPONENT_HOOKS
hooks is an array defining component hooks. Each element in the array
must be an object containing a hook field which indicates the hook
class name.ComponentConfig.Type getType()
String getName()
T setName(String name)
name - The component name.org.vertx.java.core.json.JsonObject getConfig()
T setConfig(org.vertx.java.core.json.JsonObject config)
This configuration will be passed to component implementations as the verticle or module configuration when the component is started.
config - The component configuration.int getInstances()
T setInstances(int instances)
instances - The number of component instances.T setGroup(String group)
group - The component deployment group.String getGroup()
T addHook(ComponentHook hook)
hook - The hook to add.List<ComponentHook> getHooks()
Copyright © 2013-2014. All Rights Reserved.