voldemort.rest
Class AbstractRestRequestHandler
java.lang.Object
org.jboss.netty.channel.SimpleChannelUpstreamHandler
voldemort.rest.AbstractRestRequestHandler
- All Implemented Interfaces:
- org.jboss.netty.channel.ChannelHandler, org.jboss.netty.channel.ChannelUpstreamHandler
- Direct Known Subclasses:
- RestCoordinatorRequestHandler, RestServerRequestHandler
public abstract class AbstractRestRequestHandler
- extends org.jboss.netty.channel.SimpleChannelUpstreamHandler
Class to handle a REST request and send response back to the client
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler |
org.jboss.netty.channel.ChannelHandler.Sharable |
Field Summary |
org.jboss.netty.handler.codec.http.HttpRequest |
request
|
Method Summary |
void |
exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ExceptionEvent e)
|
void |
messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.MessageEvent messageEvent)
|
protected abstract void |
registerRequest(RestRequestValidator requestValidator,
org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.MessageEvent messageEvent)
Function used to create a valid request and pass it to the next handler
in the Netty pipeline. |
Methods inherited from class org.jboss.netty.channel.SimpleChannelUpstreamHandler |
channelBound, channelClosed, channelConnected, channelDisconnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, handleUpstream, writeComplete |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
request
public org.jboss.netty.handler.codec.http.HttpRequest request
AbstractRestRequestHandler
public AbstractRestRequestHandler()
AbstractRestRequestHandler
public AbstractRestRequestHandler(boolean isVectorClockOptional)
messageReceived
public void messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.MessageEvent messageEvent)
throws java.lang.Exception
- Overrides:
messageReceived
in class org.jboss.netty.channel.SimpleChannelUpstreamHandler
- Throws:
java.lang.Exception
registerRequest
protected abstract void registerRequest(RestRequestValidator requestValidator,
org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.MessageEvent messageEvent)
- Function used to create a valid request and pass it to the next handler
in the Netty pipeline.
- Parameters:
requestValidator
- The Validator object used to construct the
request objectctx
- Context of the Netty channelmessageEvent
- Message Event used to write the response / exception
exceptionCaught
public void exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ExceptionEvent e)
throws java.lang.Exception
- Overrides:
exceptionCaught
in class org.jboss.netty.channel.SimpleChannelUpstreamHandler
- Throws:
java.lang.Exception
Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao, Chinmay Soman, Vinoth Chandar, Zhongjie Wu