de.torstennahm.integrate
Class StopConditions.UntilTimeOut

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

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

Signals the integration should be stopped if the specified timeout is reached.

Author:
Torsten Nahm

Constructor Summary
StopConditions.UntilTimeOut(long ms)
          Constructs the stop condition.
 
Method Summary
 java.lang.String getConditionString()
          Returns a string describing the fulfillment of the condition.
 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.UntilTimeOut

public StopConditions.UntilTimeOut(long ms)
Constructs the stop condition. Time is counted from the call of this constructor.

Parameters:
ms - timeout for integration
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

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