202 |
|
* @param task the task to submit |
203 |
|
* @throws RejectedExecutionException if task cannot be scheduled |
204 |
|
* for execution |
205 |
+ |
* @throws ExecutionException if the task encountered an exception |
206 |
+ |
* while executing |
207 |
|
*/ |
208 |
|
public static void invoke(Executor executor, Runnable task) |
209 |
|
throws ExecutionException, InterruptedException { |
223 |
|
* for execution |
224 |
|
* @throws InterruptedException if interrupted while waiting for |
225 |
|
* completion |
226 |
+ |
* @throws ExecutionException if the task encountered an exception |
227 |
+ |
* while executing |
228 |
|
*/ |
229 |
|
public static <T> T invoke(Executor executor, Callable<T> task) |
230 |
|
throws ExecutionException, InterruptedException { |