Interface CompatibilityComponentManager


  • public interface CompatibilityComponentManager
    Add a backward compatibility layer to the ComponentManager class.
    Since:
    4.1M1
    Version:
    $Id: af29b918e29d882c2ea7b1ecf2c29b1df3cb89f9 $
    • Method Detail

      • lookup

        @Deprecated
        <T> T lookup​(Class<T> role)
              throws ComponentLookupException
        Deprecated.
        since 4.0M1 use #getInstance(java.lang.reflect.Type) instead
        Find a component instance that implements that passed interface class. If the component has a singleton lifecycle then this method always return the same instance.
        Type Parameters:
        T - the component role type
        Parameters:
        role - the class (aka role) that the component implements
        Returns:
        the component instance
        Throws:
        ComponentLookupException - in case the component cannot be found
      • lookup

        @Deprecated
        <T> T lookup​(Class<T> role,
                     String hint)
              throws ComponentLookupException
        Deprecated.
        since 4.0M1 use #getInstance(java.lang.reflect.Type, String) instead
        Find a component instance that implements that passed interface class. If the component has a singleton lifecycle then this method always return the same instance.
        Type Parameters:
        T - the component role type
        Parameters:
        role - the class (aka role) that the component implements
        hint - the hint that differentiates a component implementation from another one (each component is registered with a hint; the "default" hint being the default)
        Returns:
        the component instance
        Throws:
        ComponentLookupException - in case the component cannot be found
      • lookupList

        @Deprecated
        <T> List<T> lookupList​(Class<T> role)
                        throws ComponentLookupException
        Deprecated.
        since 4.0M1 use #getInstanceList(java.lang.reflect.Type) instead
        Find all the components implementing the provided role.
        Type Parameters:
        T - the type of the components role
        Parameters:
        role - the class of the components role
        Returns:
        the components
        Throws:
        ComponentLookupException - if any error happen during component search
      • lookupMap

        @Deprecated
        <T> Map<String,​T> lookupMap​(Class<T> role)
                                   throws ComponentLookupException
        Deprecated.
        since 4.0M1 use #getInstanceMap(java.lang.reflect.Type) instead
        Find all the components implementing the provided role and organize then in a Map with role hint as key.
        Type Parameters:
        T - the type of the components role
        Parameters:
        role - the class of the components role
        Returns:
        the components
        Throws:
        ComponentLookupException - if any error happen during component search
      • hasComponent

        @Deprecated
        <T> boolean hasComponent​(Class<T> role)
        Deprecated.
        since 4.0M1 use #hasComponent(Type) instead
        Type Parameters:
        T - the component role type
        Parameters:
        role - the class (aka role) that the component implements
        Returns:
        true if the component is registered or false otherwise
      • hasComponent

        @Deprecated
        <T> boolean hasComponent​(Class<T> role,
                                 String hint)
        Deprecated.
        since 4.0M1 use #hasComponent(Type, String) instead
        Type Parameters:
        T - the component role type
        Parameters:
        role - the class (aka role) that the component implements
        hint - the hint that differentiates a component implementation from another one (each component is registered with a hint; the "default" hint being the default)
        Returns:
        true if the component is registered for the passed hint or false otherwise
      • unregisterComponent

        @Deprecated
        <T> void unregisterComponent​(Class<T> role,
                                     String hint)
        Deprecated.
        since 4.0M1 use #unregisterComponent(Type, String) instead
        Remove a component from the component repository dynamically.
        Type Parameters:
        T - the component role type
        Parameters:
        role - the role identifying the component
        hint - the hint identifying the component
        Since:
        2.0M2
      • getComponentDescriptor

        @Deprecated
        <T> ComponentDescriptor<T> getComponentDescriptor​(Class<T> role,
                                                          String hint)
        Deprecated.
        since 4.0M1 use #getComponentDescriptor(Type, String) instead
        Type Parameters:
        T - the component role type
        Parameters:
        role - the role identifying the component
        hint - the hint identifying the component
        Returns:
        the descriptor for the component matching the passed parameter or null if this component doesn't exist
        Since:
        2.0M1