@FunctionalInterface public interface RpcService extends Service<RpcRequest,RpcResponse>
Service.| Modifier and Type | Method and Description |
|---|---|
default RpcService |
decorate(DecoratingRpcServiceFunction function)
Creates a new
RpcService that decorates this RpcService with the specified
DecoratingRpcServiceFunction. |
default <R extends Service<R_I,R_O>,R_I extends Request,R_O extends Response> |
decorate(Function<? super RpcService,R> decorator)
|
RpcResponse |
serve(ServiceRequestContext ctx,
RpcRequest req)
Serves an incoming
Request. |
as, decorate, serviceAdded, shouldCachePathRpcResponse serve(ServiceRequestContext ctx, RpcRequest req) throws Exception
ServiceRequest.serve in interface Service<RpcRequest,RpcResponse>ctx - the context of the received Requestreq - the received RequestResponseExceptiondefault <R extends Service<R_I,R_O>,R_I extends Request,R_O extends Response> R decorate(Function<? super RpcService,R> decorator)
default RpcService decorate(DecoratingRpcServiceFunction function)
RpcService that decorates this RpcService with the specified
DecoratingRpcServiceFunction.Copyright © 2020 LeanCloud. All rights reserved.