final String params,
final boolean redactLog,
final JavaScriptObject responseCallback)
{
// get the WindowEx from the sourceWindow
final WindowEx srcWnd = sourceWindow.<WindowEx>cast();
// get the json array from the string
final JSONArray jsonParams = JSONParser.parseStrict(params).isArray();
// setup an rpc response handler that proxies back to the js object
class ResponseHandler extends RpcResponseHandler
{
@Override
public void onResponseReceived(RpcResponse response)
{
if (!srcWnd.isClosed())
performCallback(responseCallback, response);
}
public void onError(RpcError error)
{
RpcResponse errorResponse = RpcResponse.create(error);
if (!srcWnd.isClosed())
performCallback(responseCallback, errorResponse);
}
private native void performCallback(JavaScriptObject responseCallback,
RpcResponse response) /*-{