Package com.linecorp.armeria.server
Interface DecoratingHttpServiceFunction
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A functional interface that enables building a
SimpleDecoratingHttpService
with
HttpService.decorate(DecoratingHttpServiceFunction)
.-
Method Summary
Modifier and TypeMethodDescriptionserve
(HttpService delegate, ServiceRequestContext ctx, HttpRequest req) Serves an incomingHttpRequest
.default void
Invoked when this service has been added to aServer
with the specified configuration.
-
Method Details
-
serve
HttpResponse serve(HttpService delegate, ServiceRequestContext ctx, HttpRequest req) throws Exception Serves an incomingHttpRequest
.- Parameters:
delegate
- theHttpService
being decorated by this functionctx
- the context of the receivedHttpRequest
req
- the receivedHttpRequest
- Returns:
- the
HttpResponse
- Throws:
Exception
-
serviceAdded
Invoked when this service has been added to aServer
with the specified configuration. Please note that this method can be invoked more than once if this service has been added more than once.- Throws:
Exception
-