public class NettyHttpRequest extends RestRequest
RestRequest.Method| 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() |
java.net.SocketAddress |
getLocalAddress()
Returns the local address where this request channel is bound to.
|
java.net.SocketAddress |
getRemoteAddress()
Returns the remote address where this rest request channel is "connected to".
|
boolean |
hasContent() |
boolean |
hasParam(java.lang.String key) |
java.lang.String |
header(java.lang.String name) |
java.lang.Iterable<java.util.Map.Entry<java.lang.String,java.lang.String>> |
headers() |
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.
|
org.jboss.netty.handler.codec.http.HttpRequest |
request() |
java.lang.String |
uri()
The uri of the rest request, with the query string.
|
paramAsBoolean, paramAsBoolean, paramAsFloat, paramAsInt, paramAsLong, paramAsSize, paramAsStringArray, paramAsStringArrayOrEmptyIfAll, paramAsTime, pathpublic 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 RestRequestpublic java.lang.String uri()
RestRequesturi in class RestRequestpublic java.lang.String rawPath()
RestRequestrawPath in class RestRequestpublic java.util.Map<java.lang.String,java.lang.String> params()
params in class RestRequestpublic boolean hasContent()
hasContent in class RestRequestpublic BytesReference content()
content in class RestRequestpublic java.net.SocketAddress getRemoteAddress()
SocketAddress is supposed to be down-cast into more
concrete type such as InetSocketAddress to retrieve
the detailed information.getRemoteAddress in class RestRequestpublic java.net.SocketAddress getLocalAddress()
SocketAddress is supposed to be down-cast into more concrete
type such as InetSocketAddress to retrieve the detailed
information.getLocalAddress in class RestRequestpublic org.jboss.netty.channel.Channel getChannel()
public java.lang.String header(java.lang.String name)
header in class RestRequestpublic java.lang.Iterable<java.util.Map.Entry<java.lang.String,java.lang.String>> headers()
headers in class RestRequestpublic boolean hasParam(java.lang.String key)
hasParam in class RestRequestpublic java.lang.String param(java.lang.String key)
param in interface ToXContent.Paramsparam in class RestRequestpublic java.lang.String param(java.lang.String key,
java.lang.String defaultValue)