Package org.pipservices3.components
Class Component
java.lang.Object
org.pipservices3.components.Component
- All Implemented Interfaces:
org.pipservices3.commons.config.IConfigurable
,org.pipservices3.commons.refer.IReferenceable
public class Component extends Object implements org.pipservices3.commons.config.IConfigurable, org.pipservices3.commons.refer.IReferenceable
Abstract component that supportes configurable dependencies, logging
and performance counters.
### Configuration parameters ###
- dependencies:
- [dependency name 1]: Dependency 1 locator (descriptor)
- ...
- [dependency name N]: Dependency N locator (descriptor)
### References ###
-
Field Summary
Fields Modifier and Type Field Description protected CompositeCounters
_counters
protected org.pipservices3.commons.refer.DependencyResolver
_dependencyResolver
protected CompositeLogger
_logger
-
Constructor Summary
Constructors Constructor Description Component()
-
Method Summary
Modifier and Type Method Description void
configure(org.pipservices3.commons.config.ConfigParams config)
Configures component by passing configuration parameters.void
setReferences(org.pipservices3.commons.refer.IReferences references)
Sets references to dependent components.
-
Field Details
-
_dependencyResolver
protected org.pipservices3.commons.refer.DependencyResolver _dependencyResolver -
_logger
-
_counters
-
-
Constructor Details
-
Component
public Component()
-
-
Method Details
-
configure
public void configure(org.pipservices3.commons.config.ConfigParams config) throws org.pipservices3.commons.errors.ConfigExceptionConfigures component by passing configuration parameters.- Specified by:
configure
in interfaceorg.pipservices3.commons.config.IConfigurable
- Parameters:
config
- configuration parameters to be set.- Throws:
org.pipservices3.commons.errors.ConfigException
-
setReferences
public void setReferences(org.pipservices3.commons.refer.IReferences references) throws org.pipservices3.commons.refer.ReferenceExceptionSets references to dependent components.- Specified by:
setReferences
in interfaceorg.pipservices3.commons.refer.IReferenceable
- Parameters:
references
- references to locate the component dependencies.- Throws:
org.pipservices3.commons.refer.ReferenceException
-