org.apache.aries.jndi
Class Utils
java.lang.Object
org.apache.aries.jndi.Utils
public final class Utils
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SERVICE_REFERENCE_COMPARATOR
public static final Comparator<org.osgi.framework.ServiceReference> SERVICE_REFERENCE_COMPARATOR
MESSAGES
public static final org.apache.aries.util.nls.MessageUtil MESSAGES
getBundleContext
public static org.osgi.framework.BundleContext getBundleContext(Map<?,?> env,
Class<?> namingClass)
- Parameters:
env
-
- Returns:
- the bundle context for the caller.
- Throws:
NamingException
getSystemProperty
public static String getSystemProperty(String key,
String defaultValue)
toHashtable
public static Hashtable<?,?> toHashtable(Map<?,?> map)
doPrivileged
public static <T> T doPrivileged(PrivilegedExceptionAction<T> action)
throws Exception
- Throws:
Exception
doPrivilegedNaming
public static <T> T doPrivilegedNaming(PrivilegedExceptionAction<T> action)
throws NamingException
- Throws:
NamingException
getReferencesPrivileged
public static org.osgi.framework.ServiceReference[] getReferencesPrivileged(org.osgi.framework.BundleContext ctx,
Class<?> clazz)
getServicePrivileged
public static Object getServicePrivileged(org.osgi.framework.BundleContext ctx,
org.osgi.framework.ServiceReference ref)
augmentEnvironment
public static void augmentEnvironment(Hashtable<?,?> environment)
Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.