|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.pageobjects.elements.timeout.PropertiesBasedTimeouts
public class PropertiesBasedTimeouts
Timeouts implementation based on Java properties.
This implementation accepts a Properties instance that contains properties in the following
form: 'com.atlassian.timeout.<TIMEOUT_TYPE>, where <TIMEOUT_TYPE> corresponds to a particular
field name of the TimeoutType enum.
At the very least, the properties are supposed to contain the TimeoutType.DEFAULT
value (which corresponds to the property key 'com.atlassian.timeout.DEFAULT'). 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 | |
|---|---|
static String |
DEFAULT_PROPERTY_KEY
|
static String |
PROPERTY_PREFIX
|
| Fields inherited from interface com.atlassian.pageobjects.elements.timeout.Timeouts |
|---|
DEFAULT_INTERVAL |
| Constructor Summary | |
|---|---|
PropertiesBasedTimeouts(InputStream reader)
Reads the properties from given reader. |
|
PropertiesBasedTimeouts(Properties properties)
|
|
| Method Summary | |
|---|---|
static PropertiesBasedTimeouts |
fromClassPath(String path)
Load instance of PropertiesBasedTimeouts based on properties from a class path resource. |
static PropertiesBasedTimeouts |
fromClassPath(String path,
ClassLoader loader)
Load instance of PropertiesBasedTimeouts based on properties from a class path resource. |
static PropertiesBasedTimeouts |
fromFile(String path)
Load instance of PropertiesBasedTimeouts based on properties from file on disk. |
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 |
| Field Detail |
|---|
public static final String PROPERTY_PREFIX
public static final String DEFAULT_PROPERTY_KEY
| Constructor Detail |
|---|
public PropertiesBasedTimeouts(Properties properties)
public PropertiesBasedTimeouts(InputStream reader)
reader - reader to load properties from| Method Detail |
|---|
public static PropertiesBasedTimeouts fromFile(String path)
path - path of the properties file
public static PropertiesBasedTimeouts fromClassPath(String path,
ClassLoader loader)
path - path of the resourceloader - class loader to use
public static PropertiesBasedTimeouts fromClassPath(String path)
path - path of the resource
public long timeoutFor(TimeoutType timeoutType)
Timeouts
timeoutFor in interface TimeoutstimeoutType - type of the timeout
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||