org.ocap.hn.upnp.common
Interface UPnPAdvertisedDevice

All Superinterfaces:
UPnPDevice
All Known Subinterfaces:
UPnPClientDevice

public interface UPnPAdvertisedDevice
extends UPnPDevice

This interface represents a UPnP device as it is advertised on a particular network. It provides the data constituting the device, portions of which depend on the network interface on which it is advertised. Corresponds to the information carried in the UPnP device description document.


Method Summary
 UPnPAdvertisedDeviceIcon[] getAdvertisedIcons()
          Gets the icons of this device.
 UPnPAdvertisedService[] getAdvertisedServices()
          Gets the services supported by this device.
 UPnPAdvertisedDevice[] getEmbeddedAdvertisedDevices()
          Gets the embedded devices for this UPnP Device.
 InetAddress getInetAddress()
          Returns the IP address from which this device was advertised.
 String getPresentationURL()
          Gets the UPnP presentation page URL of this device.
 String getURLBase()
          Reports the base URL for all relative URLs of this device.
 org.w3c.dom.Document getXML()
          Gets the device description document in XML.
 
Methods inherited from interface org.ocap.hn.upnp.common.UPnPDevice
getDeviceType, getFriendlyName, getManufacturer, getManufacturerURL, getModelDescription, getModelName, getModelNumber, getModelURL, getSerialNumber, getSpecVersion, getUDN, getUPC, isRootDevice
 

Method Detail

getEmbeddedAdvertisedDevices

UPnPAdvertisedDevice[] getEmbeddedAdvertisedDevices()
Gets the embedded devices for this UPnP Device.

Returns:
The embedded devices for this device. If this device has no embedded devices, returns a zero length array. Returns only the next level of embedded devices, not recursing through embedded devices for subsequent levels of embedded devices.

getAdvertisedIcons

UPnPAdvertisedDeviceIcon[] getAdvertisedIcons()
Gets the icons of this device. This returned array is derived from the icon elements within the iconList element of a device description. If the iconList element in the device description is empty or not present, returns a zero length array.

Returns:
The icons that the device declares.

getAdvertisedServices

UPnPAdvertisedService[] getAdvertisedServices()
Gets the services supported by this device. Does not return services held in embedded devices.

Returns:
The services supported by this device. If the serviceList element in the device description is empty, this method returns a zero length array.

getInetAddress

InetAddress getInetAddress()
Returns the IP address from which this device was advertised.

Returns:
an InetAddress representing this device's IP address.

getPresentationURL

String getPresentationURL()
Gets the UPnP presentation page URL of this device. This value is taken from the value of the presentationURL element within a device description.

If the presentationURL is empty or not present, returns the empty String.

Returns:
The presentationURL of this device.

getURLBase

String getURLBase()
Reports the base URL for all relative URLs of this device. This value is obtained from the URLBase element within the device description document. If this is an embedded device, the URLBase element of the root device is returned.

If the URLBase property is not specified in the device description document, this method returns the URL from which the device description may be retrieved.

Returns:
The base URL for all relative URLs of this UPnP Device.

getXML

org.w3c.dom.Document getXML()
Gets the device description document in XML. The form of the document is defined by the UPnP Device Architecture specification.

For a root device, returns the document starting with the <?xml> node. For an embedded device, returns the sub-document starting with the <device> node of the embedded device. Returns the complete XML document from the level that is appropriate, including any embedded devices.

Returns:
The device description document.


Copyright © 2011. All Rights Reserved.