org.springframework.jee.intercept
Class InterceptorMetadata

java.lang.Object
  extended by org.springframework.jee.inject.Jsr250Metadata
      extended by org.springframework.jee.intercept.InterceptorMetadata

public class InterceptorMetadata
extends Jsr250Metadata

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(java.lang.Class<?> componentClass, java.lang.reflect.Method aroundInvokeMethod)
          Construct new class level interceptor metadata with component name defaulting to the FQN of the component class
InterceptorMetadata(java.lang.Class<?> componentClass, java.lang.reflect.Method aroundInvokeMethod, java.lang.reflect.Method matchingMethod)
          Construct new method level interceptor metadata with component name defaulting to the FQN of the component class
InterceptorMetadata(Jsr250Metadata jsr250, java.lang.reflect.Method aroundInvokeMethod)
          Create a new Interceptor metadata for a self interceptor.
 
Method Summary
 java.lang.reflect.Method getAroundInvokeMethod()
           
 java.util.List<java.lang.reflect.Method> getLifecycleEventListenerMethod(LifecycleEvent le)
          Return the invocation-context style method for this callback
 java.lang.reflect.Method getMatchingMethod()
           
 boolean isClassInterceptor()
           
 boolean isDefaultInterceptor()
           
 void registerLifecycleEventListenerMethod(LifecycleEvent le, java.lang.reflect.Method m)
           
 void setClassInterceptor(boolean classInterceptor)
           
 void setComponentContext(org.springframework.context.ApplicationContext beanFactoryForInstance, org.springframework.beans.factory.support.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
 

Constructor Detail

InterceptorMetadata

public InterceptorMetadata(java.lang.Class<?> componentClass,
                           java.lang.reflect.Method aroundInvokeMethod,
                           java.lang.reflect.Method matchingMethod)
Construct new method level interceptor metadata with component name defaulting to the FQN of the component class

Parameters:
componentClass -
aroundInvokeMethod -
matchingMethod -

InterceptorMetadata

public InterceptorMetadata(java.lang.Class<?> componentClass,
                           java.lang.reflect.Method aroundInvokeMethod)
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,
                           java.lang.reflect.Method aroundInvokeMethod)
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,
                                                 java.lang.reflect.Method m)

getLifecycleEventListenerMethod

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


getAroundInvokeMethod

public java.lang.reflect.Method getAroundInvokeMethod()

getMatchingMethod

public java.lang.reflect.Method getMatchingMethod()
Returns:
the method that this matches on, or null if it is a class level interceptor

isClassInterceptor

public boolean isClassInterceptor()
Returns:
the classInterceptor

setClassInterceptor

public void setClassInterceptor(boolean classInterceptor)
Parameters:
classInterceptor - the classInterceptor to set

isDefaultInterceptor

public boolean isDefaultInterceptor()
Returns:
the defaultInterceptor

setDefaultInterceptor

public void setDefaultInterceptor(boolean defaultInterceptor)
Parameters:
defaultInterceptor - the defaultInterceptor to set

setComponentContext

public void setComponentContext(org.springframework.context.ApplicationContext beanFactoryForInstance,
                                org.springframework.beans.factory.support.BeanDefinitionRegistry bdr)
Overrides:
setComponentContext in class Jsr250Metadata


Copyright 2006 Interface21. All Rights Reserved.