Class Poller.PollAnswer<E>

  • Type Parameters:
    E - the type of content in the resolution
    Enclosing class:
    Poller<T>

    public static class Poller.PollAnswer<E>
    extends Object
    Class that represents an answer in response to a poll request. Instances of this class are constructed with the poller's continuePolling(), abortPolling(), and resolve() methods.

    To clarify: a poll outcome refers to the end result after many poll attempts, and a poll answer is the answer to any individual poll attempt.

    • Field Detail

      • action

        public final Poller.PollAction action
        Action the poller should take after receiving this answer.
      • content

        @Nullable
        public final E content
        Content of the answer. If the action is Poller.PollAction.RESOLVE, then this is likely to be non-null. Otherwise, it is likely to be null. Implementations may elect to flout these conventions.