Class SimplePooledDecoratingHttpService
java.lang.Object
com.linecorp.armeria.common.util.AbstractUnwrappable<Service<T_I,T_O>>
com.linecorp.armeria.server.DecoratingService<I,O,I,O>
com.linecorp.armeria.server.SimpleDecoratingService<HttpRequest,HttpResponse>
com.linecorp.armeria.server.SimpleDecoratingHttpService
com.linecorp.armeria.server.unsafe.SimplePooledDecoratingHttpService
- All Implemented Interfaces:
Unwrappable
,HttpService
,Service<HttpRequest,HttpResponse>
,PooledHttpService
public abstract class SimplePooledDecoratingHttpService extends SimpleDecoratingHttpService implements PooledHttpService
- See Also:
SimpleDecoratingHttpService
,PooledHttpData
-
Constructor Summary
Constructors Modifier Constructor Description protected
SimplePooledDecoratingHttpService(HttpService delegate)
Creates a new instance that decorates the specifiedHttpService
. -
Method Summary
Modifier and Type Method Description HttpResponse
serve(ServiceRequestContext ctx, HttpRequest req)
Called by framework to serve the request.PooledHttpResponse
serve(ServiceRequestContext ctx, PooledHttpRequest req)
Serves an incomingPooledHttpRequest
.protected abstract HttpResponse
serve(PooledHttpService delegate, ServiceRequestContext ctx, PooledHttpRequest req)
Executes thereq
with the givenctx
.Methods inherited from class com.linecorp.armeria.server.DecoratingService
serviceAdded, shouldCachePath
Methods inherited from class com.linecorp.armeria.common.util.AbstractUnwrappable
as, delegate, toString, unwrap
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.linecorp.armeria.server.Service
as, serviceAdded, shouldCachePath, unwrap
-
Constructor Details
-
SimplePooledDecoratingHttpService
Creates a new instance that decorates the specifiedHttpService
.
-
-
Method Details
-
serve
Description copied from interface:PooledHttpService
Called by framework to serve the request.- Specified by:
serve
in interfaceHttpService
- Specified by:
serve
in interfacePooledHttpService
- Specified by:
serve
in interfaceService<HttpRequest,HttpResponse>
- Parameters:
ctx
- the context of the receivedRequest
req
- the receivedRequest
- Returns:
- the
Response
- Throws:
Exception
-
serve
public final PooledHttpResponse serve(ServiceRequestContext ctx, PooledHttpRequest req) throws ExceptionDescription copied from interface:PooledHttpService
Serves an incomingPooledHttpRequest
.- Specified by:
serve
in interfacePooledHttpService
- Parameters:
ctx
- the context of the receivedPooledHttpRequest
req
- the receivedPooledHttpRequest
- Returns:
- the
PooledHttpResponse
- Throws:
Exception
-
serve
protected abstract HttpResponse serve(PooledHttpService delegate, ServiceRequestContext ctx, PooledHttpRequest req) throws ExceptionExecutes thereq
with the givenctx
.- Throws:
Exception
- See Also:
HttpService.serve(ServiceRequestContext, HttpRequest)
-