org.eclipse.gemini.blueprint.util.internal
Class PrivilegedUtils
java.lang.Object
org.eclipse.gemini.blueprint.util.internal.PrivilegedUtils
public abstract class PrivilegedUtils
- extends Object
Utility class for commons actions used within PrivilegedBlocks.
- Author:
- Costin Leau
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PrivilegedUtils
public PrivilegedUtils()
getTCCL
public static ClassLoader getTCCL()
executeWithCustomTCCL
public static <T> T executeWithCustomTCCL(ClassLoader customClassLoader,
PrivilegedUtils.UnprivilegedExecution<T> execution)
- Temporarily changes the TCCL to the given one for the duration of the given execution. All actions except the
execution are executed with privileged access.
Consider checking if there is a security manager in place before calling this method.
- Parameters:
customClassLoader
- execution
-
- Returns:
executeWithCustomTCCL
public static <T> T executeWithCustomTCCL(ClassLoader customClassLoader,
PrivilegedUtils.UnprivilegedThrowableExecution<T> execution)
throws Throwable
- Temporarily changes the TCCL to the given one for the duration of the given execution. All actions except the
execution are executed with privileged access.
Consider checking if there is a security manager in place before calling this method.
- Parameters:
customClassLoader
- execution
-
- Returns:
-
- Throws:
Throwable
Copyright © 2006-2012. All Rights Reserved.