voldemort.server.rest
Class RestServerGetRequestValidator

java.lang.Object
  extended by voldemort.server.rest.RestServerRequestValidator
      extended by voldemort.server.rest.RestServerGetRequestValidator

public class RestServerGetRequestValidator
extends RestServerRequestValidator

This class is used to parse incoming get and get all requests. Parses and validates the REST Request and constructs a CompositeVoldemortRequestObject. Also Handles exceptions specific to get and get all operations.


Field Summary
protected  boolean isGetVersionRequest
           
 
Fields inherited from class voldemort.server.rest.RestServerRequestValidator
logger, messageEvent, parsedKeys, parsedOperationType, parsedRequestOriginTimeInMs, parsedRoutingType, parsedTimeoutInMs, parsedValue, parsedVectorClock, request, requestObject, storeName, storeRepository
 
Constructor Summary
RestServerGetRequestValidator(org.jboss.netty.handler.codec.http.HttpRequest request, org.jboss.netty.channel.MessageEvent messageEvent, StoreRepository storeRepository)
           
 
Method Summary
 CompositeVoldemortRequest<ByteArray,byte[]> constructCompositeVoldemortRequestObject()
           
 boolean hasGetVersionRequestHeader()
           
 boolean parseAndValidateRequest()
          Validations specific to GET and GET ALL
 
Methods inherited from class voldemort.server.rest.RestServerRequestValidator
getParsedRoutingType, getStoreName, hasKey, hasRoutingCodeHeader, hasTimeOutHeader, hasTimeStampHeader, hasVectorClock, isStoreValid, parseKeys, parseStoreName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isGetVersionRequest

protected boolean isGetVersionRequest
Constructor Detail

RestServerGetRequestValidator

public RestServerGetRequestValidator(org.jboss.netty.handler.codec.http.HttpRequest request,
                                     org.jboss.netty.channel.MessageEvent messageEvent,
                                     StoreRepository storeRepository)
Method Detail

parseAndValidateRequest

public boolean parseAndValidateRequest()
Validations specific to GET and GET ALL

Overrides:
parseAndValidateRequest in class RestServerRequestValidator
Returns:
true if request is valid else false

hasGetVersionRequestHeader

public boolean hasGetVersionRequestHeader()

constructCompositeVoldemortRequestObject

public CompositeVoldemortRequest<ByteArray,byte[]> constructCompositeVoldemortRequestObject()
Specified by:
constructCompositeVoldemortRequestObject in class RestServerRequestValidator


Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao, Chinmay Soman, Vinoth Chandar, Zhongjie Wu