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

public class Advertiserextends 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.

  • Field Details

    • device

      private Device device
      Device being advertised
  • Constructor Details

    • Advertiser

      public Advertiser(Device dev)
      Constructor for advertiser.
      Parameters:
      dev - device to advertise
  • Method Details

    • setDevice

      public void setDevice(Device dev)
      Sets the device to advertise.
      Parameters:
      dev - device to advertise
    • getDevice

      public Device getDevice()
      Gets the device being advertised.
      Returns:
      the device being advertised
    • run

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