org.jboss.seam.exception.control.extension
Class CatchExtension

java.lang.Object
  extended by org.jboss.seam.exception.control.extension.CatchExtension
All Implemented Interfaces:
Extension

public class CatchExtension
extends Object
implements Extension

CDI extension to find handlers at startup.


Constructor Summary
CatchExtension()
           
 
Method Summary
<T> void
findHandlers(ProcessBean<?> pmb, BeanManager bm)
          Listener to ProcessBean event to locate handlers.
 Collection<HandlerMethod<? extends Throwable>> getHandlersForExceptionType(Type exceptionClass, BeanManager bm, Set<Annotation> handlerQualifiers, TraversalMode traversalMode)
          Obtains the applicable handlers for the given type or super type of the given type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CatchExtension

public CatchExtension()
Method Detail

findHandlers

public <T> void findHandlers(@Observes
                             ProcessBean<?> pmb,
                             BeanManager bm)
Listener to ProcessBean event to locate handlers.

Parameters:
pmb - Event from CDI SPI
bm - Activated Bean Manager
Throws:
TypeNotPresentException - 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

getHandlersForExceptionType

public Collection<HandlerMethod<? extends Throwable>> getHandlersForExceptionType(Type exceptionClass,
                                                                                  BeanManager bm,
                                                                                  Set<Annotation> handlerQualifiers,
                                                                                  TraversalMode traversalMode)
Obtains the applicable handlers for the given type or super type of the given type. Also makes use of ExceptionHandlerComparator to order the handlers.

Parameters:
exceptionClass - Type of exception to narrow handler list
bm - active BeanManager
handlerQualifiers - additional handlerQualifiers to limit handlers
traversalMode - traversal limiter
Returns:
An order collection of handlers for the given type.


Copyright © 2011 Seam Framework. All Rights Reserved.