Class ComponentSpaceWritable

java.lang.Object
io.vertigo.core.node.component.loader.ComponentSpaceWritable
All Implemented Interfaces:
Activeable, ComponentSpace, Container

public final class ComponentSpaceWritable extends Object implements ComponentSpace, Activeable
Centralisation des accès aux composants et aux plugins. Les composants et leur initializers sont instanciés par injection - des paramètres déclarés sur le scope composant. - des autres composants Les plugins sont instanciés par injection - des paramètres déclarés sur le scope plugin. - des autres composants Donc un plugin ne peut pas être injecté dans un plugin, il ne peut être injecté que dans LE composant pour lequel il est prévu. En revanche les composants (à ne pas réaliser de dépendances cycliques) peuvent être injecter dans les composants, les plugins et les initializers.
Author:
pchretien
  • Constructor Details

    • ComponentSpaceWritable

      public ComponentSpaceWritable()
  • Method Details

    • start

      public void start()
      Initializes and activates the component. This method is called after the component has been created and fully initialized, typically after dependency injection for components built via configuration. Implementations should perform any necessary setup or resource allocation to prepare the component for use.
      Specified by:
      start in interface Activeable
    • stop

      public void stop()
      Deactivates and prepares the component for destruction. This method is called before the component is stopped or destroyed. Implementations should release resources, terminate processes, or perform cleanup to ensure a graceful shutdown.
      Specified by:
      stop in interface Activeable
    • contains

      public boolean contains(String id)
      Returns true if this container contains the specified component
      Specified by:
      contains in interface Container
      Parameters:
      id - Id of the component
      Returns:
      true if the component is already registered.
    • resolve

      public <C> C resolve(String id, Class<C> componentClass)
      Resolve a component from its id and class.
      Specified by:
      resolve in interface Container
      Parameters:
      id - Id of the component
      componentClass - Type of the component
      Returns:
      Component
    • keySet

      public Set<String> keySet()
      Returns the list of the ids of the components managed in this container.
      Specified by:
      keySet in interface Container
      Returns:
      list of ids