Class LoggingAsyncClientExchangeHandler

java.lang.Object
org.apache.hc.client5.http.impl.async.LoggingAsyncClientExchangeHandler
All Implemented Interfaces:
org.apache.hc.core5.http.nio.AsyncClientExchangeHandler, 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.ResourceHolder, org.apache.hc.core5.util.Identifiable

final class LoggingAsyncClientExchangeHandler extends Object implements org.apache.hc.core5.http.nio.AsyncClientExchangeHandler, org.apache.hc.core5.util.Identifiable
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final String
     
    private final org.apache.hc.core5.http.nio.AsyncClientExchangeHandler
     
    private final org.slf4j.Logger
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    LoggingAsyncClientExchangeHandler(org.slf4j.Logger log, String exchangeId, org.apache.hc.core5.http.nio.AsyncClientExchangeHandler handler)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    void
     
    void
     
    void
    consumeInformation(org.apache.hc.core5.http.HttpResponse response, org.apache.hc.core5.http.protocol.HttpContext context)
     
    void
    consumeResponse(org.apache.hc.core5.http.HttpResponse response, org.apache.hc.core5.http.EntityDetails entityDetails, org.apache.hc.core5.http.protocol.HttpContext context)
     
    void
     
     
    void
    produce(org.apache.hc.core5.http.nio.DataStreamChannel channel)
     
    void
    produceRequest(org.apache.hc.core5.http.nio.RequestChannel channel, org.apache.hc.core5.http.protocol.HttpContext context)
     
    void
     
    void
    streamEnd(List<? extends org.apache.hc.core5.http.Header> trailers)
     
    void
    updateCapacity(org.apache.hc.core5.http.nio.CapacityChannel capacityChannel)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • log

      private final org.slf4j.Logger log
    • exchangeId

      private final String exchangeId
    • handler

      private final org.apache.hc.core5.http.nio.AsyncClientExchangeHandler handler
  • Constructor Details

    • LoggingAsyncClientExchangeHandler

      LoggingAsyncClientExchangeHandler(org.slf4j.Logger log, String exchangeId, org.apache.hc.core5.http.nio.AsyncClientExchangeHandler handler)
  • Method Details

    • getId

      public String getId()
      Specified by:
      getId in interface org.apache.hc.core5.util.Identifiable
    • releaseResources

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

      public void produceRequest(org.apache.hc.core5.http.nio.RequestChannel channel, org.apache.hc.core5.http.protocol.HttpContext context) throws org.apache.hc.core5.http.HttpException, IOException
      Specified by:
      produceRequest in interface org.apache.hc.core5.http.nio.AsyncClientExchangeHandler
      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
    • consumeInformation

      public void consumeInformation(org.apache.hc.core5.http.HttpResponse response, org.apache.hc.core5.http.protocol.HttpContext context) throws org.apache.hc.core5.http.HttpException, IOException
      Specified by:
      consumeInformation in interface org.apache.hc.core5.http.nio.AsyncClientExchangeHandler
      Throws:
      org.apache.hc.core5.http.HttpException
      IOException
    • consumeResponse

      public void consumeResponse(org.apache.hc.core5.http.HttpResponse response, org.apache.hc.core5.http.EntityDetails entityDetails, org.apache.hc.core5.http.protocol.HttpContext context) throws org.apache.hc.core5.http.HttpException, IOException
      Specified by:
      consumeResponse in interface org.apache.hc.core5.http.nio.AsyncClientExchangeHandler
      Throws:
      org.apache.hc.core5.http.HttpException
      IOException
    • 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
    • failed

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

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