org.springframework.jee.intercept
Class InterceptorMetadata

java.lang.Object
  extended by org.springframework.jee.inject.Jsr250Metadata
      extended by org.springframework.jee.intercept.InterceptorMetadata
All Implemented Interfaces:
Jsr250MetadataI, InterceptorMetadataI

public class InterceptorMetadata
extends Jsr250Metadata
implements InterceptorMetadataI

Class representing metadata about an interceptor class. Includes JSR-250 metadata that can drive injection and lifecycle callbacks, and identification of an around invoke method on the class. The latter information is often, but not necessarily, supplied using an annotation.

Author:
Rod Johnson

Field Summary
 
Fields inherited from class org.springframework.jee.inject.Jsr250Metadata
KEY, log
 
Constructor Summary
InterceptorMetadata(Class<?> componentClass, List<Method> aroundInvokeMethods)
          Construct new class level interceptor metadata with component name defaulting to the FQN of the component class
InterceptorMetadata(Class<?> componentClass, List<Method> aroundInvokeMethods, Method matchingMethod)
          Construct new interceptor metadata with component name defaulting to the FQN of the component class method level interceptor if (matchingMethod != null) class level interceptor if (matchingMethod == null)
InterceptorMetadata(Jsr250Metadata jsr250, List<Method> aroundInvokeMethods)
          Create a new Interceptor metadata for a self interceptor.
 
Method Summary
 List<Method> getAroundInvokeMethods()
           
 List<Method> getLifecycleEventListenerMethod(LifecycleEvent le)
          Return the invocation-context style method for this callback
 Method getMatchingMethod()
           
 boolean isClassInterceptor()
           
 boolean isDefaultInterceptor()
           
 void registerLifecycleEventListenerMethod(LifecycleEvent le, Method m)
           
 void setClassInterceptor(boolean classInterceptor)
           
 void setComponentContext(ApplicationContext beanFactoryForInstance, BeanDefinitionRegistry bdr)
           
 void setDefaultInterceptor(boolean defaultInterceptor)
           
 
Methods inherited from class org.springframework.jee.inject.Jsr250Metadata
addInjection, applyInjections, getBeanDefinition, getBeanDefinitionRegistry, getComponentClass, getComponentContext, getComponentName, getDeploymentUnitMetadata, getInjections, getLifecycleEventCallbackMethod, getUniqueInstanceOfType, inject, injectAndPostConstruct, invokeLifecycleMethod, invokeLifecycleMethod, invokeLifecycleMethods, invokePostConstructAndRegisterShutdownHook, refresh, registerLifecycleEventCallbackMethod, resolve, resolveByType, setBeanDefinition, setComponentContext, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.springframework.jee.interfaces.inject.Jsr250MetadataI
addInjection, getComponentClass, getComponentName, getDeploymentUnitMetadata, getInjections, getLifecycleEventCallbackMethod, inject, invokeLifecycleMethods, refresh, registerLifecycleEventCallbackMethod
 

Constructor Detail

InterceptorMetadata

public InterceptorMetadata(Class<?> componentClass,
                           List<Method> aroundInvokeMethods,
                           Method matchingMethod)
Construct new interceptor metadata with component name defaulting to the FQN of the component class method level interceptor if (matchingMethod != null) class level interceptor if (matchingMethod == null)

Parameters:
componentClass -
aroundInvokeMethod -
matchingMethod -

InterceptorMetadata

public InterceptorMetadata(Class<?> componentClass,
                           List<Method> aroundInvokeMethods)
Construct new class level interceptor metadata with component name defaulting to the FQN of the component class

Parameters:
componentClass -
aroundInvokeMethod -

InterceptorMetadata

public InterceptorMetadata(Jsr250Metadata jsr250,
                           List<Method> aroundInvokeMethods)
Create a new Interceptor metadata for a self interceptor. The component definition already exists.

Parameters:
jsr250 - Jsr250 metadata we should wrap
aroundInvokeMethod - aroundInvoke method to use on the instance
Method Detail

registerLifecycleEventListenerMethod

public void registerLifecycleEventListenerMethod(LifecycleEvent le,
                                                 Method m)
Specified by:
registerLifecycleEventListenerMethod in interface InterceptorMetadataI

getLifecycleEventListenerMethod

public List<Method> getLifecycleEventListenerMethod(LifecycleEvent le)
Return the invocation-context style method for this callback

Specified by:
getLifecycleEventListenerMethod in interface InterceptorMetadataI

getAroundInvokeMethods

public List<Method> getAroundInvokeMethods()
Specified by:
getAroundInvokeMethods in interface InterceptorMetadataI

getMatchingMethod

public Method getMatchingMethod()
Specified by:
getMatchingMethod in interface InterceptorMetadataI
Returns:
the method that this matches on, or null if it is a class level interceptor

isClassInterceptor

public boolean isClassInterceptor()
Specified by:
isClassInterceptor in interface InterceptorMetadataI
Returns:
the classInterceptor

setClassInterceptor

public void setClassInterceptor(boolean classInterceptor)
Specified by:
setClassInterceptor in interface InterceptorMetadataI
Parameters:
classInterceptor - the classInterceptor to set

isDefaultInterceptor

public boolean isDefaultInterceptor()
Specified by:
isDefaultInterceptor in interface InterceptorMetadataI
Returns:
the defaultInterceptor

setDefaultInterceptor

public void setDefaultInterceptor(boolean defaultInterceptor)
Specified by:
setDefaultInterceptor in interface InterceptorMetadataI
Parameters:
defaultInterceptor - the defaultInterceptor to set

setComponentContext

public void setComponentContext(ApplicationContext beanFactoryForInstance,
                                BeanDefinitionRegistry bdr)
Overrides:
setComponentContext in class Jsr250Metadata


Copyright © 2006-2008 SpringSource (formerly Interface21). All Rights Reserved.