@Override public void setMethod(String method) { invocation.setMethod(method); }
@Override public Invocation build(String method, Entity<?> entity) { invocation.setMethod(method); invocation.setEntity(entity); return createClientInvocation(this.invocation); }
@Override public <T> Future<T> method(String name, InvocationCallback<T> callback) { invocation.setMethod(name); invocation.setEntity(null); return invocation.submit(callback); }
@Override public <T> Future<T> method(String name, GenericType<T> responseType) { invocation.setMethod(name); invocation.setEntity(null); return invocation.submit(responseType); }
@Override public <T> Future<T> method(String name, Class<T> responseType) { invocation.setMethod(name); invocation.setEntity(null); return invocation.submit(responseType); }
@Override public Future<Response> method(String name, Entity<?> entity) { invocation.setMethod(name); invocation.setEntity(entity); return invocation.submit(); }
@Override public <T> Future<T> method(String name, Entity<?> entity, Class<T> responseType) { invocation.setMethod(name); invocation.setEntity(entity); return invocation.submit(responseType); }
@Override public <T> Future<T> method(String name, Entity<?> entity, GenericType<T> responseType) { invocation.setMethod(name); invocation.setEntity(entity); return invocation.submit(responseType); }
@Override public <T> Future<T> method(String name, Entity<?> entity, InvocationCallback<T> callback) { invocation.setMethod(name); invocation.setEntity(entity); return invocation.submit(callback); }
@Override public Future<Response> method(String name) { invocation.setMethod(name); invocation.setEntity(null); return invocation.submit(); }
protected ClientInvocation createRequest(Object[] args) { WebTarget target = this.webTarget; for (int i = 0; i < processors.length; i++) { if (processors != null && processors[i] instanceof WebTargetProcessor) { WebTargetProcessor processor = (WebTargetProcessor)processors[i]; target = processor.build(target, args[i]); } } ClientConfiguration parentConfiguration=(ClientConfiguration) target.getConfiguration(); ClientInvocation clientInvocation = new ClientInvocation(this.webTarget.getResteasyClient(), target.getUri(), new ClientRequestHeaders(parentConfiguration), parentConfiguration); clientInvocation.setClientInvoker(this); if (accepts != null) { clientInvocation.getHeaders().accept(accepts); } for (int i = 0; i < processors.length; i++) { if (processors != null && processors[i] instanceof InvocationProcessor) { InvocationProcessor processor = (InvocationProcessor)processors[i]; processor.process(clientInvocation, args[i]); } } clientInvocation.setMethod(httpMethod); return clientInvocation; }
@Override public <T> Future<T> get(InvocationCallback<T> callback) { invocation.setMethod(HttpMethod.GET); return invocation.submit(callback); }
@Override public Future<Response> trace() { invocation.setMethod("TRACE"); return invocation.submit(); }
@Override public <T> Future<T> delete(Class<T> responseType) { invocation.setMethod(HttpMethod.DELETE); return invocation.submit(responseType); }
@Override public Future<Response> options() { invocation.setMethod(HttpMethod.OPTIONS); return invocation.submit(); }
@Override public <T> Future<T> options(Class<T> responseType) { invocation.setMethod(HttpMethod.OPTIONS); return invocation.submit(responseType); }
@Override public <T> Future<T> post(Entity<?> entity, GenericType<T> responseType) { invocation.setMethod(HttpMethod.POST); invocation.setEntity(entity); return invocation.submit(responseType); }
@Override public <T> Future<T> put(Entity<?> entity, Class<T> responseType) { invocation.setMethod(HttpMethod.PUT); invocation.setEntity(entity); return invocation.submit(responseType); }
@Override public Future<Response> post(Entity<?> entity) { invocation.setMethod(HttpMethod.POST); invocation.setEntity(entity); return invocation.submit(); }
@Override public <T> Future<T> method(String name, Entity<?> entity, GenericType<T> responseType) { invocation.setMethod(name); invocation.setEntity(entity); return invocation.submit(responseType); }