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

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

public class CatchExtension
extends Object
implements javax.enterprise.inject.spi.Extension

CDI extension to find handlers at startup.


Constructor Summary
CatchExtension()
           
 
Method Summary
 void findHandlers(javax.enterprise.inject.spi.ProcessManagedBean pmb, javax.enterprise.inject.spi.BeanManager bm)
          Listener to ProcessManagedBean event to locate handlers.
 Collection<HandlerMethod> getHandlersForExceptionType(Type exceptionClass, javax.enterprise.inject.spi.BeanManager bm, Set<Annotation> handlerQualifiers)
          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 void findHandlers(@Observes
                         javax.enterprise.inject.spi.ProcessManagedBean pmb,
                         javax.enterprise.inject.spi.BeanManager bm)
Listener to ProcessManagedBean 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> getHandlersForExceptionType(Type exceptionClass,
                                                             javax.enterprise.inject.spi.BeanManager bm,
                                                             Set<Annotation> handlerQualifiers)
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
Returns:
An order collection of handlers for the given type.


Copyright © 2010 Seam Framework. All Rights Reserved.