Interface ClientQuestionService
- All Known Subinterfaces:
InternalClientQuestionService
- All Known Implementing Classes:
InternalClientQuestionServiceImpl
public interface ClientQuestionService
Service to ask the client any questions at any point during code execution.
The type of the questions and the corresponding answers can be chosen arbitrarily.
-
Method Summary
Modifier and TypeMethodDescription<T extends ClientAnswer>
TaskQuestion(ClientQuestion<T> question) Asynchronously ask a question to the client user.withAnswersForQuestion(PredefinedAnswers predefinedAnswers) Set predefined answers within the thread which is used to call the invoker.
-
Method Details
-
askQuestion
Asynchronously ask a question to the client user. This method can be called from any context, where we might are in a remote call. * In case the user has not yet answered the question (in the GUI) this method will throw an (unchecked) exception (ClientQuestionException) and the current remote call will not be handled right now. After an answer has been given, the remote call will be reexecuted. * In case the user has already answered the question (in the GUI) this method will return aClientAnswerobject containing information about the clients answer.- Type Parameters:
T- generic type for the expected answer- Parameters:
question- a question to be asked the user- Returns:
- the user's answer
-
withAnswersForQuestion
Set predefined answers within the thread which is used to call the invoker.- Parameters:
predefinedAnswers- The predefined answers for certain client questions.- Returns:
- the invoker to call within the desired thread.
-