at.ac.tuwien.infosys.sm4all.copal.api
Class ProcessedEventQuery

java.lang.Object
  extended by at.ac.tuwien.infosys.sm4all.copal.api.ContextQuery
      extended by at.ac.tuwien.infosys.sm4all.copal.api.ProcessedEventQuery

public class ProcessedEventQuery
extends ContextQuery

This class is used with the ContextListeners to create queries which listen on occurrence of processed events (i.e. events for which all ContextEventActions are finished}.

Author:
sanjin

Constructor Summary
ProcessedEventQuery(String name, String eventType)
          Create instance of the query for processed events.
ProcessedEventQuery(String name, String eventType, String criteria)
          Create instance of the query for processed events.
 
Method Summary
 
Methods inherited from class at.ac.tuwien.infosys.sm4all.copal.api.ContextQuery
attach, destroy, detach, detachAll, equals, getCriteria, getEventType, getListeners, getName, hasCriteria, hashCode, isDestroyed, isRegistered, onEvent, register, unregister, unregisterAll
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessedEventQuery

public ProcessedEventQuery(String name,
                           String eventType)
Create instance of the query for processed events. The name should be globally unique, meaning that if two context query have same name then their eventTypes and criterias are equal. The eventType is name of ContextEventType to be caught.

Parameters:
name - the globally unique name of the query.
eventType - the name of ContextEventType.
Throws:
NullPointerException - if specified name or event name is null.
IllegalArgumentException - if specified name or event name is an empty or blank string.

ProcessedEventQuery

public ProcessedEventQuery(String name,
                           String eventType,
                           String criteria)
Create instance of the query for processed events. The name should be globally unique, meaning that if two context queries have same name then their eventTypes and criterias are equal. The eventType is name of ContextEventType on which criteria is executed. The criteria is the logical statement which further separates the processed events of interest. If query should catch all eventType events, we set criteria to be null or blank string or use ContextQuery(String, String) constructor.

Parameters:
name - the globally unique name of the query.
eventType - the name of ContextEventType.
criteria - the logical expression.
Throws:
NullPointerException - if specified name or event name is null.
IllegalArgumentException - if specified name or event name is an empty or blank string.


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