Package org.dellroad.stuff.vaadin24.util
Interface AsyncTask<R>
- Type Parameters:
R- task result type
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Performs some task executing asynchronously and managed by an
AsyncTaskManager.-
Method Summary
-
Method Details
-
perform
Perform the task.This method runs in a background thread; in particular, no
VaadinSessionwill be locked.This method should be prepared to handle an interrupt if/when
cancelTask()is invoked; in that case this method may throwInterruptedException.This task may also cancel itself by throwing an unprompted
InterruptedException.It is valid for this method to return null; no special meaning is attached to null return values.
- Parameters:
id- the unique ID for this task run- Returns:
- task result
- Throws:
InterruptedException- if the current thread is interruptedException- if an error occurs during task execution
-