public abstract class RestRequest extends ContextAndHeaderHolder implements ToXContent.Params
| Modifier and Type | Class and Description |
|---|---|
static class |
RestRequest.Method |
headers| Constructor and Description |
|---|
RestRequest() |
| Modifier and Type | Method and Description |
|---|---|
abstract BytesReference |
content() |
SocketAddress |
getLocalAddress() |
SocketAddress |
getRemoteAddress() |
abstract boolean |
hasContent() |
abstract boolean |
hasParam(String key) |
abstract String |
header(String name) |
abstract Iterable<Map.Entry<String,String>> |
headers() |
abstract RestRequest.Method |
method() |
abstract String |
param(String key) |
boolean |
paramAsBoolean(String key,
boolean defaultValue) |
Boolean |
paramAsBoolean(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) |
String[] |
paramAsStringArrayOrEmptyIfAll(String key) |
TimeValue |
paramAsTime(String key,
TimeValue defaultValue) |
abstract Map<String,String> |
params() |
String |
path()
The path part of the URI (without the query string), decoded.
|
abstract String |
rawPath()
The non decoded, raw path provided.
|
abstract String |
uri()
The uri of the rest request, with the query string.
|
contextSize, copyContextAndHeadersFrom, copyContextFrom, copyHeadersFrom, getContext, getFromContext, getFromContext, getHeader, getHeaders, hasHeader, hasInContext, isContextEmpty, putAllInContext, putHeader, putInContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitparampublic abstract RestRequest.Method method()
public abstract String uri()
public abstract String rawPath()
public final String path()
public abstract boolean hasContent()
public abstract BytesReference content()
@Nullable public SocketAddress getRemoteAddress()
@Nullable public SocketAddress getLocalAddress()
public abstract boolean hasParam(String key)
public abstract String param(String key)
param in interface ToXContent.Paramspublic float paramAsFloat(String key, float defaultValue)
public int paramAsInt(String key, int defaultValue)
public long paramAsLong(String key, long defaultValue)
public boolean paramAsBoolean(String key, boolean defaultValue)
paramAsBoolean in interface ToXContent.Paramspublic Boolean paramAsBoolean(String key, Boolean defaultValue)
paramAsBoolean in interface ToXContent.Paramspublic ByteSizeValue paramAsSize(String key, ByteSizeValue defaultValue)
Copyright © 2009–2017. All rights reserved.