Interface ComponentManager

    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      void close()
      Close the component manager, shutting down any created singletons.
      boolean contains​(Class iface)
      Check if this interface Class has a registered component.
      boolean contains​(String ifaceName)
      Check if this interface Class name has a registered component.
      <T> T get​(Class<T> iface)
      Find a component that is registered to provide this interface.
      Object get​(String ifaceName)
      Find a component that is registered to provide this interface.
      Properties getConfig()
      Deprecated.
      This method is redundant, not used by any known client, would expose implementation details, and will be removed in a future release.
      Set<String> getRegisteredInterfaces()
      Get all interfaces registered in the component manager.
      boolean hasBeenClosed()
      Check if the ComponentManager has already been or is in the processing of being closed.
      void loadComponent​(Class iface, Object component)
      Load a singleton already created component for this interface class as a singleton.
      void loadComponent​(String ifaceName, Object component)
      Load a singleton already created component for this interface class as a singleton.
      void waitTillConfigured()
      Deprecated. 
    • Field Detail

      • SAKAI_COMPONENTS_ROOT_SYS_PROP

        static final String SAKAI_COMPONENTS_ROOT_SYS_PROP
        The java system property name where the full path to the components packages.
        See Also:
        Constant Field Values
    • Method Detail

      • get

        <T> T get​(Class<T> iface)
        Find a component that is registered to provide this interface.
        Parameters:
        iface - The interface Class.
        Returns:
        a component instance, or null if not found.
      • get

        Object get​(String ifaceName)
        Find a component that is registered to provide this interface.
        Parameters:
        ifaceName - The fully qualified interface Class name.
        Returns:
        a component instance, or null if not found.
      • contains

        boolean contains​(Class iface)
        Check if this interface Class has a registered component.
        Parameters:
        iface - The interface Class.
        Returns:
        true if this interface Class has a registered component, false if not.
      • contains

        boolean contains​(String ifaceName)
        Check if this interface Class name has a registered component.
        Parameters:
        ifaceName - The fully qualified interface Class name.
        Returns:
        true if this interface has a registered component, false if not.
      • getRegisteredInterfaces

        Set<String> getRegisteredInterfaces()
        Get all interfaces registered in the component manager.
        Returns:
        A Set (String class name) of all interfaces registered in the component manager.
      • loadComponent

        void loadComponent​(Class iface,
                           Object component)
        Load a singleton already created component for this interface class as a singleton.
        Parameters:
        iface - The interface class.
        component - The alread created component.
      • loadComponent

        void loadComponent​(String ifaceName,
                           Object component)
        Load a singleton already created component for this interface class as a singleton.
        Parameters:
        ifaceName - The fully qualified interface Class name.
        component - The alread created component.
      • close

        void close()
        Close the component manager, shutting down any created singletons.
      • getConfig

        @Deprecated
        Properties getConfig()
        Deprecated.
        This method is redundant, not used by any known client, would expose implementation details, and will be removed in a future release. Use the ServerConfigurationService instead.
        Access the configuration properties used when configuring components.
        Returns:
        null
      • waitTillConfigured

        void waitTillConfigured()
        Deprecated.
        Wait right here till the component manager is fully configured.
      • hasBeenClosed

        boolean hasBeenClosed()
        Check if the ComponentManager has already been or is in the processing of being closed.
        Returns:
        true if closed, false if not.