public static NaviRpcProcessor buildFilterChain(final NaviRpcProcessor processor) {
        NaviRpcProcessor last = processor;
        List<Filter> filterList = ExtensionLocator.getInstanceList(Filter.class);
        if (CollectionUtil.isNotEmpty(filterList)) {
            for (int i = filterList.size() - 1; i >= 0; i--) {
                final Filter filter = filterList.get(i);
                final NaviRpcProcessor next = last;
                last = new NaviRpcProcessor() {
                    @Override
                    public void service(NaviRpcRequest request, Callback<NaviRpcResponse> callback) {
                        filter.doChain(next, request, new FilterCallback(callback, filter));
                    }
                };
                LOG.info("Place " + filter.getClass().getName() + " filter to core processor");
            }
        }
        return last;
    }
public static NaviRpcProcessor buildFilterChain ( final NaviRpcProcessor processor ) { NaviRpcProcessor last = processor ; List < Filter > filterList = ExtensionLocator . getInstanceList ( Filter . class ) ; if ( CollectionUtil . isNotEmpty ( filterList ) ) { for ( int i = filterList . size ( ) - 1 ; i >= 0 ; i -- ) { final Filter filter = filterList . get ( i ) ; final NaviRpcProcessor next = last ; last = new NaviRpcProcessor ( ) { @ Override public void service ( NaviRpcRequest request , Callback < NaviRpcResponse > callback ) { filter . doChain ( next , request , new FilterCallback ( callback , filter ) ) ; } } ; LOG . info ( "Place " + filter . getClass ( ) . getName ( ) + " filter to core processor" ) ; } } return last ; }
构造调用链

@param processor
@return