|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.jee.inject.Jsr250Metadata
org.springframework.jee.intercept.InterceptionMetadata
public class InterceptionMetadata
Class representing metadata for a component that may have interceptors as per the JEE (EJB 3.0) interception specification. Attached to a Spring singleton definition.
| Nested Class Summary | |
|---|---|
static class |
InterceptionMetadata.InterceptorExclusion
Class representing the exclusion of class or default interceptors from a particular method |
| Field Summary |
|---|
| Fields inherited from class org.springframework.jee.inject.Jsr250Metadata |
|---|
KEY |
| Constructor Summary | |
|---|---|
InterceptionMetadata(DeploymentUnitMetadata dum,
String name,
Class<?> componentClass)
|
|
| Method Summary | |
|---|---|
protected int |
addAspectJAdvisors(Advised advised,
Object bean)
|
void |
addBeanControlInterfaceMethod(Method method)
|
void |
addBusinessInterface(Class<?> businessInterface)
Add a business interface for the singleton. |
protected void |
addComponentContractInterceptors(ProxyFactory pf,
Object target,
Map<Class,Object> interceptorInstancesForClass)
Add interceptors that apply the component contract--such as EJB transaction behaviour. |
protected void |
addJeeInterceptors(Advised advised,
List<InterceptorMetadata> interceptorMetadata,
Map<Class,Object> interceptorInstancesForClass,
boolean isInterceptorOrder)
Parses the interceptor metadata list, creates Spring pointcut advisors based on it and adds it to the given advised object. |
protected void |
addJeeInterceptors(Advised advised,
Object bean,
Map<Class,Object> interceptorInstancesForClass)
Add EJB3 style interceptors to this singleton instance |
protected void |
addSelfInterceptor(Advised advised,
Object bean)
Add an interceptor definition for the singleton/bean itself. |
protected int |
addSpringAopAdvisors(Advised pf,
Object bean)
|
protected void |
addSuperInterceptors(Advised advised,
Object baseInterceptorInstance,
List<Method> superAroundInvokeMethods,
JeeInterceptorPointcutAdvisor baseInterceptorPointcutAdvisor)
|
Object |
createProxyIfNecessary(Object target)
Use Spring AOP to create a proxy invoking the JEE-style interceptors and any Spring-style interceptors. |
Object |
createProxyIfNecessary(Object target,
Map<Class,Object> interceptorInstancesForClass)
Use Spring AOP to create a proxy invoking the JEE-style interceptors and any Spring-style interceptors. |
protected void |
customizeProxyConfig(ProxyFactory pf)
Perform optional customization of ProxyFactory before use |
List<Class<?>> |
findBusinessInterfacesFromClassOrAnnotation(Class<?> clazz)
|
Class |
getBeanControlInterface()
|
Set<Method> |
getBeanControlInterfaceMethods()
|
List<Class<?>> |
getBusinessInterfaces()
|
Map<Object,InterceptionMetadata.InterceptorExclusion> |
getExclusion()
|
List<InterceptorMetadata> |
getInterceptorMetadata()
Return the interceptors that apply to the given component. |
List<InterceptorMetadata> |
getInterceptorOrder(Object object)
|
void |
invokeLifecycleMethods(Object bean,
LifecycleEvent le)
Override superclass method to invoke all interceptors in the chain if they listen to this method |
protected void |
invokePostConstructAndRegisterShutdownHook(Object instance)
|
protected boolean |
isExcludedAsBusinessInterfaceOnAutodetect(Class<?> potentialBusinessInterface)
Subclasses can override this to exclude further business interfaces |
void |
registerInterceptorMetadata(InterceptorMetadata im)
Add interceptor metadata. |
void |
registerInterceptorOrder(InterceptorMetadata im,
Object object)
|
void |
registerSelfInterceptorMethod(Method selfInterceptorMethod)
Set the self interceptor method for this component |
void |
setBeanControlInterface(Class beanControlInterface)
|
void |
setBeanControlInterfaceMethods(Set<Method> beanControlInterfaceMethods)
|
void |
setComponentContext(ApplicationContext componentContext,
BeanDefinitionRegistry bdr)
Set the application context for the superclass and for the inner interceptorMetadata. |
void |
setExcludeClassInterceptors(Object methodOrClass)
|
void |
setExcludeDefaultInterceptors(Object methodOrClass)
|
| Methods inherited from class org.springframework.jee.inject.Jsr250Metadata |
|---|
addInjection, applyInjections, getBeanDefinition, getBeanDefinitionRegistry, getComponentClass, getComponentContext, getComponentName, getDeploymentUnitMetadata, getInjections, getLifecycleEventCallbackMethod, getUniqueInstanceOfType, inject, injectAndPostConstruct, invokeLifecycleMethod, invokeLifecycleMethod, refresh, registerLifecycleEventCallbackMethod, resolve, resolveByType, setBeanDefinition, setComponentContext, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public InterceptionMetadata(DeploymentUnitMetadata dum,
String name,
Class<?> componentClass)
| Method Detail |
|---|
public void setComponentContext(ApplicationContext componentContext,
BeanDefinitionRegistry bdr)
setComponentContext in class Jsr250Metadataprotected void invokePostConstructAndRegisterShutdownHook(Object instance)
invokePostConstructAndRegisterShutdownHook in class Jsr250Metadatapublic void registerSelfInterceptorMethod(Method selfInterceptorMethod)
selfInterceptorMethod - the self interceptor method for this componentpublic void setBeanControlInterface(Class beanControlInterface)
public Class getBeanControlInterface()
public void setBeanControlInterfaceMethods(Set<Method> beanControlInterfaceMethods)
public void addBeanControlInterfaceMethod(Method method)
public Set<Method> getBeanControlInterfaceMethods()
public void setExcludeClassInterceptors(Object methodOrClass)
public void setExcludeDefaultInterceptors(Object methodOrClass)
public Map<Object,InterceptionMetadata.InterceptorExclusion> getExclusion()
public void registerInterceptorMetadata(InterceptorMetadata im)
im - interceptormatchingMethod - method to match onpublic List<InterceptorMetadata> getInterceptorMetadata()
public void registerInterceptorOrder(InterceptorMetadata im,
Object object)
public List<InterceptorMetadata> getInterceptorOrder(Object object)
public void addBusinessInterface(Class<?> businessInterface)
businessInterface - business interface to addpublic List<Class<?>> getBusinessInterfaces()
public List<Class<?>> findBusinessInterfacesFromClassOrAnnotation(Class<?> clazz)
protected boolean isExcludedAsBusinessInterfaceOnAutodetect(Class<?> potentialBusinessInterface)
potentialBusinessInterface - candidate interface
public Object createProxyIfNecessary(Object target)
instance - the singleton instance to wrap in a proxy
public Object createProxyIfNecessary(Object target,
Map<Class,Object> interceptorInstancesForClass)
instance - the singleton instance to wrap in a proxyinterceptorInstancesForClass - map from interceptor class to instance of JEE interceptors
protected void addComponentContractInterceptors(ProxyFactory pf,
Object target,
Map<Class,Object> interceptorInstancesForClass)
pf - ProxyFactory used to create proxyprotected void customizeProxyConfig(ProxyFactory pf)
pf -
public void invokeLifecycleMethods(Object bean,
LifecycleEvent le)
invokeLifecycleMethods in class Jsr250Metadatasingleton - normally a proxyle - lifecycle event
protected void addJeeInterceptors(Advised advised,
Object bean,
Map<Class,Object> interceptorInstancesForClass)
advised - Spring AOP proxy control interfacesingleton - new JEE component instance being advised (intercepted)interceptorInstancesForClass - map from interceptor class to interceptor instance. Used to
ensure that we have only one instance of each interceptor
class, as per Core Contract specification 11.7.
protected void addJeeInterceptors(Advised advised,
List<InterceptorMetadata> interceptorMetadata,
Map<Class,Object> interceptorInstancesForClass,
boolean isInterceptorOrder)
advised - interceptorMetadata - interceptorInstancesForClass -
protected void addSuperInterceptors(Advised advised,
Object baseInterceptorInstance,
List<Method> superAroundInvokeMethods,
JeeInterceptorPointcutAdvisor baseInterceptorPointcutAdvisor)
protected void addSelfInterceptor(Advised advised,
Object bean)
advised - AOP proxy control interfacesingleton - target instance that contains an around invoke method
protected int addSpringAopAdvisors(Advised pf,
Object bean)
protected int addAspectJAdvisors(Advised advised,
Object bean)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||