|
|||||||||||
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
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.
Constructor Summary | |
UPNPRootDevice(java.net.URL deviceDefLoc,
java.lang.String maxAge)
Constructor for the root device, constructs itself from An xml device definition file provided by the UPNP device via http normally. |
|
UPNPRootDevice(java.net.URL deviceDefLoc,
java.lang.String maxAge,
java.lang.String vendorFirmware)
Constructor for the root device, constructs itself from An xml device definition file provided by the UPNP device via http normally. |
|
UPNPRootDevice(java.net.URL deviceDefLoc,
java.lang.String maxAge,
java.lang.String vendorFirmware,
java.lang.String discoveryUSN,
java.lang.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 | |
java.net.URL |
getDeviceDefLoc()
Retreives the device description file location |
java.lang.String |
getDeviceDefLocData()
Retrieves the device definition XML data |
java.lang.String |
getDiscoveryUDN()
|
java.lang.String |
getDiscoveryUSN()
|
int |
getSpecVersionMajor()
|
int |
getSpecVersionMinor()
|
org.apache.commons.jxpath.Container |
getUPNPDevice()
Used for JXPath parsing, do not use this method |
static java.net.URL |
getURL(java.lang.String url,
java.net.URL baseURL)
Parsing an URL from the descriptionXML file |
java.net.URL |
getURLBase()
URL base acces |
long |
getValidityTime()
The validity time for this device in milliseconds, |
java.lang.String |
getVendorFirmware()
|
void |
resetValidityTime(java.lang.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 |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public UPNPRootDevice(java.net.URL deviceDefLoc, java.lang.String maxAge, java.lang.String vendorFirmware, java.lang.String discoveryUSN, java.lang.String discoveryUDN) throws java.net.MalformedURLException, java.lang.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
java.net.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
java.lang.IllegalStateException
public UPNPRootDevice(java.net.URL deviceDefLoc, java.lang.String maxAge, java.lang.String vendorFirmware) throws java.net.MalformedURLException, java.lang.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
java.net.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
java.lang.IllegalStateException
public UPNPRootDevice(java.net.URL deviceDefLoc, java.lang.String maxAge) throws java.net.MalformedURLException, java.lang.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
java.net.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
java.lang.IllegalStateException
Method Detail |
public long getValidityTime()
public void resetValidityTime(java.lang.String newMaxAge)
newMaxAge
- the maximum age in secs of this UPNP device before considered to be outdatedpublic java.net.URL getDeviceDefLoc()
public int getSpecVersionMajor()
public int getSpecVersionMinor()
public java.lang.String getVendorFirmware()
public java.lang.String getDiscoveryUSN()
public java.lang.String getDiscoveryUDN()
public java.net.URL getURLBase()
public static final java.net.URL getURL(java.lang.String url, java.net.URL baseURL) throws java.net.MalformedURLException
url
- the string representation fo the URLbaseURL
- the base device URL, needed if the url param is relative
java.net.MalformedURLException
- if the url param or baseURL.toExternalForm() + url
cannot be parsed to create an URL objectpublic java.lang.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 |