@Override
    public void handleRequest(final RpcContext rpcCtx, final T request) {
        try {
            final Message msg = processRequest(request, new RpcRequestClosure(rpcCtx, this.defaultResp));
            if (msg != null) {
                rpcCtx.sendResponse(msg);
            }
        } catch (final Throwable t) {
            LOG.error("handleRequest {} failed", request, t);
            rpcCtx.sendResponse(RpcFactoryHelper //
                .responseFactory() //
                .newResponse(defaultResp(), -1, "handleRequest internal error"));
        }
    }
Abstract AsyncUserProcessor for RPC processors.

@param <T> Message

@author boyan (boyan@alibaba-inc.com)
@author jiachun.fjc
jraft-core/src/main/java/com/alipay/sofa/jraft/rpc/RpcRequestProcessor.java