protected <T> Future<T> doInvokeAsync(String httpMethod, Object body, Class<?> requestClass, Type inType, Class<?> respClass, Type outType, InvocationCallback<T> callback) { JaxrsClientCallback<T> cb = new JaxrsClientCallback<>(callback, respClass, outType); prepareAsyncClient(httpMethod, body, requestClass, inType, respClass, outType, cb); return cb.createFuture(); }
protected <T> Future<T> doInvokeAsync(String httpMethod, Object body, Class<?> requestClass, Type inType, Class<?> respClass, Type outType, InvocationCallback<T> callback) { JaxrsClientCallback<T> cb = new JaxrsClientCallback<>(callback, respClass, outType); prepareAsyncClient(httpMethod, body, requestClass, inType, respClass, outType, cb); return cb.createFuture(); }
@Override protected Object doInvokeAsync(OperationResourceInfo ori, Message outMessage, InvocationCallback<Object> asyncCallback) { MPAsyncInvocationInterceptorImpl aiiImpl = new MPAsyncInvocationInterceptorImpl(outMessage); outMessage.getInterceptorChain().add(aiiImpl); List<Interceptor<? extends Message>>inboundChain = cfg.getInInterceptors(); inboundChain.add(new MPAsyncInvocationInterceptorPostAsyncImpl(aiiImpl.getInterceptors())); inboundChain.add(new MPAsyncInvocationInterceptorRemoveContextImpl(aiiImpl.getInterceptors())); setTimeouts(cfg.getRequestContext()); super.doInvokeAsync(ori, outMessage, asyncCallback); JaxrsClientCallback<?> cb = outMessage.getExchange().get(JaxrsClientCallback.class); return cb.createFuture(); }
@Override protected Object doInvokeAsync(OperationResourceInfo ori, Message outMessage, InvocationCallback<Object> asyncCallback) { MPAsyncInvocationInterceptorImpl aiiImpl = new MPAsyncInvocationInterceptorImpl(outMessage); outMessage.getInterceptorChain().add(aiiImpl); List<Interceptor<? extends Message>>inboundChain = cfg.getInInterceptors(); inboundChain.add(new MPAsyncInvocationInterceptorPostAsyncImpl(aiiImpl.getInterceptors())); inboundChain.add(new MPAsyncInvocationInterceptorRemoveContextImpl(aiiImpl.getInterceptors())); setTimeouts(cfg.getRequestContext()); super.doInvokeAsync(ori, outMessage, asyncCallback); JaxrsClientCallback<?> cb = outMessage.getExchange().get(JaxrsClientCallback.class); return cb.createFuture(); }
Future<T> future = cb.createFuture(); if (m.getExchange().get(Exception.class) != null) { Throwable ex = m.getExchange().get(Exception.class);