Component

Component that supports configurable dependencies, logging and performance counters.

Inherits: IConfigurable, IReferenceable

Description

The component class allows you to create components that support 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
  • *:tracer:*:*:1.0 - (optional) ITracer components to trace executed operations
  • … References must match configured dependencies.

Fields

_logger

Components to pass log messages

protected _logger: CompositeLogger

_counters

Components to pass collected measurements

protected _counters: CompositeCounters

_dependencyResolver

A dependency resolver

protected _dependencyResolver: DependencyResolver

_tracer

Components to record traces

protected _tracer: CompositeTracer

Instance methods

Configure

Configures component by passing configuration parameters.

public void Configure(ConfigParams config)

  • config: ConfigParams - configuration parameters to be set.

SetReferences

Sets references to dependent components.

public void SetReferences(IReferences references)

  • references: IReferences - references to locate the component dependencies.