org.cybergarage.upnp.device

## Class Advertiser

- java.lang.Object
- - org.cybergarage.util.ThreadCore
  - - org.cybergarage.upnp.device.Advertiser

- All Implemented Interfaces:
    Runnable

      public class Advertiser
      extends ThreadCore

  Thread for advertising UPnP device presence on the network.

  This class extends ThreadCore to provide periodic device advertisement through SSDP NOTIFY messages. It manages the announcement cycle for device presence and implements NMPR (Network Media Profile Requirements) compliance for notification timing.

  Key features:

  - Periodic SSDP notification sending
  - NMPR mode compliance
  - Device announcement management
  - Multi-threaded operation
  - Network presence broadcasting

  This class is used by UPnP devices to automatically announce their presence on the network at regular intervals, ensuring discovery by control points and maintaining network visibility.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Advertiser(Device dev)` Constructor for advertiser.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Device` | `getDevice()` Gets the device being advertised.
    `void` | `run()` The main execution method of the thread.
    `void` | `setDevice(Device dev)` Sets the device to advertise.

    - ### 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`

- - ### Constructor Detail

    - #### Advertiser

          public Advertiser(Device dev)

      Constructor for advertiser.
      Parameters:
        `dev` - device to advertise

  - ### Method Detail

    - #### getDevice

          public Device getDevice()

      Gets the device being advertised.
      Returns:
        current device

    - #### run

          public void run()

      Description copied from class: `ThreadCore`
      The main execution method of the thread. This method should be overridden by subclasses to implement specific functionality.
      Specified by:
        `run` in interface `Runnable`
      Overrides:
        `run` in class `ThreadCore`

    - #### setDevice

          public void setDevice(Device dev)

      Sets the device to advertise.
      Parameters:
        `dev` - device to advertise