javax.enterprise.inject.spi
Interface Interceptor<T>

Type Parameters:
T -
All Superinterfaces:
Bean<T>, Contextual<T>

public interface Interceptor<T>
extends Bean<T>

Main interface for all Bean objects representing an interceptor.

Author:
Gavin King, Pete Muir, David Allen

Method Summary
 java.util.Set<java.lang.annotation.Annotation> getInterceptorBindingTypes()
          The interceptor bindings used to bind an interceptor to a bean
 java.lang.Object intercept(InterceptionType type, T instance, javax.interceptor.InvocationContext ctx)
          Invokes the specified kind of lifecycle callback or business method upon the given instance
 boolean intercepts(InterceptionType type)
          Tests if this intercepts callbacks or business methods of the given type
 
Methods inherited from interface javax.enterprise.inject.spi.Bean
getBeanClass, getInjectionPoints, getName, getQualifiers, getScope, getStereotypes, getTypes, isAlternative, isNullable
 
Methods inherited from interface javax.enterprise.context.spi.Contextual
create, destroy
 

Method Detail

getInterceptorBindingTypes

java.util.Set<java.lang.annotation.Annotation> getInterceptorBindingTypes()
The interceptor bindings used to bind an interceptor to a bean

Returns:
the interceptor bindings

intercepts

boolean intercepts(InterceptionType type)
Tests if this intercepts callbacks or business methods of the given type

Parameters:
type - The type of interception
Returns:
true if this intercepts the given type of methods

intercept

java.lang.Object intercept(InterceptionType type,
                           T instance,
                           javax.interceptor.InvocationContext ctx)
Invokes the specified kind of lifecycle callback or business method upon the given instance

Parameters:
type - the interception type
instance - the instance to invoke
ctx - the context for the invocation
Returns:
the return value from the invocation


Copyright © 2008-2009 Seam Framework. All Rights Reserved.