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 java.lang.Object implements org.apache.hc.core5.http.nio.AsyncClientExchangeHandler, org.apache.hc.core5.util.Identifiable
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
exchangeId
private org.apache.hc.core5.http.nio.AsyncClientExchangeHandler
handler
private org.slf4j.Logger
log
-
Constructor Summary
Constructors Constructor Description LoggingAsyncClientExchangeHandler(org.slf4j.Logger log, java.lang.String exchangeId, org.apache.hc.core5.http.nio.AsyncClientExchangeHandler handler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
available()
void
cancel()
void
consume(java.nio.ByteBuffer src)
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
failed(java.lang.Exception cause)
java.lang.String
getId()
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
releaseResources()
void
streamEnd(java.util.List<? extends org.apache.hc.core5.http.Header> trailers)
void
updateCapacity(org.apache.hc.core5.http.nio.CapacityChannel capacityChannel)
-
-
-
Method Detail
-
getId
public java.lang.String getId()
- Specified by:
getId
in interfaceorg.apache.hc.core5.util.Identifiable
-
releaseResources
public void releaseResources()
- Specified by:
releaseResources
in interfaceorg.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, java.io.IOException
- Specified by:
produceRequest
in interfaceorg.apache.hc.core5.http.nio.AsyncClientExchangeHandler
- Throws:
org.apache.hc.core5.http.HttpException
java.io.IOException
-
available
public int available()
- Specified by:
available
in interfaceorg.apache.hc.core5.http.nio.AsyncDataProducer
-
produce
public void produce(org.apache.hc.core5.http.nio.DataStreamChannel channel) throws java.io.IOException
- Specified by:
produce
in interfaceorg.apache.hc.core5.http.nio.AsyncDataProducer
- Throws:
java.io.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, java.io.IOException
- Specified by:
consumeInformation
in interfaceorg.apache.hc.core5.http.nio.AsyncClientExchangeHandler
- Throws:
org.apache.hc.core5.http.HttpException
java.io.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, java.io.IOException
- Specified by:
consumeResponse
in interfaceorg.apache.hc.core5.http.nio.AsyncClientExchangeHandler
- Throws:
org.apache.hc.core5.http.HttpException
java.io.IOException
-
updateCapacity
public void updateCapacity(org.apache.hc.core5.http.nio.CapacityChannel capacityChannel) throws java.io.IOException
- Specified by:
updateCapacity
in interfaceorg.apache.hc.core5.http.nio.AsyncDataConsumer
- Throws:
java.io.IOException
-
consume
public void consume(java.nio.ByteBuffer src) throws java.io.IOException
- Specified by:
consume
in interfaceorg.apache.hc.core5.http.nio.AsyncDataConsumer
- Throws:
java.io.IOException
-
streamEnd
public void streamEnd(java.util.List<? extends org.apache.hc.core5.http.Header> trailers) throws org.apache.hc.core5.http.HttpException, java.io.IOException
- Specified by:
streamEnd
in interfaceorg.apache.hc.core5.http.nio.AsyncDataConsumer
- Throws:
org.apache.hc.core5.http.HttpException
java.io.IOException
-
failed
public void failed(java.lang.Exception cause)
- Specified by:
failed
in interfaceorg.apache.hc.core5.http.nio.AsyncDataExchangeHandler
-
cancel
public void cancel()
- Specified by:
cancel
in interfaceorg.apache.hc.core5.http.nio.AsyncClientExchangeHandler
-
-