cybergarage-upnp
org.cybergarage.upnp.device.Advertiser Class Reference
Inheritance diagram for org.cybergarage.upnp.device.Advertiser:
org.cybergarage.util.ThreadCore

Public Member Functions

 Advertiser (Device dev)
 
void setDevice (Device dev)
 
Device getDevice ()
 
void run ()
 
- Public Member Functions inherited from org.cybergarage.util.ThreadCore
 ThreadCore ()
 
void setThreadObject (java.lang.Thread obj)
 
java.lang.Thread getThreadObject ()
 
void start ()
 
boolean isRunnable ()
 
void stop ()
 
void restart ()
 

Private Attributes

Device device
 

Detailed Description

Background thread that periodically advertises a UPnP device's presence.

The advertiser sends SSDP NOTIFY messages at regular intervals to announce the device's availability on the network. The announcement interval is randomized between 25%-50% of the device's lease time to distribute network traffic when multiple devices are present.

This class is used internally by Device to implement the Network Media Player Requirement (NMPR) for periodic advertisements.

See also
Device

Constructor & Destructor Documentation

◆ Advertiser()

org.cybergarage.upnp.device.Advertiser.Advertiser ( Device dev)
inline

Constructs an advertiser for the specified device.

Parameters
devthe device to advertise

Member Function Documentation

◆ getDevice()

Device org.cybergarage.upnp.device.Advertiser.getDevice ( )
inline

Returns the device being advertised.

Returns
the device associated with this advertiser

◆ run()

void org.cybergarage.upnp.device.Advertiser.run ( )
inline

Reimplemented from org.cybergarage.util.ThreadCore.

◆ setDevice()

void org.cybergarage.upnp.device.Advertiser.setDevice ( Device dev)
inline

Sets the device to be advertised.

Parameters
devthe device to advertise

Field Documentation

◆ device

Device org.cybergarage.upnp.device.Advertiser.device
private

The documentation for this class was generated from the following file: