|
||||||||||
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,
java.lang.String name,
java.lang.Class<?> componentClass)
|
Method Summary | |
---|---|
protected int |
addAspectJAdvisors(org.springframework.aop.framework.Advised advised,
java.lang.Object bean)
|
void |
addBusinessInterface(java.lang.Class<?> businessInterface)
Add a business interface for the singleton. |
protected void |
addComponentContractInterceptors(org.springframework.aop.framework.ProxyFactory pf)
Add interceptors that apply the component contract--such as EJB transaction behaviour. |
protected void |
addJeeInterceptors(org.springframework.aop.framework.Advised advised,
java.util.List<InterceptorMetadata> interceptorMetadata,
java.util.Map<java.lang.Class,java.lang.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(org.springframework.aop.framework.Advised advised,
java.lang.Object bean,
java.util.Map<java.lang.Class,java.lang.Object> interceptorInstancesForClass)
Add EJB3 style interceptors to this singleton instance |
protected void |
addSelfInterceptor(org.springframework.aop.framework.Advised advised,
java.lang.Object bean)
Add an interceptor definition for the singleton/bean itself. |
protected int |
addSpringAopAdvisors(org.springframework.aop.framework.Advised pf,
java.lang.Object bean)
|
protected void |
addSuperInterceptors(org.springframework.aop.framework.Advised advised,
java.lang.Object baseInterceptorInstance,
JeeInterceptorPointcutAdvisor baseInterceptorPointcutAdvisor)
|
java.lang.Object |
createProxyIfNecessary(java.lang.Object target)
Use Spring AOP to create a proxy invoking the JEE-style interceptors and any Spring-style interceptors. |
java.lang.Object |
createProxyIfNecessary(java.lang.Object target,
java.util.Map<java.lang.Class,java.lang.Object> interceptorInstancesForClass)
Use Spring AOP to create a proxy invoking the JEE-style interceptors and any Spring-style interceptors. |
protected void |
customizeProxyConfig(org.springframework.aop.framework.ProxyFactory pf)
Perform optional customization of ProxyFactory before use |
protected java.util.List<java.lang.reflect.Method> |
findSuperAroundInvokes(java.lang.Class clazz)
|
java.util.List<java.lang.Class<?>> |
getBusinessInterfaces()
|
java.util.Map<java.lang.reflect.Method,InterceptionMetadata.InterceptorExclusion> |
getExclusion()
|
java.util.List<InterceptorMetadata> |
getInterceptorMetadata()
Return the interceptors that apply to the given component. |
java.util.List<InterceptorMetadata> |
getInterceptorOrder(java.lang.Object object)
|
void |
invokeLifecycleMethods(java.lang.Object bean,
LifecycleEvent le)
Override superclass method to invoke all interceptors in the chain if they listen to this method |
protected void |
invokePostConstructAndRegisterShutdownHook(java.lang.Object instance)
|
protected boolean |
isExcludedAsBusinessInterfaceOnAutodetect(java.lang.Class<?> potentialBusinessInterface)
Subclasses can override this to exclude further business interfaces |
void |
registerInterceptorMetadata(InterceptorMetadata im)
Add interceptor metadata. |
void |
registerInterceptorOrder(InterceptorMetadata im,
java.lang.Object object)
|
void |
setComponentContext(org.springframework.context.ApplicationContext componentContext,
org.springframework.beans.factory.support.BeanDefinitionRegistry bdr)
Set the application context for the superclass and for the inner interceptorMetadata. |
void |
setExcludeClassInterceptors(java.lang.reflect.Method method)
|
void |
setExcludeDefaultInterceptors(java.lang.reflect.Method method)
|
void |
setSelfInterceptorMethod(java.lang.reflect.Method selfInterceptorMethod)
Set the self interceptor method for this component |
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, java.lang.String name, java.lang.Class<?> componentClass)
Method Detail |
---|
public void setComponentContext(org.springframework.context.ApplicationContext componentContext, org.springframework.beans.factory.support.BeanDefinitionRegistry bdr)
setComponentContext
in class Jsr250Metadata
protected void invokePostConstructAndRegisterShutdownHook(java.lang.Object instance)
invokePostConstructAndRegisterShutdownHook
in class Jsr250Metadata
public void setSelfInterceptorMethod(java.lang.reflect.Method selfInterceptorMethod)
selfInterceptorMethod
- the self interceptor method for this componentpublic void addBusinessInterface(java.lang.Class<?> businessInterface)
businessInterface
- business interface to addpublic void setExcludeClassInterceptors(java.lang.reflect.Method method)
public void setExcludeDefaultInterceptors(java.lang.reflect.Method method)
public void registerInterceptorMetadata(InterceptorMetadata im)
im
- interceptormatchingMethod
- method to match onpublic java.util.List<InterceptorMetadata> getInterceptorMetadata()
public void registerInterceptorOrder(InterceptorMetadata im, java.lang.Object object)
public java.util.List<InterceptorMetadata> getInterceptorOrder(java.lang.Object object)
public java.util.List<java.lang.Class<?>> getBusinessInterfaces()
protected boolean isExcludedAsBusinessInterfaceOnAutodetect(java.lang.Class<?> potentialBusinessInterface)
potentialBusinessInterface
- candidate interface
public java.lang.Object createProxyIfNecessary(java.lang.Object target)
instance
- the singleton instance to wrap in a proxy
public java.lang.Object createProxyIfNecessary(java.lang.Object target, java.util.Map<java.lang.Class,java.lang.Object> interceptorInstancesForClass)
instance
- the singleton instance to wrap in a proxyinterceptorInstancesForClass
- map from interceptor class to instance of JEE interceptors
protected void addComponentContractInterceptors(org.springframework.aop.framework.ProxyFactory pf)
pf
- ProxyFactory used to create proxyprotected void customizeProxyConfig(org.springframework.aop.framework.ProxyFactory pf)
pf
- public void invokeLifecycleMethods(java.lang.Object bean, LifecycleEvent le)
invokeLifecycleMethods
in class Jsr250Metadata
singleton
- normally a proxyle
- lifecycle eventprotected void addJeeInterceptors(org.springframework.aop.framework.Advised advised, java.lang.Object bean, java.util.Map<java.lang.Class,java.lang.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(org.springframework.aop.framework.Advised advised, java.util.List<InterceptorMetadata> interceptorMetadata, java.util.Map<java.lang.Class,java.lang.Object> interceptorInstancesForClass, boolean isInterceptorOrder)
advised
- interceptorMetadata
- interceptorInstancesForClass
- protected void addSuperInterceptors(org.springframework.aop.framework.Advised advised, java.lang.Object baseInterceptorInstance, JeeInterceptorPointcutAdvisor baseInterceptorPointcutAdvisor)
protected java.util.List<java.lang.reflect.Method> findSuperAroundInvokes(java.lang.Class clazz)
protected void addSelfInterceptor(org.springframework.aop.framework.Advised advised, java.lang.Object bean)
advised
- AOP proxy control interfacesingleton
- target instance that contains an around invoke methodprotected int addSpringAopAdvisors(org.springframework.aop.framework.Advised pf, java.lang.Object bean)
protected int addAspectJAdvisors(org.springframework.aop.framework.Advised advised, java.lang.Object bean)
public java.util.Map<java.lang.reflect.Method,InterceptionMetadata.InterceptorExclusion> getExclusion()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |