com.ibm.retail.AEF.automation
Interface Condition

All Known Implementing Classes:
AbstractCondition, AndCondition, AndThenCondition, OrCondition

public interface Condition

Condition is an interface for classes which listen for events which may unblock a thread which is waiting on a ThreadManager.wait() call.


Method Summary
 void addEvaluateListener(com.ibm.retail.AEF.automation.EvaluateConditionListener listener)
          Add a EvaluateConditionListener which will be notified whenever the condition is evaluated.
 void currentValues(java.util.HashMap values)
          Populate the HashMap with property name/current value pairs included in the condition.
 boolean evaluate()
          Evaluates the condition with the current value of the property without waiting for the next property value change.
 java.lang.String explain()
          Returns a string which describes the condition being monitored.
 int getID()
          Gets the unique id of this condition.
 int getIndex()
          Gets the vector index of this condition.
 com.ibm.retail.AEF.data.POSDataProvider getPOSDataProvider()
          Returns the POSDataProvider associated with this condition.
 com.ibm.retail.AEF.session.AEFSession getSession()
          Gets the AEFSession associated with this condition.
 java.lang.String getTerminalNumber()
          Gets the terminal number associated with the session for this condition.
 boolean isEligible()
          Indicates whether the condition is eligible for evaluation.
 com.ibm.retail.AEF.automation.Condition makeOpposite()
          Makes a new condition which is the logical opposite of this condition.
 void removeEvaluateListener(com.ibm.retail.AEF.automation.EvaluateConditionListener listener)
          Remove a EvaluateConditionListener
 void setConditionLock(com.ibm.retail.AEF.thread.ConditionLock lock)
          Sets the ConditionLock associated with this condition.
 void setEligible(boolean flag)
          Sets the condition eligible for evaluation.
 void setID(int id)
          Sets the unique id of this condition (for use in trace & debug).
 void setIndex(int index)
          Sets the index of this condition (for use within a vector).
 void setLockManager(com.ibm.retail.AEF.thread.ConditionLockManager manager)
          Sets the condition lock manager associated with this condition.
 void setPOSDataProvider(com.ibm.retail.AEF.data.POSDataProvider dataProvider)
          Sets the POSDataProvider associated with this condition.
 void setSession(com.ibm.retail.AEF.session.AEFSession session)
          Sets the AEFSession associated with this condition.
 

Method Detail

setEligible

public void setEligible(boolean flag)
Sets the condition eligible for evaluation.

Parameters:
flag - Set to true to make this condition eligible for evaluation.

isEligible

public boolean isEligible()
Indicates whether the condition is eligible for evaluation.

Returns:
boolean Indicates whether this condition is eligible for evaluation.

setLockManager

public void setLockManager(com.ibm.retail.AEF.thread.ConditionLockManager manager)
Sets the condition lock manager associated with this condition.

Parameters:
manager - The condition lock manager which can notify the blocked thread.

setPOSDataProvider

public void setPOSDataProvider(com.ibm.retail.AEF.data.POSDataProvider dataProvider)
Sets the POSDataProvider associated with this condition.

Parameters:
dataProvider - The POSDataProvider which will provide property change events to this condition.

getPOSDataProvider

public com.ibm.retail.AEF.data.POSDataProvider getPOSDataProvider()
Returns the POSDataProvider associated with this condition.

Returns:
POSDataProvider The POSDataProvider associated with this condition.

setIndex

public void setIndex(int index)
Sets the index of this condition (for use within a vector).

Parameters:
index - This integer value will be returned by the ConditionLock to indicate which condition signalled the lock.

getIndex

public int getIndex()
Gets the vector index of this condition.

Returns:
int The integer which tells the ConditionLock which condition evaluated to true to cause it to be signalled.

setID

public void setID(int id)
Sets the unique id of this condition (for use in trace & debug).

Parameters:
id - A unique id used for trace and debug.

getID

public int getID()
Gets the unique id of this condition.

Returns:
int The unique id of this condition used for trace and debug.

evaluate

public boolean evaluate()
Evaluates the condition with the current value of the property without waiting for the next property value change.

Returns:
boolean

makeOpposite

public com.ibm.retail.AEF.automation.Condition makeOpposite()
Makes a new condition which is the logical opposite of this condition.

Returns:
Condition

addEvaluateListener

public void addEvaluateListener(com.ibm.retail.AEF.automation.EvaluateConditionListener listener)
Add a EvaluateConditionListener which will be notified whenever the condition is evaluated.


removeEvaluateListener

public void removeEvaluateListener(com.ibm.retail.AEF.automation.EvaluateConditionListener listener)
Remove a EvaluateConditionListener


setSession

public void setSession(com.ibm.retail.AEF.session.AEFSession session)
Sets the AEFSession associated with this condition.

Parameters:
session -

getSession

public com.ibm.retail.AEF.session.AEFSession getSession()
Gets the AEFSession associated with this condition.

Returns:
AEFSession

getTerminalNumber

public java.lang.String getTerminalNumber()
Gets the terminal number associated with the session for this condition.

Returns:
String terminal number

explain

public java.lang.String explain()
Returns a string which describes the condition being monitored.

Returns:
String

currentValues

public void currentValues(java.util.HashMap values)
Populate the HashMap with property name/current value pairs included in the condition. If a key is already in the HashMap, the new value will not override the value already in the map for the key.

Parameters:
values -

setConditionLock

public void setConditionLock(com.ibm.retail.AEF.thread.ConditionLock lock)
Sets the ConditionLock associated with this condition.

Parameters:
lock -


Copyright © 2004 IBM. All Rights Reserved.
Generated: July 19 2004