org.apache.felix.upnp.sample.binaryLight.devices
Class LightDevice

java.lang.Object
  extended by org.apache.felix.upnp.sample.binaryLight.devices.LightDevice
All Implemented Interfaces:
UPnPDevice

public class LightDevice
extends Object
implements UPnPDevice


Field Summary
 
Fields inherited from interface org.osgi.service.upnp.UPnPDevice
CHILDREN_UDN, DEVICE_CATEGORY, FRIENDLY_NAME, ID, MANUFACTURER, MANUFACTURER_URL, MATCH_GENERIC, MATCH_MANUFACTURER_MODEL, MATCH_MANUFACTURER_MODEL_REVISION, MATCH_MANUFACTURER_MODEL_REVISION_SERIAL, MATCH_TYPE, MODEL_DESCRIPTION, MODEL_NAME, MODEL_NUMBER, MODEL_URL, PARENT_UDN, PRESENTATION_URL, SERIAL_NUMBER, TYPE, UDN, UPC, UPNP_EXPORT
 
Constructor Summary
LightDevice(BundleContext context)
           
 
Method Summary
 void close()
           
 Dictionary getDescriptions(String locale)
          Get a set of localized UPnP properties.
 UPnPIcon[] getIcons(String locale)
          Lists all icons for this device in a given locale.
 LightModel getModel()
           
 UPnPService getService(String serviceId)
          Locates a specific service by its service id.
 UPnPService[] getServices()
          Lists all services provided by this device.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LightDevice

public LightDevice(BundleContext context)
Method Detail

getModel

public LightModel getModel()

getService

public UPnPService getService(String serviceId)
Description copied from interface: UPnPDevice
Locates a specific service by its service id.

Specified by:
getService in interface UPnPDevice
Parameters:
serviceId - The service id
Returns:
The requested service or null if not found.

getServices

public UPnPService[] getServices()
Description copied from interface: UPnPDevice
Lists all services provided by this device.

Specified by:
getServices in interface UPnPDevice
Returns:
Array of services or null if no services are available.

getIcons

public UPnPIcon[] getIcons(String locale)
Description copied from interface: UPnPDevice
Lists all icons for this device in a given locale. The UPnP specification allows a device to present different icons based on the client's locale.

Specified by:
getIcons in interface UPnPDevice
Parameters:
locale - A language tag as defined by RFC 1766 and maintained by ISO 639. Examples include "de", "en" or " en-US". The default locale of the device is specified by passing a null argument.
Returns:
Array of icons or null if no icons are available.

getDescriptions

public Dictionary getDescriptions(String locale)
Description copied from interface: UPnPDevice
Get a set of localized UPnP properties. The UPnP specification allows a device to present different device properties based on the client's locale. The properties used to register the UPnPDevice service in the OSGi registry are based on the device's default locale. To obtain a localized set of the properties, an application can use this method.

Not all properties might be available in all locales. This method does not substitute missing properties with their default locale versions.

Specified by:
getDescriptions in interface UPnPDevice
Parameters:
locale - A language tag as defined by RFC 1766 and maintained by ISO 639. Examples include "de", "en" or " en-US". The default locale of the device is specified by passing a null argument.
Returns:
Dictionary mapping property name Strings to property value Strings

close

public void close()


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.