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 method. |
available, mark, markSupported, read, read, read, reset, skip
public BodyDeferringInputStream(Future<Response> future, BodyDeferringAsyncHandler bdah, InputStream in)
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class FilterInputStream
IOException
public Response getAsapResponse() throws InterruptedException, IOException
BodyDeferringAsyncHandler.getResponse()
. Will
blocks as long as headers arrives only. Might return
null
. See
BodyDeferringAsyncHandler.getResponse()
method for details.Response
InterruptedException
IOException
public Response getLastResponse() throws InterruptedException, ExecutionException
Future#get()
method. Will block
as long as complete response arrives.Response
InterruptedException
ExecutionException
Copyright © 2015. All Rights Reserved.