public static class BodyDeferringAsyncHandler.BodyDeferringInputStream extends FilterInputStream
in| Constructor and Description |
|---|
BodyDeferringInputStream(Future<Response> future,
BodyDeferringAsyncHandler bdah,
InputStream in) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the input stream, and "joins" (wait for complete execution
together with potential exception thrown) of the async request.
|
Response |
getAsapResponse()
Delegates to
BodyDeferringAsyncHandler.getResponse(). |
Response |
getLastResponse()
Delegates to
Future$lt;Response>#get() method. |
available, mark, markSupported, read, read, read, reset, skippublic BodyDeferringInputStream(Future<Response> future, BodyDeferringAsyncHandler bdah, InputStream in)
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FilterInputStreamIOExceptionpublic Response getAsapResponse() throws InterruptedException, IOException
BodyDeferringAsyncHandler.getResponse(). Will
blocks as long as headers arrives only. Might return
null. See
BodyDeferringAsyncHandler.getResponse() method for details.ResponseInterruptedException - if the latch is interruptedIOException - if the handler completed with an exceptionpublic Response getLastResponse() throws InterruptedException, ExecutionException
Future$lt;Response>#get() method. Will block
as long as complete response arrives.ResponseExecutionException - if the computation threw an exceptionInterruptedException - if the current thread was interruptedCopyright © 2016. All Rights Reserved.