Class 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 Detail

      • ComponentSpaceWritable

        public ComponentSpaceWritable()
    • Method Detail

      • start

        public void start()
        Called after the component has been created and filled by injection (for the components built by configuration).
        Specified by:
        start in interface Activeable
      • stop

        public void stop()
        Called before the component is stopped.
        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