org.jboss.resteasy.test.application
Class FooExceptionMapper

java.lang.Object
  extended by org.jboss.resteasy.test.application.FooExceptionMapper
All Implemented Interfaces:
ExceptionMapper<FooException>

@Provider
public class FooExceptionMapper
extends Object
implements ExceptionMapper<FooException>

Version:
$Revision: 1 $
Author:
Bill Burke

Constructor Summary
FooExceptionMapper(Application application, javax.servlet.ServletConfig servletConfig, javax.servlet.ServletContext context)
           
 
Method Summary
 Response toResponse(FooException exception)
          Map an exception to a Response.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FooExceptionMapper

public FooExceptionMapper(@Context
                          Application application,
                          @Context
                          javax.servlet.ServletConfig servletConfig,
                          @Context
                          javax.servlet.ServletContext context)
Method Detail

toResponse

public Response toResponse(FooException exception)
Description copied from interface: ExceptionMapper
Map an exception to a Response. Returning null results in a Response.Status.NO_CONTENT response. Throwing a runtime exception results in a Response.Status.INTERNAL_SERVER_ERROR response

Specified by:
toResponse in interface ExceptionMapper<FooException>
Parameters:
exception - the exception to map to a response
Returns:
a response mapped from the supplied exception


Copyright © 2012. All Rights Reserved.