/** * Same as {@link #run()} but allows you to run the call asynchronously. * * @return The HTTP status code. * @throws RestCallException If the executor service was not defined. * @see RestClientBuilder#executorService(ExecutorService, boolean) for defining the executor service for creating * {@link Future Futures}. */ public Future<Integer> runFuture() throws RestCallException { return client.getExecutorService(true).submit( new Callable<Integer>() { @Override /* Callable */ public Integer call() throws Exception { return run(); } } ); }
/** * Same as {@link #run()} but allows you to run the call asynchronously. * * @return The HTTP status code. * @throws RestCallException If the executor service was not defined. * @see RestClientBuilder#executorService(ExecutorService, boolean) for defining the executor service for creating * {@link Future Futures}. */ public Future<Integer> runFuture() throws RestCallException { return client.getExecutorService(true).submit( new Callable<Integer>() { @Override /* Callable */ public Integer call() throws Exception { return run(); } } ); }
/** * Same as {@link #getResponse(Class)} but allows you to run the call asynchronously. * * @return The response as a string. * @throws RestCallException If the executor service was not defined. * @see * RestClientBuilder#executorService(ExecutorService, boolean) for defining the executor service for creating * {@link Future Futures}. */ public Future<String> getResponseAsStringFuture() throws RestCallException { return client.getExecutorService(true).submit( new Callable<String>() { @Override /* Callable */ public String call() throws Exception { return getResponseAsString(); } } ); }
/** * Same as {@link #run()} but allows you to run the call asynchronously. * * @return The HTTP status code. * @throws RestCallException If the executor service was not defined. * @see RestClientBuilder#executorService(ExecutorService, boolean) for defining the executor service for creating * {@link Future Futures}. */ public Future<Integer> runFuture() throws RestCallException { return client.getExecutorService(true).submit( new Callable<Integer>() { @Override /* Callable */ public Integer call() throws Exception { return run(); } } ); }
/** * Same as {@link #getResponse(Class)} but allows you to run the call asynchronously. * * @return The response as a string. * @throws RestCallException If the executor service was not defined. * @see * RestClientBuilder#executorService(ExecutorService, boolean) for defining the executor service for creating * {@link Future Futures}. */ public Future<String> getResponseAsStringFuture() throws RestCallException { return client.getExecutorService(true).submit( new Callable<String>() { @Override /* Callable */ public String call() throws Exception { return getResponseAsString(); } } ); }
/** * Same as {@link #getResponse(Class)} but allows you to run the call asynchronously. * * @return The response as a string. * @throws RestCallException If the executor service was not defined. * @see * RestClientBuilder#executorService(ExecutorService, boolean) for defining the executor service for creating * {@link Future Futures}. */ public Future<String> getResponseAsStringFuture() throws RestCallException { return client.getExecutorService(true).submit( new Callable<String>() { @Override /* Callable */ public String call() throws Exception { return getResponseAsString(); } } ); }
/** * Same as {@link #getResponse(Class)} but allows you to run the call asynchronously. * * @param <T> * The class type of the object being created. * See {@link #getResponse(Type, Type...)} for details. * @param type The object type to create. * @return The parsed object. * @throws RestCallException If the executor service was not defined. * @see * RestClientBuilder#executorService(ExecutorService, boolean) for defining the executor service for creating * {@link Future Futures}. */ public <T> Future<T> getResponseFuture(final Class<T> type) throws RestCallException { return client.getExecutorService(true).submit( new Callable<T>() { @Override /* Callable */ public T call() throws Exception { return getResponse(type); } } ); }
/** * Same as {@link #getResponse(Class)} but allows you to run the call asynchronously. * * @param <T> * The class type of the object being created. * See {@link #getResponse(Type, Type...)} for details. * @param type The object type to create. * @return The parsed object. * @throws RestCallException If the executor service was not defined. * @see * RestClientBuilder#executorService(ExecutorService, boolean) for defining the executor service for creating * {@link Future Futures}. */ public <T> Future<T> getResponseFuture(final Class<T> type) throws RestCallException { return client.getExecutorService(true).submit( new Callable<T>() { @Override /* Callable */ public T call() throws Exception { return getResponse(type); } } ); }
/** * Same as {@link #getResponse(Class)} but allows you to run the call asynchronously. * * @param <T> * The class type of the object being created. * See {@link #getResponse(Type, Type...)} for details. * @param type The object type to create. * @return The parsed object. * @throws RestCallException If the executor service was not defined. * @see * RestClientBuilder#executorService(ExecutorService, boolean) for defining the executor service for creating * {@link Future Futures}. */ public <T> Future<T> getResponseFuture(final Class<T> type) throws RestCallException { return client.getExecutorService(true).submit( new Callable<T>() { @Override /* Callable */ public T call() throws Exception { return getResponse(type); } } ); }
/** * Same as {@link #getResponse(Class)} but allows you to run the call asynchronously. * * @param <T> * The class type of the object being created. * See {@link #getResponse(Type, Type...)} for details. * @param type * The object type to create. * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType}, {@link GenericArrayType} * @param args * The type arguments of the class if it's a collection or map. * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType}, {@link GenericArrayType} * <br>Ignored if the main type is not a map or collection. * @return The parsed object. * @throws RestCallException If the executor service was not defined. * @see * RestClientBuilder#executorService(ExecutorService, boolean) for defining the executor service for creating * {@link Future Futures}. */ public <T> Future<T> getResponseFuture(final Type type, final Type...args) throws RestCallException { return client.getExecutorService(true).submit( new Callable<T>() { @Override /* Callable */ public T call() throws Exception { return getResponse(type, args); } } ); }
/** * Same as {@link #getResponse(Class)} but allows you to run the call asynchronously. * * @param <T> * The class type of the object being created. * See {@link #getResponse(Type, Type...)} for details. * @param type * The object type to create. * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType}, {@link GenericArrayType} * @param args * The type arguments of the class if it's a collection or map. * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType}, {@link GenericArrayType} * <br>Ignored if the main type is not a map or collection. * @return The parsed object. * @throws RestCallException If the executor service was not defined. * @see * RestClientBuilder#executorService(ExecutorService, boolean) for defining the executor service for creating * {@link Future Futures}. */ public <T> Future<T> getResponseFuture(final Type type, final Type...args) throws RestCallException { return client.getExecutorService(true).submit( new Callable<T>() { @Override /* Callable */ public T call() throws Exception { return getResponse(type, args); } } ); }
/** * Same as {@link #getResponse(Class)} but allows you to run the call asynchronously. * * @param <T> * The class type of the object being created. * See {@link #getResponse(Type, Type...)} for details. * @param type * The object type to create. * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType}, {@link GenericArrayType} * @param args * The type arguments of the class if it's a collection or map. * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType}, {@link GenericArrayType} * <br>Ignored if the main type is not a map or collection. * @return The parsed object. * @throws RestCallException If the executor service was not defined. * @see * RestClientBuilder#executorService(ExecutorService, boolean) for defining the executor service for creating * {@link Future Futures}. */ public <T> Future<T> getResponseFuture(final Type type, final Type...args) throws RestCallException { return client.getExecutorService(true).submit( new Callable<T>() { @Override /* Callable */ public T call() throws Exception { return getResponse(type, args); } } ); }