Package com.github.mike10004.xvfbmanager
Class Poller.SimplePoller
- java.lang.Object
-
- com.github.mike10004.xvfbmanager.Poller<Void>
-
- com.github.mike10004.xvfbmanager.Poller.SimplePoller
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.github.mike10004.xvfbmanager.Poller
Poller.PollAction, Poller.PollAnswer<E>, Poller.PollOutcome<E>, Poller.RegularIntervals, Poller.SimplePoller, Poller.StopReason
-
-
Constructor Summary
Constructors Constructor Description SimplePoller(Sleeper sleeper, Supplier<Boolean> condition)SimplePoller(Supplier<Boolean> condition)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Poller.PollAnswer<Void>check(int pollAttemptsSoFar)Checks whether the state being questioned has been resolved.-
Methods inherited from class com.github.mike10004.xvfbmanager.Poller
abortPolling, abortPolling, checking, continuePolling, poll, poll, resolve
-
-
-
-
Method Detail
-
check
protected Poller.PollAnswer<Void> check(int pollAttemptsSoFar)
Description copied from class:PollerChecks whether the state being questioned has been resolved. Subclasses must override this method to return ananswerthat may or may not contain a content object. In a conventional implementation, if the state has been resolved, this method would return an answer with content object representing a resolution along withPoller.PollAction.RESOLVE; if the state has not yet been resolved, this method would returnnullas the answer content along withPoller.PollAction.CONTINUEif we should continue polling orPoller.PollAction.ABORTif polling should stop immediately anyway.Implementations of this method should return an answer constructed with the
Poller.continuePolling(),Poller.abortPolling(), orPoller.resolve(Object)methods.Unconventional implementations may elect to return a non-null content object with
Poller.PollAction.ABORTto provide thepoll()caller a degenerate answer, perhaps indicating why state will never be resolved.
-
-