net.sbbi.upnp.devices
Class UPNPDevice

java.lang.Object
  extended by 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
protected  List childDevices
           
protected  List deviceIcons
           
protected  String deviceType
           
protected  String friendlyName
           
protected  String manufacturer
           
protected  URL manufacturerURL
           
protected  String modelDescription
           
protected  String modelName
           
protected  String modelNumber
           
protected  String modelURL
           
protected  UPNPDevice parent
           
protected  URL presentationURL
           
protected  String serialNumber
           
protected  List services
           
protected  String UDN
           
protected  long UPC
           
protected  String USN
           
 
Constructor Summary
UPNPDevice()
           
 
Method Summary
 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.
 List getChildDevices()
          Generates a list of all the child ( not only top level, full childrens hierarchy included ) UPNPDevice objects for this device.
 List getDeviceIcons()
          Access to the device icons definitions
 String getDeviceType()
           
 UPNPDevice getDirectParent()
          Return the parent UPNPDevice, null if the device is an UPNPRootDevice
 String getFriendlyName()
           
 String getManufacturer()
           
 URL getManufacturerURL()
           
 String getModelDescription()
           
 String getModelName()
           
 String getModelNumber()
           
 String getModelURL()
           
 URL getPresentationURL()
          Presentation URL
 String getSerialNumber()
           
 UPNPService getService(String serviceURI)
          Looks for a UPNP device service definition object for the given service URI (Type)
 UPNPService getServiceByID(String serviceID)
          Looks for a UPNP device service definition object for the given service ID
 List getServices()
          Looks for all UPNP device service definitions objects
 List getServices(String serviceURI)
          Looks for the all the UPNP device service definition object for the current UPNP device object.
 List getTopLevelChildDevices()
          Generates a list of all the child ( only top level ) UPNPDevice objects for this device.
 String getUDN()
           
 long getUPC()
           
 String getUSN()
           
 boolean isRootDevice()
           
 String toString()
          The toString return the device type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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
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:
serviceURI - 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


Copyright © 2010. All Rights Reserved.