Package com.linecorp.armeria.server
Interface HttpService
- All Superinterfaces:
Service<HttpRequest,HttpResponse>
,Unwrappable
- All Known Subinterfaces:
GraphqlService
,GrpcService
,HttpServiceWithRoutes
,TransientHttpService
- All Known Implementing Classes:
AbstractGraphqlService
,AbstractHttpService
,AbstractUnaryGrpcService
,AbstractUnsafeUnaryGrpcService
,AuthService
,BraveService
,ContentPreviewingService
,CoroutineContextService
,CorsService
,DecodingService
,DocService
,EncodingService
,FileService
,HealthCheckService
,JettyService
,LoggingService
,ManagementService
,MetricCollectingService
,PrometheusExpositionService
,RedirectService
,ResteasyService
,SimpleDecoratingHttpService
,ThrottlingService
,THttpService
,TomcatService
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
An HTTP/2
Service
.-
Method Summary
Modifier and TypeMethodDescriptiondefault HttpService
decorate(DecoratingHttpServiceFunction function)
Creates a newHttpService
that decorates thisHttpService
with the specifiedDecoratingHttpServiceFunction
.decorate(Function<? super HttpService,R> decorator)
serve(ServiceRequestContext ctx, HttpRequest req)
Serves an incomingRequest
.Methods inherited from interface com.linecorp.armeria.server.Service
as, serviceAdded, shouldCachePath, unwrap
-
Method Details
-
serve
Description copied from interface:Service
Serves an incomingRequest
.- Specified by:
serve
in interfaceService<HttpRequest,HttpResponse>
- Parameters:
ctx
- the context of the receivedRequest
req
- the receivedRequest
- Returns:
- the
Response
- Throws:
Exception
-
decorate
default <R extends Service<R_I, R_O>, R_I extends Request, R_O extends Response> R decorate(Function<? super HttpService,R> decorator) -
decorate
Creates a newHttpService
that decorates thisHttpService
with the specifiedDecoratingHttpServiceFunction
.
-