public class WebAppMonitor
extends java.lang.Object
implements java.lang.Runnable
Constructor and Description |
---|
WebAppMonitor() |
WebAppMonitor(java.lang.String url) |
Modifier and Type | Method and Description |
---|---|
WebAppMonitor |
assertAttemptsMade(int minAttempts,
java.lang.String message) |
WebAppMonitor |
assertNoFailures(java.lang.String message) |
WebAppMonitor |
assertSuccessFraction(java.lang.String message,
double fraction) |
WebAppMonitor |
delayMillis(long val) |
WebAppMonitor |
expectedResponseCode(int val) |
int |
getAttempts() |
long |
getDelayMillis() |
int |
getFailures() |
java.lang.Object |
getLastFailure()
result code (int) or exception
|
java.lang.Object |
getLastStatus() |
long |
getLastTime() |
boolean |
getLastWasFailed() |
java.lang.Object |
getProblem() |
int |
getSuccesses() |
java.lang.String |
getUrl() |
boolean |
isResponseOkay(java.lang.Object code) |
WebAppMonitor |
logFailures(org.slf4j.Logger log) |
void |
onFailure(java.lang.Object problem) |
boolean |
preAttempt()
return false to skip a run
|
WebAppMonitor |
resetCounts() |
void |
run() |
void |
setDelayMillis(long delayMillis) |
void |
setUrl(java.lang.String url) |
void |
terminate() |
WebAppMonitor |
url(java.lang.String val) |
WebAppMonitor |
waitForAtLeastOneAttempt() |
WebAppMonitor |
waitForAtLeastOneAttempt(Duration timeout) |
public WebAppMonitor(java.lang.String url)
public WebAppMonitor()
public WebAppMonitor logFailures(org.slf4j.Logger log)
public WebAppMonitor delayMillis(long val)
public WebAppMonitor expectedResponseCode(int val)
public WebAppMonitor url(java.lang.String val)
public void run()
run
in interface java.lang.Runnable
public boolean isResponseOkay(java.lang.Object code)
public void setDelayMillis(long delayMillis)
public long getDelayMillis()
public void terminate() throws java.lang.InterruptedException
java.lang.InterruptedException
public int getFailures()
public int getSuccesses()
public void setUrl(java.lang.String url)
public java.lang.String getUrl()
public java.lang.Object getProblem()
public int getAttempts()
public boolean getLastWasFailed()
public java.lang.Object getLastStatus()
public long getLastTime()
public java.lang.Object getLastFailure()
public void onFailure(java.lang.Object problem)
public boolean preAttempt()
public WebAppMonitor assertNoFailures(java.lang.String message)
public WebAppMonitor assertAttemptsMade(int minAttempts, java.lang.String message)
public WebAppMonitor waitForAtLeastOneAttempt()
public WebAppMonitor waitForAtLeastOneAttempt(Duration timeout)
public WebAppMonitor assertSuccessFraction(java.lang.String message, double fraction)
public WebAppMonitor resetCounts()