Class 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 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
      • UPC

        protected long UPC
      • deviceIcons

        protected List deviceIcons
      • services

        protected List services
      • childDevices

        protected List childDevices
    • Constructor Detail

      • UPNPDevice

        public UPNPDevice()
    • 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
      • toString

        public String toString()
        The toString return the device type
        Overrides:
        toString in class Object
        Returns:
        the device type