Class AsyncClassLevelClient
java.lang.Object
org.eclipse.microprofile.fault.tolerance.tck.asynchronous.AsyncClassLevelClient
A client to demonstrate Asynchronous behaviour when @Asynchronous is applied at class level
- Author:
- Antoine Sabot-Durand
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionService an operation until waitCondition is completed or 1000 second timeout.Service an operation until waitCondition is completed or 1000 second timeout.
-
Constructor Details
-
AsyncClassLevelClient
public AsyncClassLevelClient()
-
-
Method Details
-
service
Service an operation until waitCondition is completed or 1000 second timeout.- Parameters:
waitCondition
- Execution of this method will delay until the condition is finished- Returns:
- the result as a Future.
-
serviceCS
Service an operation until waitCondition is completed or 1000 second timeout. NOTE: This 1000 second timeout is to ensure test timeout kicks in before the operation timeout for a better test error to be displayed.- Parameters:
waitCondition
- Execution of this method will delay until the condition is finishedthrowException
- Whether the method should throw an exception (true) or return a stage completed with exception (false)- Returns:
- the result as a CompletionStage. It may be completed with InterruptedException if the thread is interrupted
-
serviceCS
-