org.cybergarage.upnp.control

## Class RenewSubscriber

- java.lang.Object
- - org.cybergarage.util.ThreadCore
  - - org.cybergarage.upnp.control.RenewSubscriber

- All Implemented Interfaces:
    Runnable

      public class RenewSubscriber
      extends ThreadCore

  Thread for automatically renewing UPnP event subscriptions. Runs periodically to refresh subscriptions before they expire.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static long` | `INTERVAL` Default renewal interval in seconds (120 seconds = 2 minutes)

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RenewSubscriber(ControlPoint ctrlp)` Constructs a RenewSubscriber for the specified control point.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ControlPoint` | `getControlPoint()` Gets the control point for this subscriber.
    `void` | `run()` Main thread loop that periodically renews subscriptions.
    `void` | `setControlPoint(ControlPoint ctrlp)` Sets the control point for this subscriber.

    - ### Methods inherited from class org.cybergarage.util.ThreadCore

      `getThreadObject, isRunnable, restart, setThreadObject, start, stop`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### INTERVAL

          public static final long INTERVAL

      Default renewal interval in seconds (120 seconds = 2 minutes)
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### RenewSubscriber

          public RenewSubscriber(ControlPoint ctrlp)

      Constructs a RenewSubscriber for the specified control point.
      Parameters:
        `ctrlp` - the control point whose subscriptions should be renewed

  - ### Method Detail

    - #### getControlPoint

          public ControlPoint getControlPoint()

      Gets the control point for this subscriber.
      Returns:
        the control point

    - #### run

          public void run()

      Main thread loop that periodically renews subscriptions. Sleeps for the configured interval, then calls the control point to renew all active subscriptions.
      Specified by:
        `run` in interface `Runnable`
      Overrides:
        `run` in class `ThreadCore`

    - #### setControlPoint

          public void setControlPoint(ControlPoint ctrlp)

      Sets the control point for this subscriber.
      Parameters:
        `ctrlp` - the control point to set