Class DIReactor

java.lang.Object
io.vertigo.core.node.component.di.DIReactor

public final class DIReactor extends Object
Reactor. - adds components in any order with their id, their class - adds ids for components that are already existing. - then 'proceed' and you obtain an ORDERED list of components, taking account of their dependencies.
Author:
pchretien
  • Constructor Details

    • DIReactor

      public DIReactor()
  • Method Details

    • addComponent

      public DIReactor addComponent(String id, Class<?> implClass)
      Adds a component
      Parameters:
      id - ID f the component
      implClass - Impl class of the component
      Returns:
      this reactor
    • addComponent

      public DIReactor addComponent(String id, Class<?> implClass, Set<String> params)
      Adds a component
      Parameters:
      id - ID f the component
      implClass - Impl class of the component
      params - List of ID of all local params - which will be automatically injected-
      Returns:
      this reactor
    • addParent

      public DIReactor addParent(String id)
      Adds a component identified by its ID. This component is ready to be injected in other components (and it does not need to be resolved).
      Parameters:
      id - ID of the component
      Returns:
      this reactor
    • proceed

      public List<String> proceed()
      Process the 'digital' reaction in a way to obtain an ordered list of components, taking account of their dependencies.
      Returns:
      Ordered list of comoponent's Ids.