org.apache.felix.eventadmin.bridge.upnp
Class UPnPEventToEventAdminBridge

java.lang.Object
  extended by org.apache.felix.eventadmin.bridge.upnp.UPnPEventToEventAdminBridge
All Implemented Interfaces:
UPnPEventListener

public class UPnPEventToEventAdminBridge
extends Object
implements UPnPEventListener

This class registers itself as an UPnPEventListener service with the framework whenever both, at least one EventAdmin and at least one EventHandler is present and subsequently, bridges UPnPEvents received to the EventAdmin service. In order to track EventAdmin services this class registers a ServiceListener for EventAdmin services as well as a ServiceListener for EventHandlers in order to determine EventHandler availability.

Author:
Felix Project Team

Field Summary
 
Fields inherited from interface org.osgi.service.upnp.UPnPEventListener
UPNP_FILTER
 
Constructor Summary
UPnPEventToEventAdminBridge(BundleContext context)
          This class registers itself as an UPnPEventListener service with the framework whenever both, at least one EventAdmin and at least one EventHandler is present and subsequently, bridges UPnPEvents received to the EventAdmin service.
 
Method Summary
 void notifyUPnPEvent(String deviceId, String serviceId, Dictionary events)
          Bridge any event to the EventAdmin service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UPnPEventToEventAdminBridge

public UPnPEventToEventAdminBridge(BundleContext context)
This class registers itself as an UPnPEventListener service with the framework whenever both, at least one EventAdmin and at least one EventHandler is present and subsequently, bridges UPnPEvents received to the EventAdmin service. In order to track EventAdmin services this class registers a ServiceListener for EventAdmin services as well as a ServiceListener for EventHandlers in order to determine EventHandler availability.

Parameters:
context - The context to register with.
Method Detail

notifyUPnPEvent

public void notifyUPnPEvent(String deviceId,
                            String serviceId,
                            Dictionary events)
Bridge any event to the EventAdmin service.

Specified by:
notifyUPnPEvent in interface UPnPEventListener
Parameters:
deviceId - Bridged to upnp.deviceId
serviceId - Bridged to upnp.serviceId
events - Bridged to upnp.events
See Also:
UPnPEventListener.notifyUPnPEvent(java.lang.String, java.lang.String, java.util.Dictionary)


Copyright © 2011 Apache Software Foundation. All Rights Reserved.