public interface ComponentManager
Modifier and Type | Method and Description |
---|---|
void |
addComponentListener(ComponentListener listener)
Adds a component listener.
|
Collection<ComponentName> |
getActivatingRegistrations()
Gets the pending extensions by component.
|
Set<String> |
getBlacklist() |
ComponentInstance |
getComponent(ComponentName name)
Gets object instance managed by the named component.
|
ComponentInstance |
getComponentProvidingService(Class<?> serviceClass)
Gets the component that provides the given service.
|
Map<ComponentName,Set<ComponentName>> |
getPendingRegistrations()
Gets the pending registrations and their dependencies.
|
RegistrationInfo |
getRegistrationInfo(ComponentName name)
Gets the component if there is one having the given name.
|
Collection<RegistrationInfo> |
getRegistrations()
Gets the registered components.
|
<T> T |
getService(Class<T> serviceClass)
Gets the service of type serviceClass if such a service was declared by a
resolved runtime component.
|
String[] |
getServices()
Get the list of all registered service names
An empty array is returned if no registered services are found.
|
boolean |
isRegistered(ComponentName name)
Checks whether or not a component with the given name was registered.
|
void |
register(RegistrationInfo ri)
Handles the registration of the given registration info.
|
void |
removeComponentListener(ComponentListener listener)
Removes a component listener.
|
void |
setBlacklist(Set<String> blacklist) |
void |
shutdown()
Shuts down the component registry.
|
int |
size()
Gets the number of registered objects in this registry.
|
void |
unregister(ComponentName name)
Unregisters a component given its name.
|
void |
unregister(RegistrationInfo ri)
Handles the unregistration of the given registration info.
|
void addComponentListener(ComponentListener listener)
Does nothing if the given listener is already registered.
listener
- the component listener to addvoid removeComponentListener(ComponentListener listener)
Does nothing if the given listener is not registered.
listener
- the component listener to removevoid register(RegistrationInfo ri)
This is called by the main registry when all dependencies of this registration info were solved and the object can be registered.
If true is returned, the object will be added to the main registry under the name given in RegistrationInfo.
ri
- the registration infovoid unregister(RegistrationInfo ri)
This is called by the main registry when the object is unregistered.
If true is returned, the object will be removed from the main registry.
ri
- the registration infovoid unregister(ComponentName name)
name
- the component nameRegistrationInfo getRegistrationInfo(ComponentName name)
name
- the component nameComponentInstance getComponent(ComponentName name)
name
- the object nameboolean isRegistered(ComponentName name)
name
- the object nameCollection<RegistrationInfo> getRegistrations()
Map<ComponentName,Set<ComponentName>> getPendingRegistrations()
Collection<ComponentName> getActivatingRegistrations()
int size()
void shutdown()
This unregisters all objects registered in this registry.
<T> T getService(Class<T> serviceClass)
If the component is not yet activated it will be prior to return the service.
T
- the service typeserviceClass
- the service classString[] getServices()
ComponentInstance getComponentProvidingService(Class<?> serviceClass)
serviceClass
- the service classCopyright © 2013 Nuxeo SA. All Rights Reserved.