de.torstennahm.integrate
Class StopConditions.MultiStopCondition

java.lang.Object
  extended by de.torstennahm.integrate.StopConditions.MultiStopCondition
All Implemented Interfaces:
StopCondition
Enclosing class:
StopConditions

public static class StopConditions.MultiStopCondition
extends java.lang.Object
implements StopCondition

Checks whether any of a list of conditions has been fulfilled.


Constructor Summary
StopConditions.MultiStopCondition(java.util.List<StopCondition> conditions)
          Constructs the stop condition.
 
Method Summary
 java.lang.String getConditionString()
          Returns a string describing the fulfillment of the condition.
 StopCondition getStopper()
          Returns which condition has caused the stop method to return true.
 boolean stop(IntegrationResult result)
          Returns true if the integration should be stopped because of this condition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StopConditions.MultiStopCondition

public StopConditions.MultiStopCondition(java.util.List<StopCondition> conditions)
Constructs the stop condition.

Parameters:
conditions - list of conditions
Method Detail

stop

public boolean stop(IntegrationResult result)
Description copied from interface: StopCondition
Returns true if the integration should be stopped because of this condition.

Specified by:
stop in interface StopCondition
Parameters:
result - integration result
Returns:
true if condition is fulfilled

getStopper

public StopCondition getStopper()
Returns which condition has caused the stop method to return true. If stop has not yet returned true, null will be returned.

Returns:
condition that caused the stop, or null

getConditionString

public java.lang.String getConditionString()
Description copied from interface: StopCondition
Returns a string describing the fulfillment of the condition. For example, if stopping when the error tolerance is below the requirement, the string might be "Error tolerance reached".

Specified by:
getConditionString in interface StopCondition
Returns:
string describing condition when it is fulfilled