public class CatchExtension extends Object implements javax.enterprise.inject.spi.Extension, HandlerMethodContainer
Constructor and Description |
---|
CatchExtension() |
Modifier and Type | Method and Description |
---|---|
<T> void |
findHandlers(javax.enterprise.inject.spi.ProcessBean<?> pmb,
javax.enterprise.inject.spi.BeanManager bm)
Listener to ProcessBean event to locate handlers.
|
Collection<HandlerMethod<? extends Throwable>> |
getHandlersForExceptionType(Type exceptionClass,
javax.enterprise.inject.spi.BeanManager bm,
Set<Annotation> handlerQualifiers,
TraversalMode traversalMode)
Obtains the applicable handlers for the given type or super type of the given type.
|
<T extends Throwable> |
registerHandlerMethod(HandlerMethod<T> handlerMethod)
Registers the given handlerMethod to the container.
|
void |
verifyInjectionPoints(javax.enterprise.inject.spi.AfterDeploymentValidation adv,
javax.enterprise.inject.spi.BeanManager bm)
Verifies all injection points for every handler are valid.
|
public <T> void findHandlers(@Observes javax.enterprise.inject.spi.ProcessBean<?> pmb, javax.enterprise.inject.spi.BeanManager bm)
pmb
- Event from CDI SPIbm
- Activated Bean ManagerTypeNotPresentException
- if any of the actual type arguments refers to a non-existent type declaration when
trying to obtain the actual type arguments from a ParameterizedType
MalformedParameterizedTypeException
- if any of the actual type parameters refer to a parameterized type that cannot be
instantiated for any reason when trying to obtain the actual type arguments from a
ParameterizedType
public void verifyInjectionPoints(@Observes javax.enterprise.inject.spi.AfterDeploymentValidation adv, javax.enterprise.inject.spi.BeanManager bm)
adv
- Lifecycle eventbm
- BeanManager instancepublic Collection<HandlerMethod<? extends Throwable>> getHandlersForExceptionType(Type exceptionClass, javax.enterprise.inject.spi.BeanManager bm, Set<Annotation> handlerQualifiers, TraversalMode traversalMode)
ExceptionHandlerComparator
to order the handlers.exceptionClass
- Type of exception to narrow handler listbm
- active BeanManagerhandlerQualifiers
- additional handlerQualifiers to limit handlerstraversalMode
- traversal limiterpublic <T extends Throwable> void registerHandlerMethod(HandlerMethod<T> handlerMethod)
HandlerMethodContainer
registerHandlerMethod
in interface HandlerMethodContainer
handlerMethod
- HandlerMethod implementation to register with the containerCopyright © 2008–2013 Seam Framework. All rights reserved.