public final class ProbeStatus extends Object implements Serializable
| Constructor and Description |
|---|
ProbeStatus() |
ProbeStatus(long timestamp,
String message) |
ProbeStatus(long timestamp,
String message,
Throwable thrown) |
| Modifier and Type | Method and Description |
|---|---|
void |
fail(Probe probe,
Throwable thrown)
A probe has failed either because the test returned false, or an exception
was thrown.
|
void |
finish(Probe probe,
boolean succeeded,
String text,
Throwable thrown) |
String |
getMessage() |
Probe |
getOriginator()
Get the probe that generated this result.
|
ProbePhase |
getProbePhase() |
boolean |
getRealOutcome() |
Throwable |
getThrown() |
long |
getTimestamp() |
String |
getTimestampText() |
boolean |
inPhase(ProbePhase phase) |
boolean |
isSuccess() |
void |
markAsSuccessful()
Flip the success bit on while the real outcome bit is kept false
|
void |
setMessage(String message) |
void |
setProbePhase(ProbePhase probePhase) |
void |
setSuccess(boolean success)
Set both the success and the real outcome bits to the same value
|
void |
setThrown(Throwable thrown) |
void |
setTimestamp(long timestamp) |
void |
succeed(Probe probe)
The probe has succeeded -capture the current timestamp, set
success to true, and record any other data needed.
|
String |
toString() |
public ProbeStatus()
public ProbeStatus(long timestamp,
String message)
public long getTimestamp()
public void setTimestamp(long timestamp)
public boolean isSuccess()
public void setSuccess(boolean success)
success - the new valuepublic String getTimestampText()
public boolean getRealOutcome()
public String getMessage()
public void setMessage(String message)
public Throwable getThrown()
public void setThrown(Throwable thrown)
public ProbePhase getProbePhase()
public void setProbePhase(ProbePhase probePhase)
public Probe getOriginator()
public void succeed(Probe probe)
probe - probepublic void fail(Probe probe, Throwable thrown)
success field is set to false, any exception
thrown is recorded.probe - probe that failedthrown - an exception that was thrown.public boolean inPhase(ProbePhase phase)
public void markAsSuccessful()
Copyright © 2014–2015 The Apache Software Foundation. All rights reserved.