org.elasticsearch.http.netty
Class NettyHttpRequest

java.lang.Object
  extended by org.elasticsearch.rest.support.AbstractRestRequest
      extended by org.elasticsearch.http.netty.NettyHttpRequest
All Implemented Interfaces:
ToXContent.Params, HttpRequest, RestRequest

public class NettyHttpRequest
extends AbstractRestRequest
implements HttpRequest


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.elasticsearch.rest.RestRequest
RestRequest.Method
 
Constructor Summary
NettyHttpRequest(org.jboss.netty.handler.codec.http.HttpRequest request)
           
 
Method Summary
 BytesReference content()
           
 boolean contentUnsafe()
          Is the byte array content safe or unsafe for usage on other threads
 boolean hasContent()
           
 boolean hasParam(String key)
           
 String header(String name)
           
 RestRequest.Method method()
           
 String param(String key)
           
 String param(String key, String defaultValue)
           
 Map<String,String> params()
           
 String rawPath()
          The non decoded, raw path provided.
 String uri()
          The uri of the rest request, with the query string.
 
Methods inherited from class org.elasticsearch.rest.support.AbstractRestRequest
paramAsBoolean, paramAsBooleanOptional, paramAsFloat, paramAsInt, paramAsLong, paramAsSize, paramAsStringArray, paramAsTime, path
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.elasticsearch.rest.RestRequest
paramAsBoolean, paramAsBooleanOptional, paramAsFloat, paramAsInt, paramAsLong, paramAsSize, paramAsStringArray, paramAsTime, path
 

Constructor Detail

NettyHttpRequest

public NettyHttpRequest(org.jboss.netty.handler.codec.http.HttpRequest request)
Method Detail

method

public RestRequest.Method method()
Specified by:
method in interface RestRequest

uri

public String uri()
Description copied from interface: RestRequest
The uri of the rest request, with the query string.

Specified by:
uri in interface RestRequest

rawPath

public String rawPath()
Description copied from interface: RestRequest
The non decoded, raw path provided.

Specified by:
rawPath in interface RestRequest

params

public Map<String,String> params()
Specified by:
params in interface RestRequest

hasContent

public boolean hasContent()
Specified by:
hasContent in interface RestRequest

contentUnsafe

public boolean contentUnsafe()
Description copied from interface: RestRequest
Is the byte array content safe or unsafe for usage on other threads

Specified by:
contentUnsafe in interface RestRequest

content

public BytesReference content()
Specified by:
content in interface RestRequest

header

public String header(String name)
Specified by:
header in interface RestRequest

hasParam

public boolean hasParam(String key)
Specified by:
hasParam in interface RestRequest

param

public String param(String key)
Specified by:
param in interface ToXContent.Params
Specified by:
param in interface RestRequest

param

public String param(String key,
                    String defaultValue)
Specified by:
param in interface ToXContent.Params


Copyright © 2009-2012. All Rights Reserved.