|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.upnp.sample.tv.TvDevice
public class TvDevice
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 |
Fields inherited from interface org.osgi.service.upnp.UPnPEventListener |
---|
UPNP_FILTER |
Constructor Summary | |
---|---|
TvDevice()
|
Method Summary | |
---|---|
void |
doSubscribe()
|
String |
getAirconTempture()
|
String |
getClockTime()
|
Component |
getComponent()
|
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. |
String |
getMessage()
|
UPnPService |
getService(String serviceId)
Locates a specific service by its service id. |
UPnPService[] |
getServices()
Lists all services provided by this device. |
boolean |
isOn()
|
void |
notifyUPnPEvent(String deviceId,
String serviceId,
Dictionary events)
Callback method that is invoked for received events. |
void |
off()
|
void |
on()
|
void |
serviceChanged(ServiceEvent event)
Receives notification that a service has had a lifecycle change. |
void |
setComponent(Component comp)
|
void |
setMessage(String msg)
|
void |
start()
|
void |
stop()
|
void |
undoSubscribe()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TvDevice()
Method Detail |
---|
public UPnPService getService(String serviceId)
UPnPDevice
getService
in interface UPnPDevice
serviceId
- The service id
public UPnPService[] getServices()
UPnPDevice
getServices
in interface UPnPDevice
null
if no services are
available.public UPnPIcon[] getIcons(String locale)
UPnPDevice
getIcons
in interface UPnPDevice
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.
public Dictionary getDescriptions(String locale)
UPnPDevice
Not all properties might be available in all locales. This method does not substitute missing properties with their default locale versions.
getDescriptions
in interface UPnPDevice
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.
public void setComponent(Component comp)
public Component getComponent()
public void on()
public boolean isOn()
public void off()
public String getClockTime()
public String getAirconTempture()
public void setMessage(String msg)
public String getMessage()
public void doSubscribe()
public void undoSubscribe()
public void notifyUPnPEvent(String deviceId, String serviceId, Dictionary events)
UPnPEventListener
Dictionary
object. Each entry
has a String
key representing the event name (= state variable
name) and the new value of the state variable. The class of the value
object must match the class specified by the UPnP State Variable
associated with the event. This method must be called asynchronously
notifyUPnPEvent
in interface UPnPEventListener
deviceId
- ID of the device sending the eventsserviceId
- ID of the service sending the eventsevents
- Dictionary
object containing the new values for
the state variables that have changed.public void start()
public void stop()
public void serviceChanged(ServiceEvent event)
ServiceListener
serviceChanged
in interface ServiceListener
event
- The ServiceEvent
object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |