|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.thoughtworks.proxy.toys.privilege.SubjectExecutor
public class SubjectExecutor
Execution of a PrivilegedExceptionAction
with a Subject
.
Constructor Summary | |
---|---|
SubjectExecutor(Subject subject)
Construct a SubjectExecutor that runs a PrivilegedExceptionAction with
the Subject.doAs(Subject, PrivilegedExceptionAction) method. |
|
SubjectExecutor(Subject subject,
AccessControlContext context)
Construct a SubjectExecutor that runs a PrivilegedExceptionAction with
the Subject.doAsPrivileged(Subject, PrivilegedExceptionAction, AccessControlContext) method. |
Method Summary | |
---|---|
Object |
execute(PrivilegedExceptionAction<Object> action)
Execute a PrivilegedExceptionAction . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SubjectExecutor(Subject subject)
PrivilegedExceptionAction
with
the Subject.doAs(Subject, PrivilegedExceptionAction)
method.
subject
- the subject used to run the methodspublic SubjectExecutor(Subject subject, AccessControlContext context)
PrivilegedExceptionAction
with
the Subject.doAsPrivileged(Subject, PrivilegedExceptionAction, AccessControlContext)
method.
subject
- the subject used to run the methodscontext
- the AccessControlContext
defining privileges for the subjectMethod Detail |
---|
public Object execute(PrivilegedExceptionAction<Object> action) throws PrivilegedActionException
ActionExecutor
PrivilegedExceptionAction
.
execute
in interface ActionExecutor
action
- the action to run
PrivilegedActionException
- if the execution of the action fails
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |