Brooklyn

brooklyn.test
[Java] Class WebAppMonitor

java.lang.Object
  brooklyn.test.WebAppMonitor
All Implemented Interfaces:
java.lang.Runnable

public class WebAppMonitor

Repeatedly polls a given URL, to check if it is always available.

Authors:
Alex, Aled


Constructor Summary
WebAppMonitor(java.lang.String url)

WebAppMonitor()

 
Method Summary
WebAppMonitor assertAttemptsMade(int minAttempts, java.lang.String message)

WebAppMonitor assertNoFailures(java.lang.String message)

WebAppMonitor assertSuccessFraction(java.lang.String message, double percentage)

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(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)

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Constructor Detail

WebAppMonitor

public WebAppMonitor(java.lang.String url)


WebAppMonitor

public WebAppMonitor()


 
Method Detail

assertAttemptsMade

public WebAppMonitor assertAttemptsMade(int minAttempts, java.lang.String message)


assertNoFailures

public WebAppMonitor assertNoFailures(java.lang.String message)


assertSuccessFraction

public WebAppMonitor assertSuccessFraction(java.lang.String message, double percentage)


delayMillis

public WebAppMonitor delayMillis(long val)


expectedResponseCode

public WebAppMonitor expectedResponseCode(int val)


getAttempts

public int getAttempts()


getDelayMillis

public long getDelayMillis()


getFailures

public int getFailures()


getLastFailure

public java.lang.Object getLastFailure()
result code (int) or exception


getLastStatus

public java.lang.Object getLastStatus()


getLastTime

public long getLastTime()


getLastWasFailed

public boolean getLastWasFailed()


getProblem

public java.lang.Object getProblem()


getSuccesses

public int getSuccesses()


getUrl

public java.lang.String getUrl()


isResponseOkay

public boolean isResponseOkay(java.lang.Object code)


logFailures

public WebAppMonitor logFailures(Logger log)


onFailure

public void onFailure(java.lang.Object problem)


preAttempt

public boolean preAttempt()
return false to skip a run


resetCounts

public WebAppMonitor resetCounts()


run

public void run()


setDelayMillis

public void setDelayMillis(long delayMillis)


setUrl

public void setUrl(java.lang.String url)


terminate

public void terminate()


url

public WebAppMonitor url(java.lang.String val)


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.