Description
The ComponentConfig class allows you to configure a component residing inside a container.
Important points
- The configuration includes the type of information or descriptor and component configuration parameters.
Constructors
Creates a new instance of the configuration component.
public
ComponentConfig(Descriptor descriptor, TypeDescriptor type, ConfigParams config)
- descriptor: Descriptor - (optional) component’s descriptor (locator).
- type: TypeDescriptor - (optional) component’s type descriptor.
- config: ConfigParams - (optional) component’s configuration parameters.
Fields
Instance methods
getDescriptor
Gets a descriptor.
public
Descriptor getDescriptor()
- returns: Descriptor - descriptor.
setDescriptor
Sets a descriptor.
public
void setDescriptor(Descriptor value)
- value: Descriptor - descriptor.
getType
Gets a descriptor’s type.
public
TypeDescriptor getType()
- returns: TypeDescriptor - type.
setType
Sets a descriptor’s type.
public
void setType(TypeDescriptor value)
- value: TypeDescriptor - type.
getConfig
Gets configuration parameters.
public
ConfigParams getConfig()
- returns: ConfigParams - configuration parameters.
setConfig
Sets configuration parameters.
public
void setConfig(ConfigParams value)
- value: ConfigParams - configuration parameters.
Static methods
fromConfig
Creates a new instance of ComponentConfig based on a section from a container configuration. Throws ConfigException when neither component descriptor or type is found.
public static
ComponentConfig fromConfig(ConfigParams config) throws ConfigException
- config: ConfigParams - component’s parameters from a container configuration.
- returns: ComponentConfig - created ComponentConfig.