/** Creates a new worker instance. * @return New instance of {@link XmlRpcClientWorker}. */ protected XmlRpcWorker newWorker() { return new XmlRpcClientWorker(this); } }
/** 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 a synchronous request. * @param pRequest The request being performed. * @return The requests result. * @throws XmlRpcException Performing the request failed. */ public Object execute(XmlRpcRequest pRequest) throws XmlRpcException { try { XmlRpcClient client = (XmlRpcClient) getController(); return client.getTransportFactory().getTransport().sendRequest(pRequest); } finally { factory.releaseWorker(this); } }
/** Performs a request with the clients default configuration. * @param pRequest The request being performed. * @param pCallback The callback being notified when the request is finished. * @throws XmlRpcException Performing the request failed. */ public void executeAsync(XmlRpcRequest pRequest, AsyncCallback pCallback) throws XmlRpcException { XmlRpcClientWorker w = (XmlRpcClientWorker) getWorkerFactory().getWorker(); w.execute(pRequest, pCallback); }
/** Performs a synchronous request. * @param pRequest The request being performed. * @return The requests result. * @throws XmlRpcException Performing the request failed. */ public Object execute(XmlRpcRequest pRequest) throws XmlRpcException { try { XmlRpcClient client = (XmlRpcClient) getController(); return client.getTransportFactory().getTransport().sendRequest(pRequest); } finally { factory.releaseWorker(this); } }
/** Performs a request with the clients default configuration. * @param pRequest The request being performed. * @param pCallback The callback being notified when the request is finished. * @throws XmlRpcException Performing the request failed. */ public void executeAsync(XmlRpcRequest pRequest, AsyncCallback pCallback) throws XmlRpcException { XmlRpcClientWorker w = (XmlRpcClientWorker) getWorkerFactory().getWorker(); w.execute(pRequest, pCallback); }
/** Performs a synchronous request. * @param pRequest The request being performed. * @return The requests result. * @throws XmlRpcException Performing the request failed. */ public Object execute(XmlRpcRequest pRequest) throws XmlRpcException { try { XmlRpcClient client = (XmlRpcClient) getController(); return client.getTransportFactory().getTransport().sendRequest(pRequest); } finally { factory.releaseWorker(this); } }
/** Creates a new worker instance. * @return New instance of {@link XmlRpcClientWorker}. */ protected XmlRpcWorker newWorker() { return new XmlRpcClientWorker(this); } }
/** Performs a request with the clients default configuration. * @param pRequest The request being performed. * @param pCallback The callback being notified when the request is finished. * @throws XmlRpcException Performing the request failed. */ public void executeAsync(XmlRpcRequest pRequest, AsyncCallback pCallback) throws XmlRpcException { XmlRpcClientWorker w = (XmlRpcClientWorker) getWorkerFactory().getWorker(); w.execute(pRequest, pCallback); }
/** 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 a synchronous request. * @param pRequest The request being performed. * @return The requests result. * @throws XmlRpcException Performing the request failed. */ public Object execute(XmlRpcRequest pRequest) throws XmlRpcException { try { XmlRpcClient client = (XmlRpcClient) getController(); return client.getTransportFactory().getTransport().sendRequest(pRequest); } finally { factory.releaseWorker(this); } }
/** Creates a new worker instance. * @return New instance of {@link XmlRpcClientWorker}. */ protected XmlRpcWorker newWorker() { return new XmlRpcClientWorker(this); } }
/** 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(); } }
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); } } };
/** Creates a new worker instance. * @return New instance of {@link XmlRpcClientWorker}. */ protected XmlRpcWorker newWorker() { return new XmlRpcClientWorker(this); } }
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); } } };
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); } } };