Class LongTaskRpc
- java.lang.Object
-
- com.atlassian.confluence.it.rpc.delegates.admin.LongTaskRpc
-
public class LongTaskRpc extends Object
Makes remote calls to the LongTaskService- Since:
- 6.13.0
-
-
Constructor Summary
Constructors Constructor Description LongTaskRpc(AuthenticatedWebResourceProvider provider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
doLongTaskAndWaitForResult(Supplier<LongTaskSubmission> longTaskSubmissionSupplier, String failureMessage)
Fetches the LongTaskSubmission from the supplier and polls the LongTaskService until the task finishes or the poller times out (whichever comes first)boolean
waitForLongTaskResult(String taskId, String failureMessage)
Polls the LongTaskService until the task finishes or the poller times out (whichever comes first)
-
-
-
Constructor Detail
-
LongTaskRpc
public LongTaskRpc(AuthenticatedWebResourceProvider provider)
-
-
Method Detail
-
doLongTaskAndWaitForResult
public boolean doLongTaskAndWaitForResult(Supplier<LongTaskSubmission> longTaskSubmissionSupplier, String failureMessage)
Fetches the LongTaskSubmission from the supplier and polls the LongTaskService until the task finishes or the poller times out (whichever comes first)- Parameters:
longTaskSubmissionSupplier
-failureMessage
-- Returns:
- whether or not the long running task completed successfully within the timeout
-
waitForLongTaskResult
public boolean waitForLongTaskResult(String taskId, String failureMessage)
Polls the LongTaskService until the task finishes or the poller times out (whichever comes first)- Parameters:
taskId
-failureMessage
-- Returns:
- whether or not the long running task completed successfully within the timeout
-
-