Class BackgroundTask.ProgressListenerAdapter<T,V>
- All Implemented Interfaces:
BackgroundTask.ProgressListener<T,
V>
- Enclosing class:
- BackgroundTask<T,
V>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
onCancel()
Provides exclusive access to this UI from outside a request handling thread when the task is canceled byBackgroundTaskHandler.cancel()
invocation.void
Provides exclusive access to this UI from outside a request handling thread when the task is completed.void
onProgress
(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.ProgressListener
Provides 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:
onProgress
in interfaceBackgroundTask.ProgressListener<T,
V> - Parameters:
changes
- list of changes since previous invocation- See Also:
-
UI.access(Command)
-
onDone
Description copied from interface:BackgroundTask.ProgressListener
Provides 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:
onDone
in 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.ProgressListener
Provides 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:
onCancel
in interfaceBackgroundTask.ProgressListener<T,
V> - See Also:
-
UI.access(Command)
-