Slide 30
Slide 30 text
@armeria_project
Intercepting an RPC request
● Complete access to the RPC call information
● Override the parameters and methods
ThriftCallService.of(new MyHelloService())
.decorate((delegate, ctx, req) -> {
logger.info("{} Method: {}, Params: {}",
ctx, req.method(), req.params());
RpcResponse res = delegate.serve(ctx, req);
res.thenAccept(value -> {
logger.info("{} Result: {}", ctx, value);
});
return res;
})
.decorate(THttpService.newDecorator())