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
FieldsModifier and TypeFieldDescriptionprivate final Stringprivate final org.apache.hc.core5.http.nio.AsyncClientExchangeHandlerprivate final org.slf4j.Logger -
Constructor Summary
ConstructorsConstructorDescriptionLoggingAsyncClientExchangeHandler(org.slf4j.Logger log, String exchangeId, org.apache.hc.core5.http.nio.AsyncClientExchangeHandler handler) -
Method Summary
Modifier and TypeMethodDescriptionintvoidcancel()voidconsume(ByteBuffer src) voidconsumeInformation(org.apache.hc.core5.http.HttpResponse response, org.apache.hc.core5.http.protocol.HttpContext context) voidconsumeResponse(org.apache.hc.core5.http.HttpResponse response, org.apache.hc.core5.http.EntityDetails entityDetails, org.apache.hc.core5.http.protocol.HttpContext context) voidgetId()voidproduce(org.apache.hc.core5.http.nio.DataStreamChannel channel) voidproduceRequest(org.apache.hc.core5.http.nio.RequestChannel channel, org.apache.hc.core5.http.protocol.HttpContext context) voidvoidvoidupdateCapacity(org.apache.hc.core5.http.nio.CapacityChannel capacityChannel)
-
Field Details
-
log
private final org.slf4j.Logger log -
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
- Specified by:
getIdin interfaceorg.apache.hc.core5.util.Identifiable
-
releaseResources
public void releaseResources()- Specified by:
releaseResourcesin 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, IOException - Specified by:
produceRequestin interfaceorg.apache.hc.core5.http.nio.AsyncClientExchangeHandler- Throws:
org.apache.hc.core5.http.HttpExceptionIOException
-
available
public int available()- Specified by:
availablein interfaceorg.apache.hc.core5.http.nio.AsyncDataProducer
-
produce
- Specified by:
producein interfaceorg.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:
consumeInformationin interfaceorg.apache.hc.core5.http.nio.AsyncClientExchangeHandler- Throws:
org.apache.hc.core5.http.HttpExceptionIOException
-
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:
consumeResponsein interfaceorg.apache.hc.core5.http.nio.AsyncClientExchangeHandler- Throws:
org.apache.hc.core5.http.HttpExceptionIOException
-
updateCapacity
public void updateCapacity(org.apache.hc.core5.http.nio.CapacityChannel capacityChannel) throws IOException - Specified by:
updateCapacityin interfaceorg.apache.hc.core5.http.nio.AsyncDataConsumer- Throws:
IOException
-
consume
- Specified by:
consumein interfaceorg.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:
streamEndin interfaceorg.apache.hc.core5.http.nio.AsyncDataConsumer- Throws:
org.apache.hc.core5.http.HttpExceptionIOException
-
failed
- Specified by:
failedin interfaceorg.apache.hc.core5.http.nio.AsyncDataExchangeHandler
-
cancel
public void cancel()- Specified by:
cancelin interfaceorg.apache.hc.core5.http.nio.AsyncClientExchangeHandler
-