Package org.glassfish.jersey.client
Interface ClientExecutor
public interface ClientExecutor
Executor for client async processing and background task scheduling.
- Since:
- 2.26
- Author:
- Adam Lindenthal
-
Method Summary
Modifier and TypeMethodDescriptionCreates and executes a one-shot action that becomes enabled after the given delay.<T> ScheduledFuture<T>Creates and executes aScheduledFuturethat becomes enabled after the given delay.Future<?><T> Future<T><T> Future<T>Submits a value-returning task for execution and returns aFuturerepresenting the pending results of the task.
-
Method Details
-
submit
Submits a value-returning task for execution and returns aFuturerepresenting the pending results of the task. The Future'sget()method will return the task's result upon successful completion.- Type Parameters:
T- task's return type- Parameters:
task- task to submit- Returns:
- a
Futurerepresenting pending completion of the task
-
submit
Submits aRunnabletask for execution and returns aFuturerepresenting that task. The Future'sget()method will return the given result upon successful completion.- Parameters:
task- the task to submit- Returns:
- a
Futurerepresenting pending completion of the task
-
submit
Submits aRunnabletask for execution and returns aFuturerepresenting that task. The Future'sget()method will return the given result upon successful completion.- Type Parameters:
T- result type- Parameters:
task- the task to submitresult- the result to return- Returns:
- a
Futurerepresenting pending completion of the task
-
schedule
Creates and executes aScheduledFuturethat becomes enabled after the given delay.- Type Parameters:
T- return type of the function- Parameters:
callable- the function to executedelay- the time from now to delay executionunit- the time unit of the delay parameter- Returns:
- a
ScheduledFuturethat can be used to extract result or cancel
-
schedule
Creates and executes a one-shot action that becomes enabled after the given delay.- Parameters:
command- the task to executedelay- the time from now to delay executionunit- the time unit of the daly parameter- Returns:
- a scheduledFuture representing pending completion of the task and whose
get()method will returnnullupon completion
-