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
  • 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 stream
      conversionService - The conversion service
      codecRegistry - The media codec registry
      ioExecutor - The executor service
      byteBufferFactory - The byte buffer factory
      response - The response
      configuration - 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

      @NonNull public @NonNull URI getUri()
    • cookie

      public io.micronaut.http.MutableHttpRequest<B> cookie(io.micronaut.http.cookie.Cookie cookie)
    • uri

      public io.micronaut.http.MutableHttpRequest<B> uri(URI uri)
    • body

      public <T> io.micronaut.http.MutableHttpRequest<T> body(T body)
    • getHeaders

      @NonNull public @NonNull io.micronaut.http.MutableHttpHeaders getHeaders()
    • getBody

      @NonNull public @NonNull Optional<B> getBody()
    • byteBody

      @NonNull public @NonNull io.micronaut.http.body.ByteBody byteBody()
      Specified by:
      byteBody in interface io.micronaut.http.ServerHttpRequest<B>
      Specified by:
      byteBody in class PojaHttpRequest<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)