Class ComponentCollector<F extends ComponentFactory>

Type Parameters:
F - the component factory type
All Implemented Interfaces:
Iterable<ComponentType>, Channel, ComponentType, Eligible, Manager

@Deprecated(since="1.3") public class ComponentCollector<F extends ComponentFactory> extends Component
Deprecated.
This class has been moved to ComponentCollector.
A component that collects all component factory services of a given type and uses each to create one or more components that are then attached to the component collector instance.

Effectively, the component collector leverages the mechanism provided by the service loader to determine the component tree that is built eventually at “link time”.

  • Constructor Details

    • ComponentCollector

      public ComponentCollector(Class<F> factoryClass, Channel componentChannel, Function<String,List<Map<Object,Object>>> matcher)
      Deprecated.
      Creates a new collector that collects the factories of the given type and uses each to create one or more instances with this component’s (the component collector’s) channel.

      Before instances are created, the matcher function is invoked with the name of the class of the component to be created as argument. The list of maps returned is used to create components, passing each element in the list as parameter to ComponentFactory.create(Channel, Map).

      Parameters:
      factoryClass - the factory class
      componentChannel - this component’s channel
      matcher - the matcher function
    • ComponentCollector

      public ComponentCollector(Class<F> factoryClass, Channel componentChannel)
      Deprecated.
      Utility constructor that uses each factory to create a single instance, using an empty map as properties.
      Parameters:
      factoryClass - the factory class
      componentChannel - this component’s channel