eu.scape_project.watch.rest.resource
Class SampleExceptionMapper

java.lang.Object
  extended by eu.scape_project.watch.rest.resource.SampleExceptionMapper
All Implemented Interfaces:
javax.ws.rs.ext.ExceptionMapper<ApiException>

@Provider
public class SampleExceptionMapper
extends Object
implements javax.ws.rs.ext.ExceptionMapper<ApiException>

Sample class to example an exception mapper.

Author:
Wordnik

Constructor Summary
SampleExceptionMapper()
           
 
Method Summary
 javax.ws.rs.core.Response toResponse(ApiException exception)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SampleExceptionMapper

public SampleExceptionMapper()
Method Detail

toResponse

public javax.ws.rs.core.Response toResponse(ApiException exception)
Specified by:
toResponse in interface javax.ws.rs.ext.ExceptionMapper<ApiException>
Parameters:
exception - The thrown exception
Returns:
The response with error code.


Copyright © 2012 SCAPE. All Rights Reserved.