Package net.i2p.util

Class I2PAppThread

All Implemented Interfaces:
Runnable
Direct Known Subclasses:
DaemonThread, I2PTunnelOutproxyRunner, I2PTunnelRunner, InternalSocketRunner, SnarkShutdown, UpdateRunner

public class I2PAppThread extends I2PThread
Like I2PThread but with per-thread OOM listeners, rather than a static router-wide listener list, so that an OOM in an app won't call the router listener to shutdown the whole router. This is preferred for application use. See I2PThread for features.
  • Constructor Details

    • I2PAppThread

      public I2PAppThread()
    • I2PAppThread

      public I2PAppThread(String name)
    • I2PAppThread

      public I2PAppThread(Runnable r)
    • I2PAppThread

      public I2PAppThread(Runnable r, String name)
    • I2PAppThread

      public I2PAppThread(Runnable r, String name, boolean isDaemon)
    • I2PAppThread

      public I2PAppThread(ThreadGroup group, Runnable r, String name)
      Since:
      0.9.23
  • Method Details

    • fireOOM

      protected void fireOOM(OutOfMemoryError oom)
      Overrides:
      fireOOM in class I2PThread
    • addOOMEventThreadListener

      public void addOOMEventThreadListener(I2PThread.OOMEventListener lsnr)
      register a new component that wants notification of OOM events
    • removeOOMEventThreadListener

      public void removeOOMEventThreadListener(I2PThread.OOMEventListener lsnr)
      unregister a component that wants notification of OOM events