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 ###

  • *:counters:*:*:1.0 (optional) ICounters components to pass collected measurements
  • *:logger:*:*:1.0 (optional) ILogger components to pass log messages
  • ... References must match configured dependencies.
  • Field Details

    • _dependencyResolver

      protected org.pipservices3.commons.refer.DependencyResolver _dependencyResolver
    • _logger

      protected CompositeLogger _logger
    • _counters

      protected CompositeCounters _counters
  • Constructor Details

    • Component

      public Component()
  • Method Details

    • configure

      public void configure​(org.pipservices3.commons.config.ConfigParams config) throws org.pipservices3.commons.errors.ConfigException
      Configures component by passing configuration parameters.
      Specified by:
      configure in interface org.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.ReferenceException
      Sets references to dependent components.
      Specified by:
      setReferences in interface org.pipservices3.commons.refer.IReferenceable
      Parameters:
      references - references to locate the component dependencies.
      Throws:
      org.pipservices3.commons.refer.ReferenceException