throws Exception {
RestRequestValidator requestValidator;
if(!readingChunks) {
// Construct the Request from messageEvent
HttpRequest request = this.request = (HttpRequest) messageEvent.getMessage();
String requestURI = this.request.getUri();
if(logger.isDebugEnabled()) {
logger.debug("Request URI: " + requestURI);
}
if(request.isChunked()) {
readingChunks = true;
} else {
// Instantiate the appropriate error handler
HttpMethod httpMethod = request.getMethod();
if(httpMethod.equals(HttpMethod.GET)) {
if(logger.isDebugEnabled()) {
logger.debug("Received a Http GET request at " + System.currentTimeMillis() + " ms");
}
requestValidator = new RestGetRequestValidator(request, messageEvent);