Class AbstractPoller

    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractPoller​(long waitInterval, long waitCount)
      Deprecated.
      Convenience method to execute a generic call and do polling until a condition is met The user must implement the Poller.call() and Poller.condition() methods
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean callAndWait()
      Deprecated.
      Calls the Poller.call() once and then calls Poller.condition() until it returns true The method waits AbstractPoller#waitInterval milliseconds between calls to Poller.condition() A maximum of AbstractPoller#waitCount intervals are checked
      boolean callUntilCondition()
      Deprecated.
      Calls the @see: Poller#call() and then calls Poller.condition() until it returns true The Poller#call() method is called in each wait interval, before the Poller#condition().
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.sling.testing.clients.util.poller.Poller

        call, condition
    • Constructor Detail

      • AbstractPoller

        public AbstractPoller​(long waitInterval,
                              long waitCount)
        Deprecated.
        Convenience method to execute a generic call and do polling until a condition is met The user must implement the Poller.call() and Poller.condition() methods
        Parameters:
        waitInterval - Number of milliseconds to wait between polls
        waitCount - Number of wait intervals
    • Method Detail

      • callAndWait

        public boolean callAndWait()
                            throws java.lang.InterruptedException
        Deprecated.
        Calls the Poller.call() once and then calls Poller.condition() until it returns true The method waits AbstractPoller#waitInterval milliseconds between calls to Poller.condition() A maximum of AbstractPoller#waitCount intervals are checked
        Specified by:
        callAndWait in interface Poller
        Returns:
        true if the condition is met after waiting a maximum of AbstractPoller#waitCount intervals, false otherwise
        Throws:
        java.lang.InterruptedException - to mark this operation as "waiting"
      • callUntilCondition

        public boolean callUntilCondition()
                                   throws java.lang.InterruptedException
        Deprecated.
        Calls the @see: Poller#call() and then calls Poller.condition() until it returns true The Poller#call() method is called in each wait interval, before the Poller#condition(). The method waits AbstractPoller#waitInterval milliseconds between calls to Poller.condition() A maximum of AbstractPoller#waitCount intervals are checked
        Specified by:
        callUntilCondition in interface Poller
        Returns:
        true if the condition is met after waiting a maximum of AbstractPoller#waitCount intervals, false otherwise
        Throws:
        java.lang.InterruptedException - to mark this operation as "waiting"