Package io.jmix.supersetflowui.component
Class SupersetDashboard.FetchGuestTokenTask
java.lang.Object
io.jmix.flowui.backgroundtask.BackgroundTask<Void,GuestTokenResponse>
io.jmix.supersetflowui.component.SupersetDashboard.FetchGuestTokenTask
- Enclosing class:
- SupersetDashboard
protected class SupersetDashboard.FetchGuestTokenTask
extends BackgroundTask<Void,GuestTokenResponse>
-
Nested Class Summary
Nested classes/interfaces inherited from class io.jmix.flowui.backgroundtask.BackgroundTask
BackgroundTask.ProgressListener<T,
V>, BackgroundTask.ProgressListenerAdapter<T, V> -
Field Summary
-
Constructor Summary
ConstructorDescriptionFetchGuestTokenTask
(long timeout, GuestTokenBody body, String accessToken, String csrfToken) -
Method Summary
Modifier and TypeMethodDescriptionvoid
done
(GuestTokenResponse response) Called by the execution environment in UI thread when the task is completed.protected boolean
isAccessTokenExpired
(String message) run
(TaskLifeCycle<Void> taskLifeCycle) Main method that performs a task.Methods inherited from class io.jmix.flowui.backgroundtask.BackgroundTask
addProgressListener, canceled, getOwnerView, getParams, getProgressListeners, getTimeoutMilliseconds, getTimeoutSeconds, handleException, handleTimeoutException, progress, removeProgressListener
-
Field Details
-
body
-
accessToken
-
csrfToken
-
-
Constructor Details
-
FetchGuestTokenTask
public FetchGuestTokenTask(long timeout, GuestTokenBody body, String accessToken, @Nullable String csrfToken)
-
-
Method Details
-
run
public GuestTokenResponse run(TaskLifeCycle<Void> taskLifeCycle) throws IOException, InterruptedException Description copied from class:BackgroundTask
Main method that performs a task.
Called by the execution environment in a separate working thread.
Implementation of this method should support interruption:- In long loops check
TaskLifeCycle.isInterrupted()
and return if it is true - Don't swallow
InterruptedException
- return from the method or don't catch it at all
- Specified by:
run
in classBackgroundTask<Void,
GuestTokenResponse> - Parameters:
taskLifeCycle
- lifecycle object that allows the main method to interact with the execution environment- Returns:
- task result
- Throws:
IOException
InterruptedException
- In long loops check
-
done
Description copied from class:BackgroundTask
Called by the execution environment in UI thread when the task is completed.- Overrides:
done
in classBackgroundTask<Void,
GuestTokenResponse> - Parameters:
response
- result of execution returned byBackgroundTask.run(TaskLifeCycle)
method
-
isAccessTokenExpired
-