Examples of ClientRequestImpl


Examples of com.sun.jersey.client.impl.ClientRequestImpl

    public <T> Future<T> get(GenericType<T> gt) throws UniformInterfaceException {
        return handle(gt, new ClientRequestImpl(getURI(), "GET"));
    }

    public <T> Future<T> get(ITypeListener<T> l) {
        return handle(l, new ClientRequestImpl(getURI(), "GET"));
    }
View Full Code Here

Examples of com.sun.jersey.client.impl.ClientRequestImpl

    public <T> Future<T> get(ITypeListener<T> l) {
        return handle(l, new ClientRequestImpl(getURI(), "GET"));
    }

    public Future<?> put() throws UniformInterfaceException {
        return voidHandle(new ClientRequestImpl(getURI(), "PUT", null));
    }
View Full Code Here

Examples of com.sun.jersey.client.impl.ClientRequestImpl

    public Future<?> put() throws UniformInterfaceException {
        return voidHandle(new ClientRequestImpl(getURI(), "PUT", null));
    }

    public Future<?> put(Object requestEntity) throws UniformInterfaceException {
        return voidHandle(new ClientRequestImpl(getURI(), "PUT", requestEntity));
    }
View Full Code Here

Examples of com.sun.jersey.client.impl.ClientRequestImpl

    public Future<?> put(Object requestEntity) throws UniformInterfaceException {
        return voidHandle(new ClientRequestImpl(getURI(), "PUT", requestEntity));
    }

    public <T> Future<T> put(Class<T> c) throws UniformInterfaceException {
        return handle(c, new ClientRequestImpl(getURI(), "PUT"));
    }
View Full Code Here

Examples of com.sun.jersey.client.impl.ClientRequestImpl

    public <T> Future<T> put(Class<T> c) throws UniformInterfaceException {
        return handle(c, new ClientRequestImpl(getURI(), "PUT"));
    }

    public <T> Future<T> put(GenericType<T> gt) throws UniformInterfaceException {
        return handle(gt, new ClientRequestImpl(getURI(), "PUT"));
    }
View Full Code Here

Examples of com.sun.jersey.client.impl.ClientRequestImpl

    public <T> Future<T> put(GenericType<T> gt) throws UniformInterfaceException {
        return handle(gt, new ClientRequestImpl(getURI(), "PUT"));
    }

    public <T> Future<T> put(ITypeListener<T> l) {
        return handle(l, new ClientRequestImpl(getURI(), "PUT"));
    }
View Full Code Here

Examples of com.sun.jersey.client.impl.ClientRequestImpl

    public <T> Future<T> put(ITypeListener<T> l) {
        return handle(l, new ClientRequestImpl(getURI(), "PUT"));
    }

    public <T> Future<T> put(Class<T> c, Object requestEntity) throws UniformInterfaceException {
        return handle(c, new ClientRequestImpl(getURI(), "PUT", requestEntity));
    }
View Full Code Here

Examples of com.sun.jersey.client.impl.ClientRequestImpl

    public <T> Future<T> put(Class<T> c, Object requestEntity) throws UniformInterfaceException {
        return handle(c, new ClientRequestImpl(getURI(), "PUT", requestEntity));
    }

    public <T> Future<T> put(GenericType<T> gt, Object requestEntity) throws UniformInterfaceException {
        return handle(gt, new ClientRequestImpl(getURI(), "PUT", requestEntity));
    }
View Full Code Here

Examples of org.apache.wink.client.internal.handlers.ClientRequestImpl

    private <T> ClientRequest createClientRequest(String method,
                                                  Class<T> responseEntity,
                                                  Type responseEntityType,
                                                  Object requestEntity) {
        ClientRequest request = new ClientRequestImpl();
        request.setEntity(requestEntity);
        request.setURI(uriBuilder.build());
        request.setMethod(method);
        request.getHeaders().putAll(headers);
        if (headers.getFirst(HttpHeaders.ACCEPT) == null) {
            request.getHeaders().add(HttpHeaders.ACCEPT, MediaType.WILDCARD);
        }
        if (headers.getFirst(HttpHeaders.USER_AGENT) == null) {
            request.getHeaders().add(HttpHeaders.USER_AGENT, USER_AGENT);
        }

        request.getAttributes().putAll(attributes);
        request.setAttribute(ProvidersRegistry.class, providersRegistry);
        request.setAttribute(ClientConfig.class, config);
        request.getAttributes().put(ClientRequestImpl.RESPONSE_ENTITY_GENERIC_TYPE,
                                    responseEntityType);
        request.getAttributes().put(ClientRequestImpl.RESPONSE_ENTITY_CLASS_TYPE, responseEntity);
        return request;
    }
View Full Code Here

Examples of org.apache.wink.client.internal.handlers.ClientRequestImpl

    private <T> ClientRequest createClientRequest(String method,
                                                  Class<T> responseEntity,
                                                  Type responseEntityType,
                                                  Object requestEntity) {
        ClientRequest request = new ClientRequestImpl();
        request.setEntity(requestEntity);
        URI requestURI = uriBuilder.build();
        request.setURI(requestURI);
        request.setMethod(method);
        request.getHeaders().putAll(headers);
        if (logger.isInfoEnabled()) {
            Class<?> requestEntityClass = (requestEntity == null) ? null : requestEntity.getClass();
            logger.info(Messages.getMessage("clientIssueRequest"), new Object[] {method,
                requestURI, requestEntityClass, headers});
        }
        if (headers.getFirst(HttpHeaders.USER_AGENT) == null) {
            request.getHeaders().add(HttpHeaders.USER_AGENT, USER_AGENT);
        }

        request.getAttributes().putAll(attributes);
        request.setAttribute(ProvidersRegistry.class, providersRegistry);
        request.setAttribute(ClientConfig.class, config);
        request.getAttributes().put(ClientRequestImpl.RESPONSE_ENTITY_GENERIC_TYPE,
                                    responseEntityType);
        request.getAttributes().put(ClientRequestImpl.RESPONSE_ENTITY_CLASS_TYPE, responseEntity);
        return request;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.