public class AsyncCallService extends Object implements Closeable
| Modifier and Type | Class and Description |
|---|---|
static class |
AsyncCallService.AsyncCallIdNotFoundException |
| Constructor and Description |
|---|
AsyncCallService() |
AsyncCallService(IdGenerator idGenerator) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel(String id) |
void |
close() |
<T> AsyncCall<T> |
get(String id)
Type unsafety.
|
List<String> |
getIds() |
static AsyncCallService |
instance() |
<R> AsyncCall<R> |
submit(Function<ProgressObserver,R> callable)
Submit a call that uses
ProgressObserver (created by this method). |
<R> AsyncCall<R> |
submit(Supplier<R> callable)
Submit a call.
|
<R> AsyncCall<R> |
submitWithPartialResults(Function<ExecutionMonitoring<R>,R> callable) |
public AsyncCallService()
public AsyncCallService(IdGenerator idGenerator)
public static AsyncCallService instance()
public <R> AsyncCall<R> submit(Supplier<R> callable)
R - result typepublic <R> AsyncCall<R> submit(Function<ProgressObserver,R> callable)
ProgressObserver (created by this method).R - result typepublic <R> AsyncCall<R> submitWithPartialResults(Function<ExecutionMonitoring<R>,R> callable)
R - result typepublic void cancel(String id)
public void close()
close in interface Closeableclose in interface AutoCloseable