Package net.sbbi.upnp.devices
Class Device
java.lang.Object
net.sbbi.upnp.devices.Device
- Direct Known Subclasses:
RootDevice
This class represents an UPNP device, this device contains a set of
services that will be needed to access the device functionalities.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetChildDevice
(String deviceURI) Looks for a child UPNP device definition file, the whole devices tree will be searched, starting from the current device node.Generates a list of all the child ( not only top level, full childrens hierarchy included ) UPNPDevice objects for this device.Return the parent UPNPDevice, null if the device is an UPNPRootDevicegetService
(String serviceURI) Looks for a UPNP device service definition object for the given service URI (Type)getServiceByID
(String serviceID) Looks for a UPNP device service definition object for the given service IDgetServices
(String serviceURI) Looks for the all the UPNP device service definition object for the current UPNP device object.static final URL
Parsing an URL from the descriptionXML filetoString()
-
Field Details
-
deviceType
-
friendlyName
-
manufacturer
-
manufacturerURL
-
presentationURL
-
modelDescription
-
modelName
-
modelNumber
-
modelURL
-
serialNumber
-
UDN
-
USN
-
UPC
public final long UPC -
services
-
childDevices
-
parent
-
-
Constructor Details
-
Device
- Parameters:
deviceCtx
-parent
-urlBase
-
-
-
Method Details
-
getURL
Parsing an URL from the descriptionXML file- Parameters:
url
- the string representation fo the URLbaseURL
- the base device URL, needed if the url param is relative- Returns:
- an URL object defining the url param
- Throws:
MalformedURLException
- if the url param or baseURL.toExternalForm() + url cannot be parsed to create an URL object
-
getChildDevices
Generates a list of all the child ( not only top level, full childrens hierarchy included ) UPNPDevice objects for this device.- Returns:
- the generated list or null if no child devices bound
-
getDirectParent
Return the parent UPNPDevice, null if the device is an UPNPRootDevice- Returns:
- the parent device instance
-
getChildDevice
Looks for a child UPNP device definition file, the whole devices tree will be searched, starting from the current device node.- Parameters:
deviceURI
- the device URI to search- Returns:
- An UPNPDevice if anything matches or null
-
getService
Looks for a UPNP device service definition object for the given service URI (Type)- Parameters:
serviceURI
- the URI of the service- Returns:
- A matching UPNPService object or null
-
getServiceByID
Looks for a UPNP device service definition object for the given service ID- Parameters:
serviceID
- the ID of the service- Returns:
- A matching UPNPService object or null
-
getServices
Looks for the all the UPNP device service definition object for the current UPNP device object. This method can be used to retrieve multiple same kind ( same service type ) of services with different services id on a device- Parameters:
serviceURI
- the URI of the service- Returns:
- A matching List of UPNPService objects or null
-
toString
-