org.jboss.seam.rest.exceptions.integration
Class CatchExceptionMapper
java.lang.Object
org.jboss.seam.rest.exceptions.SeamExceptionMapper
org.jboss.seam.rest.exceptions.integration.CatchExceptionMapper
- All Implemented Interfaces:
- ExceptionMapper<Throwable>
@ApplicationScoped
@HandlesExceptions
@Specializes
public class CatchExceptionMapper
- extends SeamExceptionMapper
- 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, Jozef Hartinger
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CatchExceptionMapper
public CatchExceptionMapper()
toResponse
public Response toResponse(Throwable exception)
- Specified by:
toResponse
in interface ExceptionMapper<Throwable>
- Overrides:
toResponse
in class SeamExceptionMapper
handleException
public void handleException(@Handles(precedence=-100,during=DEPTH_FIRST)
CaughtException<Throwable> event,
@RestResource
Response.ResponseBuilder builder)
Copyright © 2011 Seam Framework. All Rights Reserved.