org.apache.servicemix.naming
Class OSGiInitialContextFactoryBuilder

java.lang.Object
  extended by org.osgi.util.tracker.ServiceTracker
      extended by org.apache.servicemix.naming.OSGiInitialContextFactoryBuilder
All Implemented Interfaces:
InitialContextFactory, InitialContextFactoryBuilder, org.osgi.util.tracker.ServiceTrackerCustomizer

public class OSGiInitialContextFactoryBuilder
extends org.osgi.util.tracker.ServiceTracker
implements InitialContextFactoryBuilder, InitialContextFactory

An InitialContextFactoryBuilder which delegates to any InitialContextFactoryBuilder found in the OSGi registry.


Field Summary
 
Fields inherited from class org.osgi.util.tracker.ServiceTracker
context, filter
 
Constructor Summary
OSGiInitialContextFactoryBuilder(org.osgi.framework.BundleContext bundleContext, Context osgiContext)
           
 
Method Summary
 Context createContext(Hashtable<?,?> env)
          This method was borrowed from Aries.
 InitialContextFactory createInitialContextFactory(Hashtable<?,?> environment)
           
 void destroy()
           
 Context getInitialContext(Hashtable<?,?> environment)
           
 
Methods inherited from class org.osgi.util.tracker.ServiceTracker
addingService, close, getService, getService, getServiceReference, getServiceReferences, getServices, getTrackingCount, modifiedService, open, open, remove, removedService, size, waitForService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OSGiInitialContextFactoryBuilder

public OSGiInitialContextFactoryBuilder(org.osgi.framework.BundleContext bundleContext,
                                        Context osgiContext)
                                 throws NamingException
Throws:
NamingException
Method Detail

destroy

public void destroy()

createInitialContextFactory

public InitialContextFactory createInitialContextFactory(Hashtable<?,?> environment)
                                                  throws NamingException
Specified by:
createInitialContextFactory in interface InitialContextFactoryBuilder
Throws:
NamingException

getInitialContext

public Context getInitialContext(Hashtable<?,?> environment)
                          throws NamingException
Specified by:
getInitialContext in interface InitialContextFactory
Throws:
NamingException

createContext

public Context createContext(Hashtable<?,?> env)
                      throws NamingException
This method was borrowed from Aries. Will eventually be replaced by Aries impl.

Parameters:
env -
Returns:
Throws:
NamingException


Copyright © 2005-2012 FuseSource. All Rights Reserved.