class ManagedFactoryDisposableInvoker
extends java.lang.Object
DestructionAwareBeanPostProcessor, due to the
order of the callbacks invocations and the overlap, an adapter becomes a
better choice.DisposableBean| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
ManagedFactoryDisposableInvoker.DestructionCodes |
| Modifier and Type | Field and Description |
|---|---|
private java.lang.reflect.Method |
customOsgiDestructionMethod |
private java.lang.reflect.Method |
customSpringMethod |
private java.lang.Object[] |
customSpringMethodArgs |
private boolean |
isDisposable |
private static org.apache.commons.logging.Log |
log
logger
|
| Constructor and Description |
|---|
ManagedFactoryDisposableInvoker(java.lang.Class<?> beanClass,
java.lang.String methodName)
Constructs a new
ManagedFactoryDisposableAdapter instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy(java.lang.String beanName,
java.lang.Object beanInstance,
ManagedFactoryDisposableInvoker.DestructionCodes code) |
private java.lang.reflect.Method |
detectCustomOsgiMethod(java.lang.Class<?> beanClass,
java.lang.String methodName) |
private java.lang.reflect.Method |
detectCustomSpringMethod(java.lang.Class<?> beanClass,
java.lang.String methodName) |
private void |
invokeCustomMethod(java.lang.String targetName,
java.lang.Object target) |
private void |
invokeCustomMethod(java.lang.String targetName,
java.lang.Object target,
ManagedFactoryDisposableInvoker.DestructionCodes code) |
private void |
invokeMethod(java.lang.reflect.Method method,
java.lang.Object[] args,
java.lang.String targetName,
java.lang.Object target) |
private static final org.apache.commons.logging.Log log
private final boolean isDisposable
private final java.lang.reflect.Method customSpringMethod
private final java.lang.Object[] customSpringMethodArgs
private final java.lang.reflect.Method customOsgiDestructionMethod
public ManagedFactoryDisposableInvoker(java.lang.Class<?> beanClass,
java.lang.String methodName)
ManagedFactoryDisposableAdapter instance.methodName - destruction method nameprivate java.lang.reflect.Method detectCustomSpringMethod(java.lang.Class<?> beanClass,
java.lang.String methodName)
private java.lang.reflect.Method detectCustomOsgiMethod(java.lang.Class<?> beanClass,
java.lang.String methodName)
public void destroy(java.lang.String beanName,
java.lang.Object beanInstance,
ManagedFactoryDisposableInvoker.DestructionCodes code)
private void invokeCustomMethod(java.lang.String targetName,
java.lang.Object target)
private void invokeCustomMethod(java.lang.String targetName,
java.lang.Object target,
ManagedFactoryDisposableInvoker.DestructionCodes code)
private void invokeMethod(java.lang.reflect.Method method,
java.lang.Object[] args,
java.lang.String targetName,
java.lang.Object target)