Package io.micronaut.http.poja.apache
Class ApacheServletHttpRequest<B>
java.lang.Object
io.micronaut.http.poja.PojaHttpRequest<B,org.apache.hc.core5.http.ClassicHttpRequest,org.apache.hc.core5.http.ClassicHttpResponse>
io.micronaut.http.poja.apache.ApacheServletHttpRequest<B>
- Type Parameters:
B
- Body type
- All Implemented Interfaces:
io.micronaut.core.attr.AttributeHolder
,io.micronaut.core.attr.MutableAttributeHolder
,io.micronaut.core.convert.ConversionServiceAware
,io.micronaut.http.HttpMessage<B>
,io.micronaut.http.HttpRequest<B>
,io.micronaut.http.MutableHttpMessage<B>
,io.micronaut.http.MutableHttpRequest<B>
,io.micronaut.http.ServerHttpRequest<B>
,ServletExchange<org.apache.hc.core5.http.ClassicHttpRequest,
,org.apache.hc.core5.http.ClassicHttpResponse> ServletHttpRequest<org.apache.hc.core5.http.ClassicHttpRequest,
B>
@Internal
public final class ApacheServletHttpRequest<B>
extends PojaHttpRequest<B,org.apache.hc.core5.http.ClassicHttpRequest,org.apache.hc.core5.http.ClassicHttpResponse>
An implementation of the POJA Http Request based on Apache.
- Since:
- 4.10.0
- Author:
- Andriy Dmytruk
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.servlet.http.ServletHttpRequest
ServletHttpRequest.AsyncExecution, ServletHttpRequest.AsyncExecutionCallback
-
Field Summary
Fields inherited from class io.micronaut.http.poja.PojaHttpRequest
attributes, codecRegistry, conversionService, CONVERTIBLE_VALUES_ARGUMENT, response
Fields inherited from interface io.micronaut.http.HttpRequest
SCHEME_HTTP, SCHEME_HTTPS
-
Constructor Summary
ConstructorDescriptionApacheServletHttpRequest
(InputStream inputStream, org.apache.hc.core5.http.io.SessionInputBuffer sessionInputBuffer, io.micronaut.core.convert.ConversionService conversionService, io.micronaut.http.codec.MediaTypeCodecRegistry codecRegistry, ExecutorService ioExecutor, io.micronaut.core.io.buffer.ByteBufferFactory<?, ?> byteBufferFactory, ApacheServletHttpResponse<?> response, ApacheServletConfiguration configuration) Create an Apache-based request. -
Method Summary
Modifier and TypeMethodDescription<T> io.micronaut.http.MutableHttpRequest<T>
body
(T body) @NonNull io.micronaut.http.body.ByteBody
byteBody()
io.micronaut.http.MutableHttpRequest<B>
cookie
(io.micronaut.http.cookie.Cookie cookie) getBody()
@NonNull io.micronaut.http.cookie.Cookies
@NonNull io.micronaut.http.MutableHttpHeaders
@NonNull io.micronaut.http.HttpMethod
org.apache.hc.core5.http.ClassicHttpRequest
@NonNull io.micronaut.http.MutableHttpParameters
@NonNull URI
getUri()
void
setConversionService
(@NonNull io.micronaut.core.convert.ConversionService conversionService) io.micronaut.http.MutableHttpRequest<B>
Methods inherited from class io.micronaut.http.poja.PojaHttpRequest
consumeBody, getAttributes, getBody, getFormData, getInputStream, getReader, getRequest, getResponse, isFormSubmission
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.core.attr.AttributeHolder
getAttribute, getAttribute
Methods inherited from interface io.micronaut.http.HttpMessage
getBody, getBody, getBodyWriter, getCharacterEncoding, getContentLength, getContentType
Methods inherited from interface io.micronaut.http.HttpRequest
accept, getCertificate, getHttpVersion, getLocale, getMethodName, getOrigin, getPath, getRemoteAddress, getServerAddress, getServerName, getSslSession, getUserPrincipal, getUserPrincipal, isSecure, mutate, setAttribute
Methods inherited from interface io.micronaut.core.attr.MutableAttributeHolder
removeAttribute
Methods inherited from interface io.micronaut.http.MutableHttpMessage
bodyWriter
Methods inherited from interface io.micronaut.http.MutableHttpRequest
accept, accept, basicAuth, bearerAuth, contentEncoding, contentLength, contentType, contentType, cookies, header, headers, headers, toMutableRequest, uri
Methods inherited from interface io.micronaut.servlet.http.ServletHttpRequest
executeAsync, getContextPath, isAsyncSupported
-
Constructor Details
-
ApacheServletHttpRequest
public ApacheServletHttpRequest(InputStream inputStream, org.apache.hc.core5.http.io.SessionInputBuffer sessionInputBuffer, io.micronaut.core.convert.ConversionService conversionService, io.micronaut.http.codec.MediaTypeCodecRegistry codecRegistry, ExecutorService ioExecutor, io.micronaut.core.io.buffer.ByteBufferFactory<?, ?> byteBufferFactory, ApacheServletHttpResponse<?> response, ApacheServletConfiguration configuration) Create an Apache-based request.- Parameters:
inputStream
- The input streamconversionService
- The conversion servicecodecRegistry
- The media codec registryioExecutor
- The executor servicebyteBufferFactory
- The byte buffer factoryresponse
- The responseconfiguration
- The configuration
-
-
Method Details
-
getNativeRequest
public org.apache.hc.core5.http.ClassicHttpRequest getNativeRequest()- Returns:
- The native request type
-
getCookies
@NonNull public @NonNull io.micronaut.http.cookie.Cookies getCookies() -
getParameters
@NonNull public @NonNull io.micronaut.http.MutableHttpParameters getParameters() -
getMethod
@NonNull public @NonNull io.micronaut.http.HttpMethod getMethod() -
getUri
-
cookie
-
uri
-
body
public <T> io.micronaut.http.MutableHttpRequest<T> body(T body) -
getHeaders
@NonNull public @NonNull io.micronaut.http.MutableHttpHeaders getHeaders() -
getBody
-
byteBody
@NonNull public @NonNull io.micronaut.http.body.ByteBody byteBody()- Specified by:
byteBody
in interfaceio.micronaut.http.ServerHttpRequest<B>
- Specified by:
byteBody
in classPojaHttpRequest<B,
org.apache.hc.core5.http.ClassicHttpRequest, org.apache.hc.core5.http.ClassicHttpResponse>
-
setConversionService
public void setConversionService(@NonNull @NonNull io.micronaut.core.convert.ConversionService conversionService)
-