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

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

public class ActionQuery
extends ContextQuery

This class is used with the ContextProcessors to create queries which listen on occurrence of events that need ProcessorAction.

Author:
sanjin

Constructor Summary
ActionQuery(ProcessorAction action)
          Create instance of the action query.
 
Method Summary
 boolean equals(Object obj)
          Compares this action query to the specified object.
 ProcessorAction getAction()
           
 int hashCode()
          Returns hash code for this action query.
 
Methods inherited from class at.ac.tuwien.infosys.sm4all.copal.api.ContextQuery
attach, destroy, detach, detachAll, getCriteria, getEventType, getListeners, getName, hasCriteria, isDestroyed, isRegistered, onEvent, register, unregister, unregisterAll
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionQuery

public ActionQuery(ProcessorAction action)
Create instance of the action query. The action defines the processor action for context events this action query should catch.

Parameters:
action - the processor action.
Throws:
NullPointerException - if specified action is null.
Method Detail

getAction

public ProcessorAction getAction()
Returns:
the processor action.

hashCode

public int hashCode()
Returns hash code for this action query. The hash code for a ActionQuery object is hash code of its action.

Overrides:
hashCode in class ContextQuery
Returns:
a hash code value for this action query.

equals

public boolean equals(Object obj)
Compares this action query to the specified object. The result is true if and only if the argument is not null and is a ActionQuery object that has same action this action query.

Overrides:
equals in class ContextQuery
Parameters:
obj - the object to compare this action query against.
Returns:
true if action queries are equal; false otherwise.


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