Package org.jboss.weld.ejb.spi
Interface InterceptorBindings
-
public interface InterceptorBindings- Author:
- Marius Bogoevici
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Collection<javax.enterprise.inject.spi.Interceptor<?>>getAllInterceptors()Returns all interceptors that are bound to an EJB object through theInterceptorBindingmechanism and are enabled through the beans.xml file.List<javax.enterprise.inject.spi.Interceptor<?>>getLifecycleInterceptors(javax.enterprise.inject.spi.InterceptionType interceptionType)Returns the lifecycle interceptors that are applicable to a givenInterceptionType(bound byInterceptorBinding).List<javax.enterprise.inject.spi.Interceptor<?>>getMethodInterceptors(javax.enterprise.inject.spi.InterceptionType interceptionType, Method method)Returns the interceptors that are applicable to a givenInterceptionTypeand method (bound byInterceptorBinding).
-
-
-
Method Detail
-
getAllInterceptors
Collection<javax.enterprise.inject.spi.Interceptor<?>> getAllInterceptors()
Returns all interceptors that are bound to an EJB object through theInterceptorBindingmechanism and are enabled through the beans.xml file. This includes class and method-bound interceptors.The purpose of this method is to indicate what interceptors does the container need to interact with, for a given EJB. Note: in the case of an EJB, the expectation is that the interpretation of {link @javax.interceptor.Interceptors} is left to the container, and the interceptors provided by the binding are complementary- Returns:
- all interceptors that are bound to an EJB object through the
InterceptorBindingmechanism and are enabled
-
getMethodInterceptors
List<javax.enterprise.inject.spi.Interceptor<?>> getMethodInterceptors(javax.enterprise.inject.spi.InterceptionType interceptionType, Method method)
Returns the interceptors that are applicable to a givenInterceptionTypeand method (bound byInterceptorBinding). This includes class and method-bound interceptors, but no interceptors bound by EJB-specific mechanisms.- Parameters:
interceptionType- - the interception type (non-lifecycle)method- - the method that is to be intercepted- Returns:
- - an immutable list of interceptors applicable to the method (empty if no such interceptors exist)
- Throws:
IllegalArgumentException- if interceptionType is notInterceptionType.AROUND_INVOKEorInterceptionType.AROUND_TIMEOUT
-
getLifecycleInterceptors
List<javax.enterprise.inject.spi.Interceptor<?>> getLifecycleInterceptors(javax.enterprise.inject.spi.InterceptionType interceptionType)
Returns the lifecycle interceptors that are applicable to a givenInterceptionType(bound byInterceptorBinding). This includes class and method-bound interceptors, but no interceptors bound by EJB-specific mechanisms.- Parameters:
interceptionType- - the interception type (lifecycle)- Returns:
- - an immutable list of interceptors applicable to the method (empty if no such interceptors exist)
- Throws:
IllegalArgumentException- if interceptionType notInterceptionType.AROUND_INVOKEorInterceptionType.AROUND_TIMEOUT
-
-