org.elasticsearch.rest
Interface RestRequest

All Superinterfaces:
ToXContent.Params
All Known Subinterfaces:
HttpRequest
All Known Implementing Classes:
AbstractRestRequest, NettyHttpRequest

public interface RestRequest
extends ToXContent.Params


Nested Class Summary
static class RestRequest.Method
           
 
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)
           
 boolean paramAsBoolean(String key, boolean defaultValue)
           
 Boolean paramAsBooleanOptional(String key, Boolean defaultValue)
           
 float paramAsFloat(String key, float defaultValue)
           
 int paramAsInt(String key, int defaultValue)
           
 long paramAsLong(String key, long defaultValue)
           
 ByteSizeValue paramAsSize(String key, ByteSizeValue defaultValue)
           
 String[] paramAsStringArray(String key, String[] defaultValue)
           
 TimeValue paramAsTime(String key, TimeValue defaultValue)
           
 Map<String,String> params()
           
 String path()
          The path part of the URI (without the query string), decoded.
 String rawPath()
          The non decoded, raw path provided.
 String uri()
          The uri of the rest request, with the query string.
 
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContent.Params
param
 

Method Detail

method

RestRequest.Method method()

uri

String uri()
The uri of the rest request, with the query string.


rawPath

String rawPath()
The non decoded, raw path provided.


path

String path()
The path part of the URI (without the query string), decoded.


hasContent

boolean hasContent()

contentUnsafe

boolean contentUnsafe()
Is the byte array content safe or unsafe for usage on other threads


content

BytesReference content()

header

String header(String name)

hasParam

boolean hasParam(String key)

param

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

paramAsStringArray

String[] paramAsStringArray(String key,
                            String[] defaultValue)

paramAsFloat

float paramAsFloat(String key,
                   float defaultValue)

paramAsInt

int paramAsInt(String key,
               int defaultValue)

paramAsLong

long paramAsLong(String key,
                 long defaultValue)

paramAsBoolean

boolean paramAsBoolean(String key,
                       boolean defaultValue)
Specified by:
paramAsBoolean in interface ToXContent.Params

paramAsBooleanOptional

Boolean paramAsBooleanOptional(String key,
                               Boolean defaultValue)
Specified by:
paramAsBooleanOptional in interface ToXContent.Params

paramAsTime

TimeValue paramAsTime(String key,
                      TimeValue defaultValue)

paramAsSize

ByteSizeValue paramAsSize(String key,
                          ByteSizeValue defaultValue)

params

Map<String,String> params()


Copyright © 2009-2012. All Rights Reserved.