| Modifier and Type | Method and Description |
|---|---|
static <T> T |
callAs(Subject subject,
Callable<T> action)
Maps to Subject.callAs() if available, otherwise maps to Subject.doAs()
|
static Subject |
currentSubject()
Maps to Subject.currect() is available, otherwise maps to Subject.getSubject()
|
static <T> T |
doPrivileged(PrivilegedAction<T> action)
Maps to AccessController#doPrivileged if available, otherwise returns action.run().
|
public static <T> T doPrivileged(PrivilegedAction<T> action)
T - the type of the resultaction - the action to runpublic static <T> T callAs(Subject subject, Callable<T> action) throws CompletionException
T - the type of the resultsubject - the subject this action runs asaction - the action to runCompletionExceptionpublic static Subject currentSubject()
Copyright © 2012-2025 Apache Software Foundation. All Rights Reserved.