Class BaseWorkThread<H extends android.os.Handler>

java.lang.Object
java.lang.Thread
com.banuba.sdk.internal.BaseWorkThread<H>
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
CameraThread, OffscreenPlayerThread, PhotoThread, RenderThread, RenderThread, SimpleThread

public abstract class BaseWorkThread<H extends android.os.Handler> extends Thread
  • Constructor Details

    • BaseWorkThread

      public BaseWorkThread(String threadName)
  • Method Details

    • constructHandler

      @NonNull protected abstract H constructHandler()
    • run

      public void run()
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread
    • preRunInit

      protected void preRunInit()
    • postRunClear

      protected void postRunClear()
    • startAndGetHandler

      @NonNull public H startAndGetHandler()
      Starts the thread and enters message loop. Don't forget to call shutdown().
      Returns:
      thread handler
    • getHandler

      @Nullable public H getHandler()
    • releaseHandler

      protected void releaseHandler()
    • shutdown

      @CallSuper public void shutdown()