Class RetryTimer


  • public class RetryTimer
    extends java.lang.Object
    Class to manage retry timing for event sending
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static interface  RetryTimer.RetryTimerListener
      Listener of this retry Timer
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String TAG  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isWaiting()
      Is the retry timer currently waiting for a retry
      void reschedule()
      Schedule a retry for the current task Method to call when a send of events has failed
      void reset()
      Reset all flags of this retry timer Method to call when a send of events succeed or when this retry timer has reached the max retries threshold
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RetryTimer

        public RetryTimer​(android.content.Context context,
                          RetryTimer.RetryTimerListener listener)
        Constructor
        Parameters:
        context - context
        listener - callback
    • Method Detail

      • isWaiting

        public boolean isWaiting()
        Is the retry timer currently waiting for a retry
        Returns:
        true is waiting
      • reschedule

        public void reschedule()
        Schedule a retry for the current task Method to call when a send of events has failed
      • reset

        public void reset()
        Reset all flags of this retry timer Method to call when a send of events succeed or when this retry timer has reached the max retries threshold