Package javax.ws.rs.client

Examples of javax.ws.rs.client.ClientException


            new org.apache.cxf.common.i18n.Message(name,
                                                   BUNDLE,
                                                   cls,
                                                   JAXRSUtils.mediaTypeToString(ct));
        LOG.severe(errorMsg.toString());
        throw new ClientException(errorMsg.toString(), cause);
    }
View Full Code Here


   
    @Override
    public boolean cancel(boolean mayInterruptIfRunning) {
        boolean result = super.cancel(mayInterruptIfRunning);
        if (result && handler != null) {
            handler.failed(new ClientException(new CancellationException()));
        }
        return result;
    }
View Full Code Here

    @Override
    public void handleException(Map<String, Object> ctx, final Throwable ex) {
        context = ctx;
        exception = ex;
        if (handler != null) {
            handler.failed(new ClientException(exception));
        }
        done = true;
        synchronized (this) {
            notifyAll();
        }
View Full Code Here

            }
        } catch (Exception ex) {
            Throwable t = ex instanceof WebApplicationException
                ? (WebApplicationException)ex
                : ex instanceof ClientException
                ? (ClientException)ex : new ClientException(ex);
            cb.handleException(message, t);
            return;
        }
        if (r == null) {
            try {
View Full Code Here

            }
        } catch (Exception ex) {
            throw ex instanceof WebApplicationException
                ? (WebApplicationException)ex
                : ex instanceof ClientException
                ? new ClientException(ex) : new RuntimeException(ex);
        }
       
        Response response = null;
        Object entity = null;
        try {
View Full Code Here

            getState().setResponse(r);
           
            return r;
        } catch (Throwable ex) {
            throw (ex instanceof ClientException) ? (ClientException)ex
                                                  : new ClientException(ex);
        } finally {
            ProviderFactory.getInstance(outMessage).clearThreadLocalProxies();
        }
    }
View Full Code Here

            new org.apache.cxf.common.i18n.Message(name,
                                                   BUNDLE,
                                                   m.getDeclaringClass().getName(),
                                                   m.getName());
        LOG.severe(errorMsg.toString());
        throw new ClientException(errorMsg.toString());
    }
View Full Code Here

        public T get() throws InterruptedException, ExecutionException {
            try {
                return getObject(callback.get()[0]);
            } catch (InterruptedException ex) {
                if (callback.handler != null) {
                    callback.handler.failed(new ClientException((InterruptedException)ex));
                }
                throw ex;
            }
        }
View Full Code Here

            ExecutionException, TimeoutException {
            try {
                return getObject(callback.get(timeout, unit)[0]);
            } catch (InterruptedException ex) {
                if (callback.handler != null) {
                    callback.handler.failed(new ClientException((InterruptedException)ex));
                }
                throw ex;
            }
        }
View Full Code Here

                return;
            }
        }
       
        if (getResponseCode(exchange) == null) {
            throw new ClientException("Response timeout");
        }
    }
View Full Code Here

TOP

Related Classes of javax.ws.rs.client.ClientException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.