org.apache.aries.jndi
Class Utils

java.lang.Object
  extended by org.apache.aries.jndi.Utils

public final class Utils
extends Object


Field Summary
static org.apache.aries.util.nls.MessageUtil MESSAGES
           
static Comparator<org.osgi.framework.ServiceReference> SERVICE_REFERENCE_COMPARATOR
           
 
Method Summary
static void augmentEnvironment(Hashtable<?,?> environment)
           
static
<T> T
doPrivileged(PrivilegedExceptionAction<T> action)
           
static
<T> T
doPrivilegedNaming(PrivilegedExceptionAction<T> action)
           
static org.osgi.framework.BundleContext getBundleContext(Map<?,?> env, Class<?> namingClass)
           
static org.osgi.framework.ServiceReference[] getReferencesPrivileged(org.osgi.framework.BundleContext ctx, Class<?> clazz)
           
static Object getServicePrivileged(org.osgi.framework.BundleContext ctx, org.osgi.framework.ServiceReference ref)
           
static String getSystemProperty(String key, String defaultValue)
           
static Hashtable<?,?> toHashtable(Map<?,?> map)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Method Detail

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.