com.restfully.shop.services
Class NotFoundExceptionMapper
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NotFoundExceptionMapper
public NotFoundExceptionMapper()
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.