com.atlassian.pageobjects.elements.timeout
Class MapBasedTimeouts

java.lang.Object
  extended by com.atlassian.pageobjects.elements.timeout.MapBasedTimeouts
All Implemented Interfaces:
Timeouts

public class MapBasedTimeouts
extends Object
implements Timeouts

Timeouts implementation based on simple mappings between timeout types and values.

At the very least, the provided map is supposed to contain timeout value for the TimeoutType.DEFAULT key. If it is not present, an exception will be raised from the constructor. This value will be used in place of whatever other timeout type that does have corresponding value within the properties.


Field Summary
 
Fields inherited from interface com.atlassian.pageobjects.elements.timeout.Timeouts
DEFAULT_INTERVAL
 
Constructor Summary
MapBasedTimeouts(Map<TimeoutType,Long> timeouts)
           
 
Method Summary
 long timeoutFor(TimeoutType timeoutType)
          Provide timeout (in milliseconds) for a given timeoutType.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapBasedTimeouts

public MapBasedTimeouts(Map<TimeoutType,Long> timeouts)
Method Detail

timeoutFor

public long timeoutFor(TimeoutType timeoutType)
Description copied from interface: Timeouts
Provide timeout (in milliseconds) for a given timeoutType.

Specified by:
timeoutFor in interface Timeouts
Parameters:
timeoutType - type of the timeout
Returns:
timeout value in milliseconds


Copyright © 2014 Atlassian. All rights reserved.