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 CompletablecloseAsync()Closes thisStreamingHttpServiceasynchronously.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 createStreamingHttpResponseobjects.- Returns:
Singleof HTTP response.
-
closeAsync
default Completable closeAsync()
Closes thisStreamingHttpServiceasynchronously.- Specified by:
closeAsyncin interfaceAsyncCloseable- Returns:
Completablethat when subscribed will close thisStreamingHttpService.
-
-