public class BlueprintContainerImpl extends Object implements ExtendedBlueprintContainer, NamespaceHandlerRegistry.Listener, Runnable, SatisfiableRecipe.SatisfactionListener
Constructor and Description |
---|
BlueprintContainerImpl(org.osgi.framework.BundleContext bundleContext,
org.osgi.framework.Bundle extenderBundle,
BlueprintListener eventDispatcher,
NamespaceHandlerRegistry handlers,
ScheduledExecutorService executors,
List<Object> pathList) |
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
AccessControlContext |
getAccessControlContext() |
org.osgi.framework.BundleContext |
getBundleContext() |
ComponentDefinitionRegistryImpl |
getComponentDefinitionRegistry() |
Set<String> |
getComponentIds()
Returns the set of component ids managed by this Blueprint Container.
|
Object |
getComponentInstance(String id)
Return the component instance for the specified component id.
|
ComponentMetadata |
getComponentMetadata(String id)
Return the Component Metadata object for the component with the specified
component id.
|
Converter |
getConverter() |
BlueprintListener |
getEventDispatcher() |
org.osgi.framework.Bundle |
getExtenderBundle() |
<T extends ComponentMetadata> |
getMetadata(Class<T> clazz)
Return all
ComponentMetadata objects of the specified Component
Metadata type. |
<T extends Processor> |
getProcessors(Class<T> clazz) |
BlueprintRepository |
getRepository() |
Object |
getService(org.osgi.framework.ServiceReference reference) |
Class |
loadClass(String name) |
void |
namespaceHandlerRegistered(URI uri)
Called when a NamespaceHandler has been registered for the specified URI.
|
void |
namespaceHandlerUnregistered(URI uri)
Called when a NamespaceHandler has been unregistered for the specified URI.
|
void |
notifySatisfaction(SatisfiableRecipe satisfiable) |
protected void |
quiesce() |
org.osgi.framework.ServiceRegistration |
registerService(String[] classes,
Object service,
Dictionary properties) |
void |
reload() |
void |
run() |
void |
schedule() |
protected void |
unregisterServices() |
public BlueprintContainerImpl(org.osgi.framework.BundleContext bundleContext, org.osgi.framework.Bundle extenderBundle, BlueprintListener eventDispatcher, NamespaceHandlerRegistry handlers, ScheduledExecutorService executors, List<Object> pathList)
public org.osgi.framework.Bundle getExtenderBundle()
getExtenderBundle
in interface ExtendedBlueprintContainer
public <T extends Processor> List<T> getProcessors(Class<T> clazz)
getProcessors
in interface ExtendedBlueprintContainer
public BlueprintListener getEventDispatcher()
getEventDispatcher
in interface ExtendedBlueprintContainer
public void schedule()
public void reload()
reload
in interface ExtendedBlueprintContainer
public Class loadClass(String name) throws ClassNotFoundException
loadClass
in interface ExtendedBlueprintContainer
ClassNotFoundException
public org.osgi.framework.ServiceRegistration registerService(String[] classes, Object service, Dictionary properties)
registerService
in interface ExtendedBlueprintContainer
public Object getService(org.osgi.framework.ServiceReference reference)
getService
in interface ExtendedBlueprintContainer
public AccessControlContext getAccessControlContext()
getAccessControlContext
in interface ExtendedBlueprintContainer
public BlueprintRepository getRepository()
getRepository
in interface ExtendedBlueprintContainer
public void notifySatisfaction(SatisfiableRecipe satisfiable)
notifySatisfaction
in interface SatisfiableRecipe.SatisfactionListener
protected void unregisterServices()
public Set<String> getComponentIds()
BlueprintContainer
getComponentIds
in interface BlueprintContainer
public Object getComponentInstance(String id) throws NoSuchComponentException
BlueprintContainer
getComponentInstance
in interface BlueprintContainer
id
- The component id for the requested component instance.NoSuchComponentException
- If no component with the specified
component id is managed by this Blueprint Container.public ComponentMetadata getComponentMetadata(String id)
BlueprintContainer
getComponentMetadata
in interface BlueprintContainer
id
- The component id for the requested Component Metadata.public <T extends ComponentMetadata> Collection<T> getMetadata(Class<T> clazz)
BlueprintContainer
ComponentMetadata
objects of the specified Component
Metadata type. The supported Component Metadata types are
ComponentMetadata
(which returns the Component Metadata for all
defined manager types), BeanMetadata
,
ServiceReferenceMetadata
(which returns both
ReferenceMetadata
and ReferenceListMetadata
objects), and
ServiceMetadata
. The collection will include all Component
Metadata objects of the requested type, including components that are
declared inline.getMetadata
in interface BlueprintContainer
clazz
- The super type or type of the requested Component Metadata
objects.public Converter getConverter()
getConverter
in interface ExtendedBlueprintContainer
public ComponentDefinitionRegistryImpl getComponentDefinitionRegistry()
getComponentDefinitionRegistry
in interface ExtendedBlueprintContainer
public org.osgi.framework.BundleContext getBundleContext()
getBundleContext
in interface ExtendedBlueprintContainer
public void destroy()
protected void quiesce()
public void namespaceHandlerRegistered(URI uri)
NamespaceHandlerRegistry.Listener
namespaceHandlerRegistered
in interface NamespaceHandlerRegistry.Listener
uri
- the URI of the newly registered namespace handlerpublic void namespaceHandlerUnregistered(URI uri)
NamespaceHandlerRegistry.Listener
namespaceHandlerUnregistered
in interface NamespaceHandlerRegistry.Listener
uri
- the URI of the newly unregistered namespace handlerCopyright © 2012. All Rights Reserved.