at.ac.tuwien.infosys.sm4all.copal.esper
Class XMLEventNotifier

java.lang.Object
  extended by at.ac.tuwien.infosys.sm4all.copal.esper.XMLEventNotifier
All Implemented Interfaces:
Observer<RegistryObservable.RegistrationState,XMLContextEventType>, RegistryObservable.RegistryObserver<XMLContextEventType>

public class XMLEventNotifier
extends java.lang.Object
implements RegistryObservable.RegistryObserver<XMLContextEventType>

Esper subscriber which helps transform Esper events to XMLContextEvents that are understood by ContextQuery. This class is bridge between Esper and COPAL.

Author:
fei, sanjin

Constructor Summary
XMLEventNotifier(com.espertech.esper.client.EPAdministrator administrator, ContextQuery query)
          Creates instance of Esper subscriber using specified EPAdministrator to create EPStatement from specified ContextQuery.
 
Method Summary
 void update(org.w3c.dom.Node node)
          Called when Esper has new event that is represented by specified XML node.
 void update(RegistryObservable.RegistrationState state, XMLContextEventType eventType)
          Called when specified objects changes its RegistryObservable.RegistrationState with a BaseRegistry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLEventNotifier

public XMLEventNotifier(com.espertech.esper.client.EPAdministrator administrator,
                        ContextQuery query)
Creates instance of Esper subscriber using specified EPAdministrator to create EPStatement from specified ContextQuery.

Parameters:
administrator - the EPAdministrator.
query - the context query.
Method Detail

update

public void update(RegistryObservable.RegistrationState state,
                   XMLContextEventType eventType)
Description copied from interface: RegistryObservable.RegistryObserver
Called when specified objects changes its RegistryObservable.RegistrationState with a BaseRegistry.

Specified by:
update in interface Observer<RegistryObservable.RegistrationState,XMLContextEventType>
Specified by:
update in interface RegistryObservable.RegistryObserver<XMLContextEventType>
Parameters:
state - the RegistryObservable.RegistrationState.
eventType - the changed object.

update

public void update(org.w3c.dom.Node node)
Called when Esper has new event that is represented by specified XML node. This method in return calls specified ContextQuery.

Parameters:
node - the event.


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