Package io.servicetalk.http.api
Interface BlockingStreamingHttpRequester
-
- All Superinterfaces:
java.lang.AutoCloseable
,BlockingStreamingHttpRequestFactory
,GracefulAutoCloseable
- All Known Subinterfaces:
BlockingStreamingHttpClient
,BlockingStreamingHttpConnection
,ReservedBlockingStreamingHttpConnection
public interface BlockingStreamingHttpRequester extends BlockingStreamingHttpRequestFactory, GracefulAutoCloseable
The equivalent ofStreamingHttpRequester
but with synchronous/blocking APIs instead of asynchronous APIs.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
close()
HttpExecutionContext
executionContext()
Get theHttpExecutionContext
used during construction of this object.BlockingStreamingHttpResponseFactory
httpResponseFactory()
BlockingStreamingHttpResponse
request(HttpExecutionStrategy strategy, BlockingStreamingHttpRequest request)
Send arequest
using the passedstrategy
.-
Methods inherited from interface io.servicetalk.http.api.BlockingStreamingHttpRequestFactory
connect, delete, get, head, newRequest, options, patch, post, put, trace
-
Methods inherited from interface io.servicetalk.concurrent.GracefulAutoCloseable
closeGracefully
-
-
-
-
Method Detail
-
request
BlockingStreamingHttpResponse request(HttpExecutionStrategy strategy, BlockingStreamingHttpRequest request) throws java.lang.Exception
Send arequest
using the passedstrategy
.- Parameters:
strategy
-HttpExecutionStrategy
to use.request
- the request to send.- Returns:
- The response.
- Throws:
java.lang.Exception
- if an exception occurs during the request processing.
-
executionContext
HttpExecutionContext executionContext()
Get theHttpExecutionContext
used during construction of this object.Note that the
ExecutionContext.ioExecutor()
will not necessarily be associated with a specific thread unless that was how this object was built.- Returns:
- the
HttpExecutionContext
used during construction of this object.
-
httpResponseFactory
BlockingStreamingHttpResponseFactory httpResponseFactory()
- Returns:
- a
BlockingStreamingHttpResponseFactory
.
-
close
default void close() throws java.lang.Exception
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Throws:
java.lang.Exception
-
-