Package net.sbbi.upnp.devices
Class UPNPDevice
- java.lang.Object
-
- net.sbbi.upnp.devices.UPNPDevice
-
- Direct Known Subclasses:
UPNPRootDevice
public class UPNPDevice extends Object
This class represents an UPNP device, this device contains a set of services that will be needed to access the device functionalities.- Version:
- 1.0
- Author:
- SuperBonBon
-
-
Field Summary
Fields Modifier and Type Field Description protected ListchildDevicesprotected ListdeviceIconsprotected StringdeviceTypeprotected StringfriendlyNameprotected Stringmanufacturerprotected URLmanufacturerURLprotected StringmodelDescriptionprotected StringmodelNameprotected StringmodelNumberprotected StringmodelURLprotected UPNPDeviceparentprotected URLpresentationURLprotected StringserialNumberprotected Listservicesprotected StringUDNprotected longUPCprotected StringUSN
-
Constructor Summary
Constructors Constructor Description UPNPDevice()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UPNPDevicegetChildDevice(String deviceURI)Looks for a child UPNP device definition file, the whole devices tree will be searched, starting from the current device node.ListgetChildDevices()Generates a list of all the child ( not only top level, full childrens hierarchy included ) UPNPDevice objects for this device.ListgetDeviceIcons()Access to the device icons definitionsStringgetDeviceType()UPNPDevicegetDirectParent()Return the parent UPNPDevice, null if the device is an UPNPRootDeviceStringgetFriendlyName()StringgetManufacturer()URLgetManufacturerURL()StringgetModelDescription()StringgetModelName()StringgetModelNumber()StringgetModelURL()URLgetPresentationURL()Presentation URLStringgetSerialNumber()UPNPServicegetService(String serviceURI)Looks for a UPNP device service definition object for the given service URI (Type)UPNPServicegetServiceByID(String serviceID)Looks for a UPNP device service definition object for the given service IDListgetServices()Looks for all UPNP device service definitions objectsListgetServices(String serviceURI)Looks for the all the UPNP device service definition object for the current UPNP device object.ListgetTopLevelChildDevices()Generates a list of all the child ( only top level ) UPNPDevice objects for this device.StringgetUDN()longgetUPC()StringgetUSN()booleanisRootDevice()StringtoString()The toString return the device type
-
-
-
Field Detail
-
deviceType
protected String deviceType
-
friendlyName
protected String friendlyName
-
manufacturer
protected String manufacturer
-
manufacturerURL
protected URL manufacturerURL
-
presentationURL
protected URL presentationURL
-
modelDescription
protected String modelDescription
-
modelName
protected String modelName
-
modelNumber
protected String modelNumber
-
modelURL
protected String modelURL
-
serialNumber
protected String serialNumber
-
UDN
protected String UDN
-
USN
protected String USN
-
UPC
protected long UPC
-
deviceIcons
protected List deviceIcons
-
services
protected List services
-
childDevices
protected List childDevices
-
parent
protected UPNPDevice parent
-
-
Method Detail
-
getManufacturerURL
public URL getManufacturerURL()
-
getPresentationURL
public URL getPresentationURL()
Presentation URL- Returns:
- URL the presenation URL, or null if the device does not provide such information
-
getModelDescription
public String getModelDescription()
-
getModelName
public String getModelName()
-
getModelNumber
public String getModelNumber()
-
getModelURL
public String getModelURL()
-
getSerialNumber
public String getSerialNumber()
-
getUDN
public String getUDN()
-
getUSN
public String getUSN()
-
getUPC
public long getUPC()
-
getDeviceType
public String getDeviceType()
-
getFriendlyName
public String getFriendlyName()
-
getManufacturer
public String getManufacturer()
-
isRootDevice
public boolean isRootDevice()
-
getDeviceIcons
public List getDeviceIcons()
Access to the device icons definitions- Returns:
- a list containing DeviceIcon objects or null if no icons defined
-
getChildDevices
public List 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
-
getTopLevelChildDevices
public List getTopLevelChildDevices()
Generates a list of all the child ( only top level ) UPNPDevice objects for this device.- Returns:
- the generated list or null if no child devices bound
-
getDirectParent
public UPNPDevice getDirectParent()
Return the parent UPNPDevice, null if the device is an UPNPRootDevice- Returns:
- the parent device instance
-
getChildDevice
public UPNPDevice getChildDevice(String deviceURI)
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
-
getServices
public List getServices()
Looks for all UPNP device service definitions objects- Returns:
- A list of all device services
-
getService
public UPNPService getService(String serviceURI)
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
public UPNPService getServiceByID(String serviceID)
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
public List getServices(String serviceURI)
Looks for the all the UPNP device service definition object for the current UPNP device object. This method can be used to retreive 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
-
-