public class PrivilegingInvoker<T> extends DelegatingInvoker<T>
Invoker that creates for the invoked method a
PrivilegedExceptionAction and runs this action with the provided
ActionExecutor.| Modifier and Type | Field and Description |
|---|---|
private ActionExecutor |
executor |
private static long |
serialVersionUID |
| Constructor and Description |
|---|
PrivilegingInvoker(ProxyFactory proxyFactory,
ObjectReference<T> delegateReference,
ActionExecutor executor)
Construct the invoker.
|
PrivilegingInvoker(T delegate)
Construct the invoker using a
AccessControllerExecutor. |
PrivilegingInvoker(T delegate,
ActionExecutor executor)
Construct the invoker.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Object |
invokeOnDelegate(java.lang.reflect.Method method,
java.lang.Object[] args)
Invoke the given method on the delegate.
|
delegate, equals, getDelegateReference, getMethodToInvoke, getProxyFactory, hashCode, invokeprivate static final long serialVersionUID
private final ActionExecutor executor
public PrivilegingInvoker(ProxyFactory proxyFactory, ObjectReference<T> delegateReference, ActionExecutor executor)
proxyFactory - the proxy factory used to create the proxydelegateReference - the reference object managing the delegate for the callexecutor - the executor of the PrivilegedExceptionActionpublic PrivilegingInvoker(T delegate, ActionExecutor executor)
delegate - the delegate for the callexecutor - the executor of the PrivilegedExceptionActionpublic PrivilegingInvoker(T delegate)
AccessControllerExecutor.delegate - the delegate for the callprotected java.lang.Object invokeOnDelegate(java.lang.reflect.Method method,
java.lang.Object[] args)
throws java.lang.reflect.InvocationTargetException
DelegatingInvokerinvokeOnDelegate in class DelegatingInvoker<T>method - the method to invokeargs - the arguments for the invocationjava.lang.reflect.InvocationTargetException - if the invoked method throws any exception