java.lang.Object
org.cybergarage.util.ThreadCore
org.cybergarage.upnp.device.Disposer
All Implemented Interfaces:
Runnable

public class Disposerextends ThreadCore
Thread for disposing expired UPnP devices and subscriptions.

This class extends ThreadCore to provide periodic cleanup of expired UPnP devices and subscriptions in a control point. It runs in the background to maintain an accurate view of available devices and active subscriptions.

Key features:

  • Automatic device expiration handling
  • Subscription cleanup and renewal
  • Periodic maintenance operations
  • Multi-threaded execution
  • Control point integration

This class is used by UPnP control points to automatically remove devices that have become unavailable and clean up expired subscriptions, ensuring efficient resource management and accurate device tracking.

  • Field Details

    • ctrlPoint

      private ControlPoint ctrlPoint
      /////////////////////////////////////////////
  • Constructor Details

    • Disposer

      public Disposer(ControlPoint ctrlp)
      Creates a disposer that watches the given control point.
      Parameters:
      ctrlp - the control point whose devices and subscriptions are swept
  • Method Details

    • setControlPoint

      public void setControlPoint(ControlPoint ctrlp)
      Set the control point.
      Parameters:
      ctrlp - the control point to store for later sweeping
    • getControlPoint

      public ControlPoint getControlPoint()
      Get the control point.
      Returns:
      the control point being swept, null until one is set
    • run

      public void run()
      /////////////////////////////////////////////
      Specified by:
      run in interface Runnable
      Overrides:
      run in class ThreadCore