org.apache.aries.blueprint.container
Class BlueprintContainerImpl

java.lang.Object
  extended by org.apache.aries.blueprint.container.BlueprintContainerImpl
All Implemented Interfaces:
Runnable, SatisfiableRecipe.SatisfactionListener, org.apache.aries.blueprint.parser.NamespaceHandlerSet.Listener, ExtendedBlueprintContainer, org.osgi.service.blueprint.container.BlueprintContainer

public class BlueprintContainerImpl
extends Object
implements ExtendedBlueprintContainer, org.apache.aries.blueprint.parser.NamespaceHandlerSet.Listener, Runnable, SatisfiableRecipe.SatisfactionListener, ExtendedBlueprintContainer

TODO: javadoc

Version:
$Rev: 1240203 $, $Date: 2012-02-03 14:56:58 +0000 (Fri, 03 Feb 2012) $

Constructor Summary
BlueprintContainerImpl(org.osgi.framework.BundleContext bundleContext, org.osgi.framework.Bundle extenderBundle, org.osgi.service.blueprint.container.BlueprintListener eventDispatcher, NamespaceHandlerRegistry handlers, ScheduledExecutorService executors, List<Object> pathList, org.apache.aries.proxy.ProxyManager proxyManager)
           
 
Method Summary
 void destroy()
           
 AccessControlContext getAccessControlContext()
           
 org.osgi.framework.BundleContext getBundleContext()
           
 org.apache.aries.blueprint.parser.ComponentDefinitionRegistryImpl getComponentDefinitionRegistry()
           
 Set<String> getComponentIds()
           
 Object getComponentInstance(String id)
           
 org.osgi.service.blueprint.reflect.ComponentMetadata getComponentMetadata(String id)
           
 org.osgi.service.blueprint.container.Converter getConverter()
           
 org.osgi.service.blueprint.container.BlueprintListener getEventDispatcher()
           
 org.osgi.framework.Bundle getExtenderBundle()
           
<T extends org.osgi.service.blueprint.reflect.ComponentMetadata>
Collection<T>
getMetadata(Class<T> clazz)
           
<T extends org.apache.aries.blueprint.Processor>
List<T>
getProcessors(Class<T> clazz)
           
 org.apache.aries.proxy.ProxyManager getProxyManager()
           
 BlueprintRepository getRepository()
          To be removed as internal API
 Object getService(org.osgi.framework.ServiceReference reference)
           
 void injectBeanInstance(org.osgi.service.blueprint.reflect.BeanMetadata bmd, Object o)
          Inject (or reinject) an Object instance with the blueprint properties defined by a BeanMetadata Throws IllegalArgumentException if the bean metadata does not exist in this blueprint container Throws ComponentDefinitionException if the injection process fails - this may have rendered the supplied Object unusable by partially completing the injection process
 Class loadClass(String name)
           
 void namespaceHandlerRegistered(URI uri)
           
 void namespaceHandlerUnregistered(URI 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()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlueprintContainerImpl

public BlueprintContainerImpl(org.osgi.framework.BundleContext bundleContext,
                              org.osgi.framework.Bundle extenderBundle,
                              org.osgi.service.blueprint.container.BlueprintListener eventDispatcher,
                              NamespaceHandlerRegistry handlers,
                              ScheduledExecutorService executors,
                              List<Object> pathList,
                              org.apache.aries.proxy.ProxyManager proxyManager)
Method Detail

getExtenderBundle

public org.osgi.framework.Bundle getExtenderBundle()
Specified by:
getExtenderBundle in interface ExtendedBlueprintContainer

getProxyManager

public org.apache.aries.proxy.ProxyManager getProxyManager()
Specified by:
getProxyManager in interface ExtendedBlueprintContainer

getProcessors

public <T extends org.apache.aries.blueprint.Processor> List<T> getProcessors(Class<T> clazz)
Specified by:
getProcessors in interface ExtendedBlueprintContainer

getEventDispatcher

public org.osgi.service.blueprint.container.BlueprintListener getEventDispatcher()
Specified by:
getEventDispatcher in interface ExtendedBlueprintContainer

schedule

public void schedule()

reload

public void reload()
Specified by:
reload in interface ExtendedBlueprintContainer

run

public void run()
Specified by:
run in interface Runnable

loadClass

public Class loadClass(String name)
                throws ClassNotFoundException
Specified by:
loadClass in interface ExtendedBlueprintContainer
Throws:
ClassNotFoundException

registerService

public org.osgi.framework.ServiceRegistration registerService(String[] classes,
                                                              Object service,
                                                              Dictionary properties)
Specified by:
registerService in interface ExtendedBlueprintContainer

getService

public Object getService(org.osgi.framework.ServiceReference reference)
Specified by:
getService in interface ExtendedBlueprintContainer

getAccessControlContext

public AccessControlContext getAccessControlContext()
Specified by:
getAccessControlContext in interface ExtendedBlueprintContainer

getRepository

public BlueprintRepository getRepository()
Description copied from interface: ExtendedBlueprintContainer
To be removed as internal API

Specified by:
getRepository in interface ExtendedBlueprintContainer

notifySatisfaction

public void notifySatisfaction(SatisfiableRecipe satisfiable)
Specified by:
notifySatisfaction in interface SatisfiableRecipe.SatisfactionListener

unregisterServices

protected void unregisterServices()

getComponentIds

public Set<String> getComponentIds()
Specified by:
getComponentIds in interface org.osgi.service.blueprint.container.BlueprintContainer

getComponentInstance

public Object getComponentInstance(String id)
                            throws org.osgi.service.blueprint.container.NoSuchComponentException
Specified by:
getComponentInstance in interface org.osgi.service.blueprint.container.BlueprintContainer
Throws:
org.osgi.service.blueprint.container.NoSuchComponentException

getComponentMetadata

public org.osgi.service.blueprint.reflect.ComponentMetadata getComponentMetadata(String id)
Specified by:
getComponentMetadata in interface org.osgi.service.blueprint.container.BlueprintContainer

getMetadata

public <T extends org.osgi.service.blueprint.reflect.ComponentMetadata> Collection<T> getMetadata(Class<T> clazz)
Specified by:
getMetadata in interface org.osgi.service.blueprint.container.BlueprintContainer

getConverter

public org.osgi.service.blueprint.container.Converter getConverter()
Specified by:
getConverter in interface ExtendedBlueprintContainer

getComponentDefinitionRegistry

public org.apache.aries.blueprint.parser.ComponentDefinitionRegistryImpl getComponentDefinitionRegistry()
Specified by:
getComponentDefinitionRegistry in interface ExtendedBlueprintContainer

getBundleContext

public org.osgi.framework.BundleContext getBundleContext()
Specified by:
getBundleContext in interface ExtendedBlueprintContainer

destroy

public void destroy()

quiesce

protected void quiesce()

namespaceHandlerRegistered

public void namespaceHandlerRegistered(URI uri)
Specified by:
namespaceHandlerRegistered in interface org.apache.aries.blueprint.parser.NamespaceHandlerSet.Listener

namespaceHandlerUnregistered

public void namespaceHandlerUnregistered(URI uri)
Specified by:
namespaceHandlerUnregistered in interface org.apache.aries.blueprint.parser.NamespaceHandlerSet.Listener

injectBeanInstance

public void injectBeanInstance(org.osgi.service.blueprint.reflect.BeanMetadata bmd,
                               Object o)
                        throws IllegalArgumentException,
                               org.osgi.service.blueprint.container.ComponentDefinitionException
Description copied from interface: ExtendedBlueprintContainer
Inject (or reinject) an Object instance with the blueprint properties defined by a BeanMetadata Throws IllegalArgumentException if the bean metadata does not exist in this blueprint container Throws ComponentDefinitionException if the injection process fails - this may have rendered the supplied Object unusable by partially completing the injection process

Specified by:
injectBeanInstance in interface ExtendedBlueprintContainer
Throws:
IllegalArgumentException
org.osgi.service.blueprint.container.ComponentDefinitionException


Copyright © 2009-2012 The Apache Software Foundation. All Rights Reserved.