|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sbbi.upnp.devices.UPNPDevice
net.sbbi.upnp.devices.UPNPRootDevice
public class UPNPRootDevice
Root UPNP device that is contained in a device definition file. Slightly differs from a simple UPNPDevice object. This object will contains all the child devices, this is the top objet in the UPNP device devices hierarchy.
| Field Summary |
|---|
| Fields inherited from class net.sbbi.upnp.devices.UPNPDevice |
|---|
childDevices, deviceIcons, deviceType, friendlyName, manufacturer, manufacturerURL, modelDescription, modelName, modelNumber, modelURL, parent, presentationURL, serialNumber, services, UDN, UPC, USN |
| Constructor Summary | |
|---|---|
UPNPRootDevice(URL deviceDefLoc,
String maxAge)
Constructor for the root device, constructs itself from An xml device definition file provided by the UPNP device via http normally. |
|
UPNPRootDevice(URL deviceDefLoc,
String maxAge,
String vendorFirmware)
Constructor for the root device, constructs itself from An xml device definition file provided by the UPNP device via http normally. |
|
UPNPRootDevice(URL deviceDefLoc,
String maxAge,
String vendorFirmware,
String discoveryUSN,
String discoveryUDN)
Constructor for the root device, constructs itself from An xml device definition file provided by the UPNP device via http normally. |
|
| Method Summary | |
|---|---|
URL |
getDeviceDefLoc()
Retreives the device description file location |
String |
getDeviceDefLocData()
Retrieves the device definition XML data |
String |
getDiscoveryUDN()
|
String |
getDiscoveryUSN()
|
int |
getSpecVersionMajor()
|
int |
getSpecVersionMinor()
|
org.apache.commons.jxpath.Container |
getUPNPDevice()
Used for JXPath parsing, do not use this method |
static URL |
getURL(String url,
URL baseURL)
Parsing an URL from the descriptionXML file |
URL |
getURLBase()
URL base acces |
long |
getValidityTime()
The validity time for this device in milliseconds, |
String |
getVendorFirmware()
|
void |
resetValidityTime(String newMaxAge)
Resets the device validity time |
| Methods inherited from class net.sbbi.upnp.devices.UPNPDevice |
|---|
getChildDevice, getChildDevices, getDeviceIcons, getDeviceType, getDirectParent, getFriendlyName, getManufacturer, getManufacturerURL, getModelDescription, getModelName, getModelNumber, getModelURL, getPresentationURL, getSerialNumber, getService, getServiceByID, getServices, getServices, getTopLevelChildDevices, getUDN, getUPC, getUSN, isRootDevice, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public UPNPRootDevice(URL deviceDefLoc,
String maxAge,
String vendorFirmware,
String discoveryUSN,
String discoveryUDN)
throws MalformedURLException,
IllegalStateException
deviceDefLoc - the location of the XML device definition file
using "the urn:schemas-upnp-org:device-1-0" namespacemaxAge - the maximum age of this UPNP device in secs before considered to be outdatedvendorFirmware - the vendor firmwarediscoveryUSN - the discovery USN used to find and create this devicediscoveryUDN - the discovery UDN used to find and create this device
MalformedURLException - if the location URL is invalid and cannot be used to populate this root object and its child devices
IllegalStateException if the device has an unsupported version, currently only version 1.0 is supported
IllegalStateException
public UPNPRootDevice(URL deviceDefLoc,
String maxAge,
String vendorFirmware)
throws MalformedURLException,
IllegalStateException
deviceDefLoc - the location of the XML device definition file
using "the urn:schemas-upnp-org:device-1-0" namespacemaxAge - the maximum age of this UPNP device in secs before considered to be outdatedvendorFirmware - the vendor firmware
MalformedURLException - if the location URL is invalid and cannot be used to populate this root object and its child devices
IllegalStateException if the device has an unsupported version, currently only version 1.0 is supported
IllegalStateException
public UPNPRootDevice(URL deviceDefLoc,
String maxAge)
throws MalformedURLException,
IllegalStateException
deviceDefLoc - the location of the XML device definition file
using "the urn:schemas-upnp-org:device-1-0" namespacemaxAge - the maximum age in secs of this UPNP device before considered to be outdated
MalformedURLException - if the location URL is invalid and cannot be used to populate this root object and its child devices
IllegalStateException if the device has an unsupported version, currently only version 1.0 is supported
IllegalStateException| Method Detail |
|---|
public long getValidityTime()
public void resetValidityTime(String newMaxAge)
newMaxAge - the maximum age in secs of this UPNP device before considered to be outdatedpublic URL getDeviceDefLoc()
public int getSpecVersionMajor()
public int getSpecVersionMinor()
public String getVendorFirmware()
public String getDiscoveryUSN()
public String getDiscoveryUDN()
public URL getURLBase()
public static final URL getURL(String url,
URL baseURL)
throws MalformedURLException
url - the string representation fo the URLbaseURL - the base device URL, needed if the url param is relative
MalformedURLException - if the url param or baseURL.toExternalForm() + url
cannot be parsed to create an URL objectpublic String getDeviceDefLocData()
public org.apache.commons.jxpath.Container getUPNPDevice()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||