com.restfully.shop.services
Class NotFoundExceptionMapper

java.lang.Object
  extended by com.restfully.shop.services.NotFoundExceptionMapper
All Implemented Interfaces:
ExceptionMapper<NotFoundException>

@Provider
public class NotFoundExceptionMapper
extends Object
implements ExceptionMapper<NotFoundException>

Version:
$Revision: 1 $
Author:
Bill Burke

Constructor Summary
NotFoundExceptionMapper()
           
 
Method Summary
 Response toResponse(NotFoundException 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

NotFoundExceptionMapper

public NotFoundExceptionMapper()
Method Detail

toResponse

public Response toResponse(NotFoundException 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<NotFoundException>
Parameters:
exception - the exception to map to a response
Returns:
a response mapped from the supplied exception


Copyright © 2011. All Rights Reserved.