Brooklyn

brooklyn.rest.util
[Java] Class DefaultExceptionMapper

java.lang.Object
  brooklyn.rest.util.DefaultExceptionMapper
All Implemented Interfaces:
ExceptionMapper

@Provider
public class DefaultExceptionMapper

Method Summary
Response toResponse(java.lang.Throwable throwable)

Maps a throwable to a response.

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Method Detail

toResponse

@Override
public Response toResponse(java.lang.Throwable throwable)
Maps a throwable to a response.

Returns WebApplicationException#getResponse#getResponse if the exception is an instance of WebApplicationException. Otherwise maps known exceptions to responses. If no mapping is found a Status#INTERNAL_SERVER_ERROR#INTERNAL_SERVER_ERROR is assumed.


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.