at.ac.tuwien.infosys.sm4all.copal.esper.internal
Class NotifiersActivator

java.lang.Object
  extended by at.ac.tuwien.infosys.sm4all.copal.api.osgi.GenericActivator
      extended by at.ac.tuwien.infosys.sm4all.copal.esper.internal.NotifiersActivator
All Implemented Interfaces:
DependencyTrackerCustomizer, QueryObserver, Observer<QueryState,ContextQuery>, org.osgi.framework.BundleActivator

public class NotifiersActivator
extends GenericActivator
implements QueryObserver

The OSGi BundleActivator that starts and stops instances of XMLEventNotifiers. Each created ContextQuery will result in a creation of a XMLEventNotifier and the XMLEventNotifier will be running until the ContextQuery is destroyed.

Author:
sanjin

Constructor Summary
NotifiersActivator(com.espertech.esper.client.EPServiceProvider serviceProvider, RegistryObservable<XMLContextEventType> observable)
          Creates an instance of the NotifiersActivator that uses specified EPServiceProvider and listens on specified XMLContextEventType RegistryObservable.
 
Method Summary
protected  void start()
          Called when all dependencies are met.
protected  void stop()
          Called when GenericActivator.start() was previously called and one of the dependencies has been unregistered.
 void update(QueryState state, ContextQuery query)
          Called when specified ContextQuery changes its QueryState .
 
Methods inherited from class at.ac.tuwien.infosys.sm4all.copal.api.osgi.GenericActivator
addingService, getDependency, modifiedService, register, register, removedService, start, stop, unregister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NotifiersActivator

public NotifiersActivator(com.espertech.esper.client.EPServiceProvider serviceProvider,
                          RegistryObservable<XMLContextEventType> observable)
Creates an instance of the NotifiersActivator that uses specified EPServiceProvider and listens on specified XMLContextEventType RegistryObservable.

Parameters:
serviceProvider - the EPServiceProvider.
observable - the XMLContextEventType RegistryObservable.
Method Detail

start

protected void start()
Description copied from class: GenericActivator
Called when all dependencies are met.

Specified by:
start in class GenericActivator

stop

protected void stop()
Description copied from class: GenericActivator
Called when GenericActivator.start() was previously called and one of the dependencies has been unregistered.

Specified by:
stop in class GenericActivator

update

public void update(QueryState state,
                   ContextQuery query)
Description copied from interface: QueryObserver
Called when specified ContextQuery changes its QueryState .

Specified by:
update in interface QueryObserver
Specified by:
update in interface Observer<QueryState,ContextQuery>
Parameters:
state - the QueryState.
query - the ContextQuery.


Copyright © 2010 Distributed Systems Group, Vienna University of Technology. All Rights Reserved.