voldemort.rest
Class RestErrorHandler
java.lang.Object
voldemort.rest.RestErrorHandler
- Direct Known Subclasses:
- RestDeleteErrorHandler, RestGetErrorHandler, RestGetVersionErrorHandler, RestPutErrorHandler
public class RestErrorHandler
- extends java.lang.Object
Field Summary |
protected org.apache.log4j.Logger |
logger
|
Method Summary |
protected void |
handleExceptions(org.jboss.netty.channel.MessageEvent messageEvent,
java.lang.Exception exception)
Exceptions specific to each operation is handled in the corresponding
subclass. |
static void |
writeErrorResponse(org.jboss.netty.channel.MessageEvent messageEvent,
org.jboss.netty.handler.codec.http.HttpResponseStatus status,
java.lang.String message)
Writes all error responses to the client. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected final org.apache.log4j.Logger logger
RestErrorHandler
public RestErrorHandler()
handleExceptions
protected void handleExceptions(org.jboss.netty.channel.MessageEvent messageEvent,
java.lang.Exception exception)
- Exceptions specific to each operation is handled in the corresponding
subclass. At this point we don't know the reason behind this exception.
- Parameters:
exception
-
writeErrorResponse
public static void writeErrorResponse(org.jboss.netty.channel.MessageEvent messageEvent,
org.jboss.netty.handler.codec.http.HttpResponseStatus status,
java.lang.String message)
- Writes all error responses to the client.
TODO REST-Server 1. collect error stats
- Parameters:
messageEvent
- - for retrieving the channel detailsstatus
- - error codemessage
- - error message
Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao, Chinmay Soman, Vinoth Chandar, Zhongjie Wu