public RpcResponse call ( RpcRequest req ) { for ( Filter filter : filters ) { RpcRequest tmp = filter . alterRequest ( req ) ; if ( tmp != null ) { req = tmp ; } } RpcResponse resp = null ; for ( Filter filter : filters ) { resp = filter . preInvoke ( req ) ; if ( resp != null ) { break ; } } if ( resp == null ) { resp = callInternal ( req ) ; } for ( int i = filters . size ( ) - 1 ; i >= 0 ; i -- ) { RpcResponse tmp = filters . get ( i ) . postInvoke ( req , resp ) ; if ( tmp != null ) { resp = tmp ; } } return resp ; }
Calls the method associated with the RpcRequest and wraps the result as a RpcResponse .