Package org.zalando.logbook.httpclient
Class LogbookHttpAsyncResponseConsumer<T>
- java.lang.Object
-
- org.zalando.logbook.httpclient.LogbookHttpAsyncResponseConsumer<T>
-
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.http.concurrent.Cancellable,org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T>
@API(status=EXPERIMENTAL) public final class LogbookHttpAsyncResponseConsumer<T> extends Object
-
-
Constructor Summary
Constructors Constructor Description LogbookHttpAsyncResponseConsumer(org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T> consumer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancancel()voidclose()voidconsumeContent(org.apache.http.nio.ContentDecoder decoder, org.apache.http.nio.IOControl control)protected org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T>delegate()voidfailed(Exception e)ExceptiongetException()TgetResult()booleanisDone()voidresponseCompleted(org.apache.http.protocol.HttpContext context)voidresponseReceived(org.apache.http.HttpResponse response)
-
-
-
Constructor Detail
-
LogbookHttpAsyncResponseConsumer
public LogbookHttpAsyncResponseConsumer(org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T> consumer)
-
-
Method Detail
-
delegate
protected org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T> delegate()
-
responseReceived
public void responseReceived(org.apache.http.HttpResponse response) throws IOException, org.apache.http.HttpException- Specified by:
responseReceivedin interfaceorg.apache.http.nio.protocol.HttpAsyncResponseConsumer<T>- Throws:
IOExceptionorg.apache.http.HttpException
-
responseCompleted
public void responseCompleted(org.apache.http.protocol.HttpContext context)
- Specified by:
responseCompletedin interfaceorg.apache.http.nio.protocol.HttpAsyncResponseConsumer<T>
-
consumeContent
public void consumeContent(org.apache.http.nio.ContentDecoder decoder, org.apache.http.nio.IOControl control) throws IOException- Specified by:
consumeContentin interfaceorg.apache.http.nio.protocol.HttpAsyncResponseConsumer<T>- Throws:
IOException
-
cancel
public boolean cancel()
- Specified by:
cancelin interfaceorg.apache.http.concurrent.Cancellable
-
isDone
public boolean isDone()
- Specified by:
isDonein interfaceorg.apache.http.nio.protocol.HttpAsyncResponseConsumer<T>
-
getResult
public T getResult()
- Specified by:
getResultin interfaceorg.apache.http.nio.protocol.HttpAsyncResponseConsumer<T>
-
failed
public void failed(Exception e)
- Specified by:
failedin interfaceorg.apache.http.nio.protocol.HttpAsyncResponseConsumer<T>
-
getException
public Exception getException()
- Specified by:
getExceptionin interfaceorg.apache.http.nio.protocol.HttpAsyncResponseConsumer<T>
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-