B
- The body@Internal public abstract class AbstractNettyHttpRequest<B> extends io.netty.util.DefaultAttributeMap implements HttpRequest<B>, NettyHttpRequestBuilder
HttpRequest
for Netty.Modifier and Type | Field and Description |
---|---|
protected ConversionService<?> |
conversionService |
static io.netty.util.AsciiString |
HTTP2_SCHEME |
protected HttpMethod |
httpMethod |
protected String |
httpMethodName |
protected io.netty.handler.codec.http.HttpRequest |
nettyRequest |
static io.netty.util.AsciiString |
STREAM_ID |
protected URI |
uri |
SCHEME_HTTP, SCHEME_HTTPS
Constructor and Description |
---|
AbstractNettyHttpRequest(io.netty.handler.codec.http.HttpRequest nettyRequest,
ConversionService conversionService) |
Modifier and Type | Method and Description |
---|---|
Collection<MediaType> |
accept()
A list of accepted
MediaType instances sorted by their quality rating. |
protected io.netty.handler.codec.http.QueryStringDecoder |
createDecoder(String uri) |
Charset |
getCharacterEncoding() |
Optional<MediaType> |
getContentType()
The request or response content type.
|
HttpVersion |
getHttpVersion() |
Optional<Locale> |
getLocale() |
HttpMethod |
getMethod() |
String |
getMethodName() |
io.netty.handler.codec.http.HttpRequest |
getNettyRequest() |
HttpParameters |
getParameters() |
String |
getPath() |
URI |
getUri() |
protected abstract Charset |
initCharset(Charset characterEncoding) |
boolean |
isStream() |
io.netty.handler.codec.http.FullHttpRequest |
toFullHttpRequest()
Converts this object to a full http request.
|
io.netty.handler.codec.http.HttpRequest |
toHttpRequest()
Converts this object to the most appropriate http request type.
|
StreamedHttpRequest |
toStreamHttpRequest()
Converts this object to a streamed http request.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
create, create, DELETE, DELETE, DELETE, GET, GET, getCertificate, getCookies, getRemoteAddress, getServerAddress, getServerName, getUserPrincipal, getUserPrincipal, HEAD, HEAD, isSecure, mutate, OPTIONS, OPTIONS, PATCH, PATCH, POST, POST, PUT, PUT, setAttribute
getAttributes, getBody, getBody, getBody, getContentLength, getHeaders
removeAttribute
getAttribute, getAttribute
toHttpRequest
public static final io.netty.util.AsciiString STREAM_ID
public static final io.netty.util.AsciiString HTTP2_SCHEME
protected final io.netty.handler.codec.http.HttpRequest nettyRequest
protected final ConversionService<?> conversionService
protected final HttpMethod httpMethod
protected final URI uri
protected final String httpMethodName
public AbstractNettyHttpRequest(io.netty.handler.codec.http.HttpRequest nettyRequest, ConversionService conversionService)
nettyRequest
- The Http netty requestconversionService
- The conversion service@NonNull public io.netty.handler.codec.http.HttpRequest toHttpRequest()
NettyHttpRequestBuilder
toHttpRequest
in interface NettyHttpRequestBuilder
@NonNull public io.netty.handler.codec.http.FullHttpRequest toFullHttpRequest()
NettyHttpRequestBuilder
toFullHttpRequest
in interface NettyHttpRequestBuilder
@NonNull public StreamedHttpRequest toStreamHttpRequest()
NettyHttpRequestBuilder
toStreamHttpRequest
in interface NettyHttpRequestBuilder
public boolean isStream()
isStream
in interface NettyHttpRequestBuilder
public HttpVersion getHttpVersion()
getHttpVersion
in interface HttpRequest<B>
public io.netty.handler.codec.http.HttpRequest getNettyRequest()
public HttpParameters getParameters()
getParameters
in interface HttpRequest<B>
public Collection<MediaType> accept()
HttpRequest
MediaType
instances sorted by their quality rating.accept
in interface HttpRequest<B>
MediaType
instancespublic Optional<MediaType> getContentType()
HttpMessage
getContentType
in interface HttpMessage<B>
public Charset getCharacterEncoding()
getCharacterEncoding
in interface HttpMessage<B>
StandardCharsets.UTF_8
public Optional<Locale> getLocale()
getLocale
in interface HttpMessage<B>
getLocale
in interface HttpRequest<B>
public HttpMethod getMethod()
getMethod
in interface HttpRequest<B>
public URI getUri()
getUri
in interface HttpRequest<B>
public String getPath()
getPath
in interface HttpRequest<B>
protected abstract Charset initCharset(Charset characterEncoding)
characterEncoding
- The charactger encodingprotected io.netty.handler.codec.http.QueryStringDecoder createDecoder(String uri)
uri
- The URIpublic String getMethodName()
getMethodName
in interface HttpRequest<B>
HttpMethod
value for standard http methods).