Package io.servicetalk.http.api
Interface StreamingHttpService
-
- All Superinterfaces:
AsyncCloseable
- All Known Implementing Classes:
StreamingHttpServiceFilter
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface StreamingHttpService extends AsyncCloseable
A service contract for the HTTP protocol.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Completable
closeAsync()
Closes thisStreamingHttpService
asynchronously.Single<StreamingHttpResponse>
handle(HttpServiceContext ctx, StreamingHttpRequest request, StreamingHttpResponseFactory responseFactory)
Handles a single HTTP request.-
Methods inherited from interface io.servicetalk.concurrent.api.AsyncCloseable
closeAsyncGracefully
-
-
-
-
Method Detail
-
handle
Single<StreamingHttpResponse> handle(HttpServiceContext ctx, StreamingHttpRequest request, StreamingHttpResponseFactory responseFactory)
Handles a single HTTP request.- Parameters:
ctx
- Context of the service.request
- to handle.responseFactory
- used to createStreamingHttpResponse
objects.- Returns:
Single
of HTTP response.
-
closeAsync
default Completable closeAsync()
Closes thisStreamingHttpService
asynchronously.- Specified by:
closeAsync
in interfaceAsyncCloseable
- Returns:
Completable
that when subscribed will close thisStreamingHttpService
.
-
-