private < T > RequestBuilder doPrepareRequestBuilderImpl ( ResponseReader responseReader , String methodName , RpcStatsContext statsContext , String requestData , AsyncCallback < T > callback ) { if ( getServiceEntryPoint ( ) == null ) { throw new NoServiceEntryPointSpecifiedException ( ) ; } RequestCallback responseHandler = doCreateRequestCallback ( responseReader , methodName , statsContext , callback ) ; ensureRpcRequestBuilder ( ) ; rpcRequestBuilder . create ( getServiceEntryPoint ( ) ) ; rpcRequestBuilder . setCallback ( responseHandler ) ; // changed code rpcRequestBuilder . setSync ( isSync ( methodName ) ) ; // changed code rpcRequestBuilder . setContentType ( RPC_CONTENT_TYPE ) ; rpcRequestBuilder . setRequestData ( requestData ) ; rpcRequestBuilder . setRequestId ( statsContext . getRequestId ( ) ) ; return rpcRequestBuilder . finish ( ) ; }
Configures a RequestBuilder to send an RPC request .