Class PredefinedAnswersInvoker

java.lang.Object
ch.tocco.nice2.util.invokables.AbstractInvoker<Void>
ch.tocco.nice2.netui.impl.clientquestion.PredefinedAnswersInvoker
All Implemented Interfaces:
Invoker

public class PredefinedAnswersInvoker extends AbstractInvoker<Void>
This invoker sets predefined answers for client questions thread locally onto the PredefinedAnswersHolder, so that the ClientQuestionService can fetch them from there.
  • Constructor Details

    • PredefinedAnswersInvoker

      public PredefinedAnswersInvoker(PredefinedAnswers predefinedAnswers)
  • Method Details

    • preInvoke

      protected Void preInvoke()
      Description copied from class: AbstractInvoker
      Called before the given invokable is invoked.
      Specified by:
      preInvoke in class AbstractInvoker<Void>
      Returns:
      An optional state which will be passed to postInvoke().
    • postInvoke

      protected void postInvoke(Void state, Object result, Throwable thrown)
      Description copied from class: AbstractInvoker
      Called after the given invokable has been invoked. This will be called in a finally block regardless of whether the invokable throw an exception or not. If the invokable threw an exception and this method throws again, the exception thrown will be added as suppressed exception to the exception originally thrown by the invokable.
      Specified by:
      postInvoke in class AbstractInvoker<Void>
      Parameters:
      state - The state as returned previously by AbstractInvoker.preInvoke().
      result - The return value of the invokable or `null`.
      thrown - The exception thrown by the invokable or `null`.
      See Also: