Package org.sakaiproject.component.api
Interface ComponentManager
-
- All Known Implementing Classes:
MockCompMgr,SpringCompMgr
public interface ComponentManager...
-
-
Field Summary
Fields Modifier and Type Field Description static StringSAKAI_COMPONENTS_ROOT_SYS_PROPThe java system property name where the full path to the components packages.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidclose()Close the component manager, shutting down any created singletons.booleancontains(Class iface)Check if this interface Class has a registered component.booleancontains(String ifaceName)Check if this interface Class name has a registered component.<T> Tget(Class<T> iface)Find a component that is registered to provide this interface.Objectget(String ifaceName)Find a component that is registered to provide this interface.PropertiesgetConfig()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.booleanhasBeenClosed()Check if the ComponentManager has already been or is in the processing of being closed.voidloadComponent(Class iface, Object component)Load a singleton already created component for this interface class as a singleton.voidloadComponent(String ifaceName, Object component)Load a singleton already created component for this interface class as a singleton.voidwaitTillConfigured()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.
-
-