Package com.linecorp.armeria.server
Interface RpcService
- All Superinterfaces:
Service<RpcRequest,,RpcResponse> Unwrappable
- All Known Subinterfaces:
RpcServiceWithRoutes,TransientRpcService
- All Known Implementing Classes:
SimpleDecoratingRpcService,ThriftCallService,ThrottlingRpcService
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
An RPC
Service.-
Method Summary
Modifier and TypeMethodDescriptiondefault RpcServicedecorate(DecoratingRpcServiceFunction function) Creates a newRpcServicethat decorates thisRpcServicewith the specifiedDecoratingRpcServiceFunction.decorate(Function<? super RpcService, R> decorator) serve(ServiceRequestContext ctx, RpcRequest req) Serves an incomingRequest.Methods inherited from interface com.linecorp.armeria.server.Service
as, serviceAdded, shouldCachePath, unwrapMethods inherited from interface com.linecorp.armeria.common.util.Unwrappable
equalsIgnoreWrapper, unwrapAll
-
Method Details
-
serve
Description copied from interface:ServiceServes an incomingRequest.- Specified by:
servein interfaceService<RpcRequest,RpcResponse> - Parameters:
ctx- the context of the receivedRequestreq- the receivedRequest- Returns:
- the
Response - Throws:
Exception
-
decorate
default <R extends Service<R_I,R_O>, R decorateR_I extends Request, R_O extends Response> (Function<? super RpcService, R> decorator) -
decorate
Creates a newRpcServicethat decorates thisRpcServicewith the specifiedDecoratingRpcServiceFunction.
-