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.elasticsearch.common.netty.handler.codec.http.HttpRequest request)
           
 
Method Summary
 java.lang.String contentAsString()
           
 byte[] contentByteArray()
           
 int contentByteArrayOffset()
           
 int contentLength()
           
 boolean contentUnsafe()
          Is the byte array content safe or unsafe for usage on other threads
 boolean hasContent()
           
 boolean hasParam(java.lang.String key)
           
 java.lang.String header(java.lang.String name)
           
 RestRequest.Method method()
           
 java.lang.String param(java.lang.String key)
           
 java.lang.String param(java.lang.String key, java.lang.String defaultValue)
           
 java.util.Map<java.lang.String,java.lang.String> params()
           
 java.lang.String rawPath()
          The non decoded, raw path provided.
 java.lang.String uri()
          The uri of the rest request, with the query string.
 
Methods inherited from class org.elasticsearch.rest.support.AbstractRestRequest
paramAsBoolean, paramAsBoolean, 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, paramAsBoolean, paramAsFloat, paramAsInt, paramAsLong, paramAsSize, paramAsStringArray, paramAsTime, path
 

Constructor Detail

NettyHttpRequest

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

method

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

uri

public java.lang.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 java.lang.String rawPath()
Description copied from interface: RestRequest
The non decoded, raw path provided.

Specified by:
rawPath in interface RestRequest

params

public java.util.Map<java.lang.String,java.lang.String> params()
Specified by:
params in interface RestRequest

hasContent

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

contentLength

public int contentLength()
Specified by:
contentLength 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

contentByteArray

public byte[] contentByteArray()
Specified by:
contentByteArray in interface RestRequest

contentByteArrayOffset

public int contentByteArrayOffset()
Specified by:
contentByteArrayOffset in interface RestRequest

contentAsString

public java.lang.String contentAsString()
Specified by:
contentAsString in interface RestRequest

header

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

hasParam

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

param

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

param

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