public String callRPC ( String name , boolean async , int timeout , RPCParameters params ) { ensureConnection ( ) ; String version = "" ; String context = connectionParams . getAppid ( ) ; if ( name . contains ( ":" ) ) { String pcs [ ] = StrUtil . split ( name , ":" , 3 , true ) ; name = pcs [ 0 ] ; version = pcs [ 1 ] ; context = pcs [ 2 ] . isEmpty ( ) ? context : pcs [ 2 ] ; } Request request = new Request ( Action . RPC ) ; request . addParameter ( "UID" , id ) ; request . addParameter ( "CTX" , context ) ; request . addParameter ( "VER" , version ) ; request . addParameter ( "RPC" , name ) ; request . addParameter ( "ASY" , async ) ; if ( params != null ) { request . addParameters ( params ) ; } Response response = netCall ( request , timeout ) ; return response . getData ( ) ; }
Performs a remote procedure call .