org.apache.aries.jndi
Class ContextHelper
java.lang.Object
org.apache.aries.jndi.ContextHelper
public final class ContextHelper
- extends Object
Provides helper methods for the DelegateContext. This provides the methods so
there can be many DelegateContexts, but few service trackers.
Method Summary |
static ContextProvider |
createURLContext(org.osgi.framework.BundleContext context,
String urlScheme,
Hashtable<?,?> env)
This method is used to create a URL Context. |
static ContextProvider |
getContextProvider(org.osgi.framework.BundleContext context,
Hashtable<?,?> environment)
|
static Context |
getInitialContext(org.osgi.framework.BundleContext context,
Hashtable<?,?> environment)
|
static org.apache.aries.util.service.registry.ServicePair<ObjectFactory> |
getURLObjectFactory(org.osgi.framework.BundleContext ctx,
String urlScheme,
Hashtable<?,?> environment)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
createURLContext
public static ContextProvider createURLContext(org.osgi.framework.BundleContext context,
String urlScheme,
Hashtable<?,?> env)
throws NamingException
- This method is used to create a URL Context. It does this by looking for
the URL context's ObjectFactory in the service registry.
- Parameters:
context
- urlScheme
- env
-
- Returns:
- a Context
- Throws:
NamingException
getURLObjectFactory
public static final org.apache.aries.util.service.registry.ServicePair<ObjectFactory> getURLObjectFactory(org.osgi.framework.BundleContext ctx,
String urlScheme,
Hashtable<?,?> environment)
throws NamingException
- Throws:
NamingException
getInitialContext
public static Context getInitialContext(org.osgi.framework.BundleContext context,
Hashtable<?,?> environment)
throws NamingException
- Throws:
NamingException
getContextProvider
public static ContextProvider getContextProvider(org.osgi.framework.BundleContext context,
Hashtable<?,?> environment)
throws NamingException
- Throws:
NamingException
Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.