public class Device extends Object
| Modifier and Type | Field and Description |
|---|---|
Device[] |
childDevices |
String |
deviceType |
String |
friendlyName |
String |
manufacturer |
URL |
manufacturerURL |
String |
modelDescription |
String |
modelName |
String |
modelNumber |
String |
modelURL |
Device |
parent |
URL |
presentationURL |
String |
serialNumber |
Service[] |
services |
String |
UDN |
long |
UPC |
String |
USN |
| Constructor and Description |
|---|
Device(Node deviceCtx,
Device parent,
URL urlBase) |
| Modifier and Type | Method and Description |
|---|---|
Device |
getChildDevice(String deviceURI)
Looks for a child UPNP device definition file, the whole devices
tree will be searched, starting from the current device node.
|
List<Device> |
getChildDevices()
Generates a list of all the child ( not only top level, full
childrens hierarchy included ) UPNPDevice objects for this
device.
|
Device |
getDirectParent()
Return the parent UPNPDevice, null if the device is an
UPNPRootDevice
|
Service |
getService(String serviceURI)
Looks for a UPNP device service definition object for the given
service URI (Type)
|
Service |
getServiceByID(String serviceID)
Looks for a UPNP device service definition object for the given
service ID
|
List<Service> |
getServices(String serviceURI)
Looks for the all the UPNP device service definition object for
the current UPNP device object.
|
static URL |
getURL(String url,
URL baseURL)
Parsing an URL from the descriptionXML file
|
String |
toString() |
public final String deviceType
public final String friendlyName
public final String manufacturer
public final URL manufacturerURL
public final URL presentationURL
public final String modelDescription
public final String modelName
public final String modelNumber
public final String modelURL
public final String serialNumber
public final String UDN
public final String USN
public final long UPC
public final Service[] services
public final Device[] childDevices
public final Device parent
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
relativeMalformedURLException - if the url param or baseURL.toExternalForm() + url
cannot be parsed to create an URL objectpublic List<Device> getChildDevices()
public Device getDirectParent()
public Device getChildDevice(String deviceURI)
deviceURI - the device URI to searchpublic Service getService(String serviceURI)
serviceURI - the URI of the servicepublic Service getServiceByID(String serviceID)
serviceID - the ID of the servicepublic List<Service> getServices(String serviceURI)
serviceURI - the URI of the serviceCopyright © 2011. All Rights Reserved.