Class BackgroundTask.ProgressListenerAdapter<T,V>
- Type Parameters:
T- the type of the progress updates provided when theonProgressmethod is calledV- the type of the final result when theonDonemethod is called
- All Implemented Interfaces:
BackgroundTask.ProgressListener<T,V>
- Enclosing class:
- BackgroundTask<T,
V>
BackgroundTask.ProgressListener interface with empty method bodies.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonCancel()Provides exclusive access to this UI from outside a request handling thread when the task is canceled byBackgroundTaskHandler.cancel()invocation.voidProvides exclusive access to this UI from outside a request handling thread when the task is completed.voidonProgress(List<T> changes) Provides exclusive access to this UI from outside a request handling thread on progress change.
-
Constructor Details
-
ProgressListenerAdapter
public ProgressListenerAdapter()
-
-
Method Details
-
onProgress
Description copied from interface:BackgroundTask.ProgressListenerProvides exclusive access to this UI from outside a request handling thread on progress change.Please note that the command might be invoked on a different thread or later on the current thread, which means that custom thread locals might not have the expected values when the command is executed.
UI.getCurrent(),VaadinSession.getCurrent()andVaadinService.getCurrent()are set according to this UI before executing the command. Other standard CurrentInstance values such asVaadinService.getCurrentRequest()andVaadinService.getCurrentResponse()will not be defined.- Specified by:
onProgressin interfaceBackgroundTask.ProgressListener<T,V> - Parameters:
changes- list of changes since previous invocation- See Also:
-
UI.access(Command)
-
onDone
Description copied from interface:BackgroundTask.ProgressListenerProvides exclusive access to this UI from outside a request handling thread when the task is completed.Please note that the command might be invoked on a different thread or later on the current thread, which means that custom thread locals might not have the expected values when the command is executed.
UI.getCurrent(),VaadinSession.getCurrent()andVaadinService.getCurrent()are set according to this UI before executing the command. Other standard CurrentInstance values such asVaadinService.getCurrentRequest()andVaadinService.getCurrentResponse()will not be defined.- Specified by:
onDonein interfaceBackgroundTask.ProgressListener<T,V> - Parameters:
result- result of execution returned byBackgroundTask.run(TaskLifeCycle)method- See Also:
-
UI.access(Command)
-
onCancel
public void onCancel()Description copied from interface:BackgroundTask.ProgressListenerProvides exclusive access to this UI from outside a request handling thread when the task is canceled byBackgroundTaskHandler.cancel()invocation.This method is not called in case of timeout expiration or owner view closing.
Please note that the command might be invoked on a different thread or later on the current thread, which means that custom thread locals might not have the expected values when the command is executed.
UI.getCurrent(),VaadinSession.getCurrent()andVaadinService.getCurrent()are set according to this UI before executing the command. Other standard CurrentInstance values such asVaadinService.getCurrentRequest()andVaadinService.getCurrentResponse()will not be defined.- Specified by:
onCancelin interfaceBackgroundTask.ProgressListener<T,V> - See Also:
-
UI.access(Command)
-