Package io.servicetalk.http.api
Interface BlockingHttpService
-
- All Superinterfaces:
java.lang.AutoCloseable,GracefulAutoCloseable
- 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 BlockingHttpService extends GracefulAutoCloseable
The equivalent ofHttpServicebut with synchronous/blocking APIs instead of asynchronous APIs.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidclose()HttpResponsehandle(HttpServiceContext ctx, HttpRequest request, HttpResponseFactory responseFactory)Handles a single HTTP request.-
Methods inherited from interface io.servicetalk.concurrent.GracefulAutoCloseable
closeGracefully
-
-
-
-
Method Detail
-
handle
HttpResponse handle(HttpServiceContext ctx, HttpRequest request, HttpResponseFactory responseFactory) throws java.lang.Exception
Handles a single HTTP request.- Parameters:
ctx- Context of the service.request- to handle.responseFactory- used to createHttpResponseobjects.- Returns:
Singleof HTTP response.- Throws:
java.lang.Exception- If an exception occurs during request processing.
-
close
default void close() throws java.lang.Exception- Specified by:
closein interfacejava.lang.AutoCloseable- Throws:
java.lang.Exception
-
-