org.jboss.seam.exception.control
Class ExceptionHandlerDispatch

java.lang.Object
  extended by org.jboss.seam.exception.control.ExceptionHandlerDispatch

public class ExceptionHandlerDispatch
extends Object

Observer of ExceptionToCatch events and handler dispatcher. All handlers are invoked from this class. This class is immutable.


Constructor Summary
ExceptionHandlerDispatch()
           
 
Method Summary
 void executeHandlers(ExceptionToCatch eventException, BeanManager bm, CatchExtension extension, Event<ExceptionStack> stackEvent)
          Observes the event, finds the correct exception handler(s) and invokes them.
 ExceptionStack getExceptionStack()
           
 ExceptionToCatch getExceptionToCatch()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExceptionHandlerDispatch

public ExceptionHandlerDispatch()
Method Detail

executeHandlers

public void executeHandlers(@Observes@Any
                            ExceptionToCatch eventException,
                            BeanManager bm,
                            CatchExtension extension,
                            Event<ExceptionStack> stackEvent)
                     throws Throwable
Observes the event, finds the correct exception handler(s) and invokes them.

Parameters:
eventException - exception to be invoked
bm - active bean manager
extension - catch extension instance to obtain handlers
stackEvent - Event for modifying the exception stack
Throws:
Throwable - If a handler requests the exception to be re-thrown.

getExceptionStack

@Produces
@ConversationScoped
@Named(value="handledException")
public ExceptionStack getExceptionStack()

getExceptionToCatch

@Produces
@ConversationScoped
@Named(value="caughtException")
public ExceptionToCatch getExceptionToCatch()


Copyright © 2011 Seam Framework. All Rights Reserved.