public class NettyHttpRequest extends HttpRequest
RestRequest.Method
headers
Constructor and Description |
---|
NettyHttpRequest(org.jboss.netty.handler.codec.http.HttpRequest request,
org.jboss.netty.channel.Channel channel) |
Modifier and Type | Method and Description |
---|---|
BytesReference |
content() |
org.jboss.netty.channel.Channel |
getChannel() |
SocketAddress |
getLocalAddress()
Returns the local address where this request channel is bound to.
|
SocketAddress |
getRemoteAddress()
Returns the remote address where this rest request channel is "connected to".
|
boolean |
hasContent() |
boolean |
hasParam(String key) |
String |
header(String name) |
Iterable<Map.Entry<String,String>> |
headers() |
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.
|
org.jboss.netty.handler.codec.http.HttpRequest |
request() |
String |
uri()
The uri of the rest request, with the query string.
|
paramAsBoolean, paramAsBoolean, paramAsFloat, paramAsInt, paramAsLong, paramAsSize, paramAsStringArray, paramAsStringArrayOrEmptyIfAll, paramAsTime, path
contextSize, copyContextAndHeadersFrom, copyContextFrom, copyHeadersFrom, getContext, getFromContext, getFromContext, getHeader, getHeaders, hasHeader, hasInContext, isContextEmpty, putAllInContext, putHeader, putInContext
public NettyHttpRequest(org.jboss.netty.handler.codec.http.HttpRequest request, org.jboss.netty.channel.Channel channel)
public org.jboss.netty.handler.codec.http.HttpRequest request()
public RestRequest.Method method()
method
in class RestRequest
public String uri()
RestRequest
uri
in class RestRequest
public String rawPath()
RestRequest
rawPath
in class RestRequest
public Map<String,String> params()
params
in class RestRequest
public boolean hasContent()
hasContent
in class RestRequest
public BytesReference content()
content
in class RestRequest
public SocketAddress getRemoteAddress()
SocketAddress
is supposed to be down-cast into more
concrete type such as InetSocketAddress
to retrieve
the detailed information.getRemoteAddress
in class RestRequest
public SocketAddress getLocalAddress()
SocketAddress
is supposed to be down-cast into more concrete
type such as InetSocketAddress
to retrieve the detailed
information.getLocalAddress
in class RestRequest
public org.jboss.netty.channel.Channel getChannel()
public String header(String name)
header
in class RestRequest
public Iterable<Map.Entry<String,String>> headers()
headers
in class RestRequest
public boolean hasParam(String key)
hasParam
in class RestRequest
public String param(String key)
param
in interface ToXContent.Params
param
in class RestRequest
Copyright © 2009–2016. All rights reserved.