Class ComponentConfig
java.lang.Object
org.pipservices3.container.config.ComponentConfig
Configuration of a component inside a container.
The configuration includes type information or descriptor, and component configuration parameters.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of the component configuration.ComponentConfig
(org.pipservices3.commons.refer.Descriptor descriptor, org.pipservices3.commons.reflect.TypeDescriptor type, org.pipservices3.commons.config.ConfigParams config) Creates a new instance of the component configuration. -
Method Summary
Modifier and TypeMethodDescriptionstatic ComponentConfig
fromConfig
(org.pipservices3.commons.config.ConfigParams config) Creates a new instance of ComponentConfig based on section from container configuration.org.pipservices3.commons.config.ConfigParams
org.pipservices3.commons.refer.Descriptor
org.pipservices3.commons.reflect.TypeDescriptor
getType()
void
setConfig
(org.pipservices3.commons.config.ConfigParams value) void
setDescriptor
(org.pipservices3.commons.refer.Descriptor value) void
setType
(org.pipservices3.commons.reflect.TypeDescriptor value)
-
Constructor Details
-
ComponentConfig
public ComponentConfig()Creates a new instance of the component configuration. -
ComponentConfig
public ComponentConfig(org.pipservices3.commons.refer.Descriptor descriptor, org.pipservices3.commons.reflect.TypeDescriptor type, org.pipservices3.commons.config.ConfigParams config) Creates a new instance of the component configuration.- Parameters:
descriptor
- (optional) a components descriptor (locator).type
- (optional) a components type descriptor.config
- (optional) component configuration parameters.
-
-
Method Details
-
getDescriptor
public org.pipservices3.commons.refer.Descriptor getDescriptor() -
setDescriptor
public void setDescriptor(org.pipservices3.commons.refer.Descriptor value) -
getType
public org.pipservices3.commons.reflect.TypeDescriptor getType() -
setType
public void setType(org.pipservices3.commons.reflect.TypeDescriptor value) -
getConfig
public org.pipservices3.commons.config.ConfigParams getConfig() -
setConfig
public void setConfig(org.pipservices3.commons.config.ConfigParams value) -
fromConfig
public static ComponentConfig fromConfig(org.pipservices3.commons.config.ConfigParams config) throws org.pipservices3.commons.errors.ConfigException Creates a new instance of ComponentConfig based on section from container configuration.- Parameters:
config
- component parameters from container configuration- Returns:
- a newly created ComponentConfig
- Throws:
org.pipservices3.commons.errors.ConfigException
- when neither component descriptor or type is found.
-