public class StandardControllerServiceInvocationHandler extends Object implements ControllerServiceInvocationHandler
| Modifier and Type | Class and Description |
|---|---|
private class |
StandardControllerServiceInvocationHandler.ProxiedReturnObjectInvocationHandler |
| Modifier and Type | Field and Description |
|---|---|
private ExtensionManager |
extensionManager |
private static org.slf4j.Logger |
logger |
private ControllerService |
originalService |
private static Method |
PROXY_WRAPPER_GET_WRAPPED_METHOD |
private AtomicReference<ControllerServiceNode> |
serviceNodeHolder |
private static Set<Method> |
validDisabledMethods |
| Constructor and Description |
|---|
StandardControllerServiceInvocationHandler(ExtensionManager extensionManager,
ControllerService originalService) |
StandardControllerServiceInvocationHandler(ExtensionManager extensionManager,
ControllerService originalService,
ControllerServiceNode serviceNode) |
| Modifier and Type | Method and Description |
|---|---|
private boolean |
containsWrappedProxy(Object[] values) |
Object |
invoke(Object proxy,
Method method,
Object[] args) |
private Object |
invoke(Object bareObject,
Method method,
Object[] args,
ClassLoader bareObjectClassLoader,
ClassLoader callerClassLoader) |
private boolean |
isInHierarchy(ClassLoader objectClassLoader,
ClassLoader classLoaderHierarchy) |
private boolean |
isWrappedProxy(Object value) |
private Object |
proxy(Object bareObject,
Class<?> declaredType) |
void |
setServiceNode(ControllerServiceNode serviceNode) |
private Object |
unwrap(Object value,
ClassLoader expectedClassLoader,
Method method) |
private Object[] |
unwrapProxies(Object[] values,
ClassLoader expectedClassLoader,
Method method) |
private static final org.slf4j.Logger logger
private static final Method PROXY_WRAPPER_GET_WRAPPED_METHOD
private final ControllerService originalService
private final AtomicReference<ControllerServiceNode> serviceNodeHolder
private final ExtensionManager extensionManager
public StandardControllerServiceInvocationHandler(ExtensionManager extensionManager, ControllerService originalService)
originalService - the original service being proxiedpublic StandardControllerServiceInvocationHandler(ExtensionManager extensionManager, ControllerService originalService, ControllerServiceNode serviceNode)
originalService - the original service being proxiedserviceNode - the node holding the original service which will be used for checking the state (disabled vs running)public void setServiceNode(ControllerServiceNode serviceNode)
setServiceNode in interface ControllerServiceInvocationHandlerpublic Object invoke(Object proxy, Method method, Object[] args) throws Throwable
invoke in interface InvocationHandlerThrowableprivate boolean isInHierarchy(ClassLoader objectClassLoader, ClassLoader classLoaderHierarchy)
private Object[] unwrapProxies(Object[] values, ClassLoader expectedClassLoader, Method method)
private Object unwrap(Object value, ClassLoader expectedClassLoader, Method method)
private boolean containsWrappedProxy(Object[] values)
private boolean isWrappedProxy(Object value)
private Object invoke(Object bareObject, Method method, Object[] args, ClassLoader bareObjectClassLoader, ClassLoader callerClassLoader) throws IllegalAccessException, InvocationTargetException
Copyright © 2021 Apache NiFi Project. All rights reserved.