org.jboss.seam.exception.control.example.jaxrs.handler
Class CatchExceptionMapper

java.lang.Object
  extended by org.jboss.seam.exception.control.example.jaxrs.handler.CatchExceptionMapper
All Implemented Interfaces:
ExceptionMapper<Throwable>

@Provider
@ApplicationScoped
public class CatchExceptionMapper
extends Object
implements ExceptionMapper<Throwable>

A JAX-RS ExceptionMapper implementation that maps all exceptions (i.e., Throwable) raised during a JAX-RS request to the Seam Catch exception handling bus.

Exceptions are send to Seam Catch by firing an event of type ExceptionToCatch to the CDI event bus. The event payload contains the exception and the qualifier @RestRequest. The qualifier allows handlers that deal specifically with REST requests to be selected.

Author:
Dan Allen

Constructor Summary
CatchExceptionMapper()
           
 
Method Summary
 Response toResponse(Throwable exception)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CatchExceptionMapper

public CatchExceptionMapper()
Method Detail

toResponse

public Response toResponse(Throwable exception)
Specified by:
toResponse in interface ExceptionMapper<Throwable>


Copyright © 2010 Seam Framework. All Rights Reserved.