Class POBLooper

  • All Implemented Interfaces:

    @MainThread() 
    public class POBLooper
    
                        

    Provides looping functionality, User of this class must call loop method to start looper timer and should register to setListener in order to identify looper has completed it's loop time.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public interface POBLooper.LooperListener

      Invocation callback after looper completed its loop time

    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      POBLooper()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      synchronized void loop(long delayTime) Start loop with provided delay, when delay is lapsed looper will call invoke method on LooperListener Invocation is made only once for one loop method call
      synchronized void forceResume()
      synchronized void resume() Resumes the looper from paused state
      synchronized void forcePause()
      synchronized void pause() Pauses the looper from resumed state
      void setNetworkMonitor(@NonNull() POBNetworkMonitor networkMonitor) Sets Network monitor, It notifies about change in device network connectivity
      void setListener(@Nullable() POBLooper.LooperListener listener) Method to set the LooperListener
      synchronized void destroy() Destroys the internal state of this Looper.
      • Methods inherited from class java.lang.Object

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

      • POBLooper

        POBLooper()
    • Method Detail

      • loop

         synchronized void loop(long delayTime)

        Start loop with provided delay, when delay is lapsed looper will call invoke method on LooperListener Invocation is made only once for one loop method call

        Parameters:
        delayTime - in second value to delay looper
      • resume

         synchronized void resume()

        Resumes the looper from paused state

      • pause

         synchronized void pause()

        Pauses the looper from resumed state

      • setNetworkMonitor

         void setNetworkMonitor(@NonNull() POBNetworkMonitor networkMonitor)

        Sets Network monitor, It notifies about change in device network connectivity

        Parameters:
        networkMonitor - POBNetworkMonitor instance
      • destroy

         synchronized void destroy()

        Destroys the internal state of this Looper. This method should be called after use of Looper. No other methods may be called on this WebView Looper destroy.