Interface PooledHttpService
- All Superinterfaces:
HttpService
,Service<HttpRequest,HttpResponse>
,Unwrappable
- All Known Implementing Classes:
AbstractPooledHttpService
,AbstractUnaryGrpcService
,AbstractUnsafeUnaryGrpcService
,SimplePooledDecoratingHttpService
- 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 PooledHttpService extends HttpService
An HTTP/2
Service
which publishes PooledHttpData
.-
Method Summary
Modifier and Type Method Description static PooledHttpService
of(HttpService delegate)
Creates aPooledHttpService
that delegates to the providedHttpService
for issuing requests.default HttpResponse
serve(ServiceRequestContext ctx, HttpRequest req)
Deprecated.Do not extend this method, extendserve(ServiceRequestContext, PooledHttpRequest)
instead because this is aPooledHttpService
.PooledHttpResponse
serve(ServiceRequestContext ctx, PooledHttpRequest req)
Serves an incomingPooledHttpRequest
.Methods inherited from interface com.linecorp.armeria.server.Service
as, serviceAdded, shouldCachePath, unwrap
-
Method Details
-
of
Creates aPooledHttpService
that delegates to the providedHttpService
for issuing requests. -
serve
@Deprecated default HttpResponse serve(ServiceRequestContext ctx, HttpRequest req) throws ExceptionDeprecated.Do not extend this method, extendserve(ServiceRequestContext, PooledHttpRequest)
instead because this is aPooledHttpService
.Called by framework to serve the request.- Specified by:
serve
in interfaceHttpService
- Specified by:
serve
in interfaceService<HttpRequest,HttpResponse>
- Parameters:
ctx
- the context of the receivedRequest
req
- the receivedRequest
- Returns:
- the
Response
- Throws:
Exception
-
serve
Serves an incomingPooledHttpRequest
.- Parameters:
ctx
- the context of the receivedPooledHttpRequest
req
- the receivedPooledHttpRequest
- Returns:
- the
PooledHttpResponse
- Throws:
Exception
-