Class ReactiveServerExchangeHandler

java.lang.Object
org.apache.hc.core5.reactive.ReactiveServerExchangeHandler
All Implemented Interfaces:
org.apache.hc.core5.http.nio.AsyncDataConsumer, org.apache.hc.core5.http.nio.AsyncDataExchangeHandler, org.apache.hc.core5.http.nio.AsyncDataProducer, org.apache.hc.core5.http.nio.AsyncServerExchangeHandler, org.apache.hc.core5.http.nio.ResourceHolder

public final class ReactiveServerExchangeHandler extends Object implements org.apache.hc.core5.http.nio.AsyncServerExchangeHandler
An implementation of AsyncServerExchangeHandler designed to work with reactive streams.
Since:
5.0
  • Constructor Details

    • ReactiveServerExchangeHandler

      public ReactiveServerExchangeHandler(ReactiveRequestProcessor requestProcessor)
      Creates a ReactiveServerExchangeHandler.
      Parameters:
      requestProcessor - the ReactiveRequestProcessor instance to invoke when the request is ready to be handled.
  • Method Details

    • handleRequest

      public void handleRequest(org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.EntityDetails entityDetails, org.apache.hc.core5.http.nio.ResponseChannel responseChannel, org.apache.hc.core5.http.protocol.HttpContext context) throws org.apache.hc.core5.http.HttpException, IOException
      Specified by:
      handleRequest in interface org.apache.hc.core5.http.nio.AsyncServerExchangeHandler
      Throws:
      org.apache.hc.core5.http.HttpException
      IOException
    • failed

      public void failed(Exception cause)
      Specified by:
      failed in interface org.apache.hc.core5.http.nio.AsyncDataExchangeHandler
    • updateCapacity

      public void updateCapacity(org.apache.hc.core5.http.nio.CapacityChannel capacityChannel) throws IOException
      Specified by:
      updateCapacity in interface org.apache.hc.core5.http.nio.AsyncDataConsumer
      Throws:
      IOException
    • consume

      public void consume(ByteBuffer src) throws IOException
      Specified by:
      consume in interface org.apache.hc.core5.http.nio.AsyncDataConsumer
      Throws:
      IOException
    • streamEnd

      public void streamEnd(List<? extends org.apache.hc.core5.http.Header> trailers) throws org.apache.hc.core5.http.HttpException, IOException
      Specified by:
      streamEnd in interface org.apache.hc.core5.http.nio.AsyncDataConsumer
      Throws:
      org.apache.hc.core5.http.HttpException
      IOException
    • available

      public int available()
      Specified by:
      available in interface org.apache.hc.core5.http.nio.AsyncDataProducer
    • produce

      public void produce(org.apache.hc.core5.http.nio.DataStreamChannel channel) throws IOException
      Specified by:
      produce in interface org.apache.hc.core5.http.nio.AsyncDataProducer
      Throws:
      IOException
    • releaseResources

      public void releaseResources()
      Specified by:
      releaseResources in interface org.apache.hc.core5.http.nio.ResourceHolder