T - The type@Internal public class NettyHttpRequest<T> extends AbstractNettyHttpRequest<T> implements HttpRequest<T>
HttpRequest instance.conversionService, httpMethod, nettyRequest, uri| Constructor and Description |
|---|
NettyHttpRequest(io.netty.handler.codec.http.HttpRequest nettyRequest,
io.netty.channel.ChannelHandlerContext ctx,
ConversionService environment,
HttpServerConfiguration serverConfiguration) |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
buildBody() |
MutableConvertibleValues<Object> |
getAttributes()
A
MutableConvertibleValues of the attributes for this HTTP message. |
Optional<T> |
getBody() |
<T1> Optional<T1> |
getBody(Argument<T1> type)
Return the body as the given type.
|
<T1> Optional<T1> |
getBody(Class<T1> type)
Return the body as the given type.
|
io.netty.channel.ChannelHandlerContext |
getChannelHandlerContext() |
Cookies |
getCookies() |
HttpHeaders |
getHeaders() |
RouteMatch<?> |
getMatchedRoute() |
io.netty.handler.codec.http.HttpRequest |
getNativeRequest() |
InetSocketAddress |
getRemoteAddress() |
InetSocketAddress |
getServerAddress() |
String |
getServerName() |
protected Charset |
initCharset(Charset characterEncoding) |
boolean |
isSecure() |
void |
release()
Release and cleanup resources.
|
protected void |
releaseIfNecessary(Object value) |
void |
setBody(T body)
Sets the body.
|
String |
toString() |
createDecoder, getCharacterEncoding, getContentType, getLocale, getMethod, getNettyRequest, getParameters, getPath, getUriclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreate, DELETE, DELETE, DELETE, GET, GET, getLocale, getMethod, getParameters, getPath, getUri, getUserPrincipal, getUserPrincipal, HEAD, HEAD, OPTIONS, OPTIONS, PATCH, PATCH, POST, POST, PUT, PUT, setAttributegetCharacterEncoding, getContentLength, getContentTyperemoveAttributegetAttribute, getAttributepublic NettyHttpRequest(io.netty.handler.codec.http.HttpRequest nettyRequest,
io.netty.channel.ChannelHandlerContext ctx,
ConversionService environment,
HttpServerConfiguration serverConfiguration)
nettyRequest - The HttpRequestctx - The ChannelHandlerContextenvironment - The EnvironmentserverConfiguration - The HttpServerConfigurationpublic io.netty.handler.codec.http.HttpRequest getNativeRequest()
public io.netty.channel.ChannelHandlerContext getChannelHandlerContext()
ChannelHandlerContextpublic Cookies getCookies()
getCookies in interface HttpRequest<T>Cookies instancepublic InetSocketAddress getRemoteAddress()
getRemoteAddress in interface HttpRequest<T>public InetSocketAddress getServerAddress()
getServerAddress in interface HttpRequest<T>public String getServerName()
getServerName in interface HttpRequest<T>public boolean isSecure()
isSecure in interface HttpRequest<T>public HttpHeaders getHeaders()
getHeaders in interface HttpMessage<T>HttpHeaders objectpublic MutableConvertibleValues<Object> getAttributes()
HttpMessageA MutableConvertibleValues of the attributes for this HTTP message.
Attributes are designed for internal data sharing and hence are isolated from headers and parameters which are client supplied
getAttributes in interface AttributeHoldergetAttributes in interface MutableAttributeHoldergetAttributes in interface HttpMessage<T>public Optional<T> getBody()
getBody in interface HttpMessage<T>protected Object buildBody()
CompositeByteBufpublic <T1> Optional<T1> getBody(Class<T1> type)
HttpMessagegetBody in interface HttpMessage<T>T1 - The generic typetype - The type of the bodyOptional of the type or Optional.empty() if the body cannot be returned as the given typepublic <T1> Optional<T1> getBody(Argument<T1> type)
HttpMessagegetBody in interface HttpMessage<T>T1 - The generic typetype - The type of the bodyOptional of the type or Optional.empty() if the body cannot be returned as the given type@Internal public void release()
protected void releaseIfNecessary(Object value)
value - An object with a value@Internal public RouteMatch<?> getMatchedRoute()
protected Charset initCharset(Charset characterEncoding)
initCharset in class AbstractNettyHttpRequest<T>characterEncoding - The charactger encoding