Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.gemini.blueprint.extender.internal.util
Class PrivilegedUtils

    java.lang.Object
      org.eclipse.gemini.blueprint.extender.internal.util.PrivilegedUtils

    public abstract class PrivilegedUtils

extends Object

Utility class for commons actions used within PrivilegedBlocks.

Author:
  Costin Leau

Nested Class Summary
`static interface` | `PrivilegedUtils.UnprivilegedExecution<T>`
`static interface` | `PrivilegedUtils.UnprivilegedThrowableExecution<T>`

Constructor Summary
`PrivilegedUtils()`

Method Summary
`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.
`static
`<T> T`
` | `executeWithCustomTCCL(ClassLoader customClassLoader, PrivilegedUtils.UnprivilegedThrowableExecution<T> execution)` Temporarily changes the TCCL to the given one for the duration of the given execution.
`static ClassLoader` | `getTCCL()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PrivilegedUtils

    public PrivilegedUtils()

Method Detail

### 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2012. All Rights Reserved.