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 voidInvoked when this service has been added to aServerwith the specified configuration.
-
Method Details
-
serve
HttpResponse serve(HttpService delegate, ServiceRequestContext ctx, HttpRequest req) throws Exception Serves an incomingHttpRequest.- Parameters:
delegate- theHttpServicebeing decorated by this functionctx- the context of the receivedHttpRequestreq- the receivedHttpRequest- Returns:
- the
HttpResponse - Throws:
Exception
-
serviceAdded
Invoked when this service has been added to aServerwith 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
-