/** Performs an synchronous request. * @param pRequest The request being performed. * @param pCallback The callback being invoked, when the request is finished. */ public void execute(final XmlRpcRequest pRequest, final AsyncCallback pCallback) { Runnable runnable = new Runnable(){ public void run(){ Object result = null; Throwable th = null; try { XmlRpcClient client = (XmlRpcClient) getController(); result = client.getTransportFactory().getTransport().sendRequest(pRequest); } catch (Throwable t) { th = t; } factory.releaseWorker(XmlRpcClientWorker.this); if (th == null) { pCallback.handleResult(pRequest, result); } else { pCallback.handleError(pRequest, th); } } }; newThread(runnable).start(); } }
/** Performs an synchronous request. * @param pRequest The request being performed. * @param pCallback The callback being invoked, when the request is finished. */ public void execute(final XmlRpcRequest pRequest, final AsyncCallback pCallback) { Runnable runnable = new Runnable(){ public void run(){ Object result = null; Throwable th = null; try { XmlRpcClient client = (XmlRpcClient) getController(); result = client.getTransportFactory().getTransport().sendRequest(pRequest); } catch (Throwable t) { th = t; } factory.releaseWorker(XmlRpcClientWorker.this); if (th == null) { pCallback.handleResult(pRequest, result); } else { pCallback.handleError(pRequest, th); } } }; newThread(runnable).start(); } }
/** Performs an synchronous request. * @param pRequest The request being performed. * @param pCallback The callback being invoked, when the request is finished. */ public void execute(final XmlRpcRequest pRequest, final AsyncCallback pCallback) { Runnable runnable = new Runnable(){ public void run(){ Object result = null; Throwable th = null; try { XmlRpcClient client = (XmlRpcClient) getController(); result = client.getTransportFactory().getTransport().sendRequest(pRequest); } catch (Throwable t) { th = t; } factory.releaseWorker(XmlRpcClientWorker.this); if (th == null) { pCallback.handleResult(pRequest, result); } else { pCallback.handleError(pRequest, th); } } }; newThread(runnable).start(); } }