public class PrivilegingInvoker<T> extends DelegatingInvoker<T>
Invoker
that creates for the invoked method a
PrivilegedExceptionAction
and runs this action with the provided
ActionExecutor
.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 Object |
invokeOnDelegate(Method method,
Object[] args)
Invoke the given method on the delegate.
|
delegate, equals, getDelegateReference, getMethodToInvoke, getProxyFactory, hashCode, invoke
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 PrivilegedExceptionAction
public PrivilegingInvoker(T delegate, ActionExecutor executor)
delegate
- the delegate for the callexecutor
- the executor of the PrivilegedExceptionAction
public PrivilegingInvoker(T delegate)
AccessControllerExecutor
.delegate
- the delegate for the callprotected Object invokeOnDelegate(Method method, Object[] args) throws InvocationTargetException
DelegatingInvoker
invokeOnDelegate
in class DelegatingInvoker<T>
method
- the method to invokeargs
- the arguments for the invocationInvocationTargetException
- if the invoked method throws any exceptionCopyright © 2005–2015 Codehaus. All rights reserved.