return createStatusExtractor(false); if (link != null) return processLinkHeader(method, returnType, link); return createResponseTypeEntityExtractor(method);
private URL getURL(final Method method, final LinkHeaderParam link, ClientRequestContext context) { URI uri = getURI(method, link, context); try { return uri == null ? null : uri.toURL(); } catch (MalformedURLException e) { throw new RuntimeException(Messages.MESSAGES.couldNotCreateURI(uri.toASCIIString(), method.getClass().getName(), method.getName()), e); } } }
public EntityExtractor createExtractor(final Method method) { final Class returnType = method.getReturnType(); if (isVoidReturnType(returnType)) return createVoidExtractor(true); if (returnType.equals(Response.Status.class)) return createStatusExtractor(true); if (Response.class.isAssignableFrom(returnType)) return createResponseTypeEntityExtractor(method); if (returnType.isInterface() && returnType.isAnnotationPresent(ResponseObject.class)) return new ResponseObjectProxy(method, new ResponseObjectEntityExtractorFactory()); // We are not a ClientResponse type so we need to unmarshall and narrow it // to right type. If we are unable to unmarshall, or encounter any kind of // Exception, give the ClientErrorHandlers a chance to handle the // ClientResponse manually. return new BodyEntityExtractor(method); }
return createStatusExtractor(false); if (link != null) return processLinkHeader(method, returnType, link); return createResponseTypeEntityExtractor(method);
private URL getURL(final Method method, final LinkHeaderParam link, ClientRequestContext context) { URI uri = getURI(method, link, context); try { return uri == null ? null : uri.toURL(); } catch (MalformedURLException e) { throw new RuntimeException(Messages.MESSAGES.couldNotCreateURI(uri.toASCIIString(), method.getClass().getName(), method.getName()), e); } } }
public EntityExtractor createExtractor(final Method method) { final Class returnType = method.getReturnType(); if (isVoidReturnType(returnType)) return createVoidExtractor(true); if (returnType.equals(Response.Status.class)) return createStatusExtractor(true); if (Response.class.isAssignableFrom(returnType)) return createResponseTypeEntityExtractor(method); if (returnType.isInterface() && returnType.isAnnotationPresent(ResponseObject.class)) return new ResponseObjectProxy(method, new ResponseObjectEntityExtractorFactory()); // We are not a ClientResponse type so we need to unmarshall and narrow it // to right type. If we are unable to unmarshall, or encounter any kind of // Exception, give the ClientErrorHandlers a chance to handle the // ClientResponse manually. return new BodyEntityExtractor(method); }