public class Result extends Object implements Iterable<ResultLog.Entry>
HealthCheck
Modifier and Type | Class and Description |
---|---|
static class |
Result.Status |
Constructor and Description |
---|
Result(Result.Status s,
String explanation)
Build a single-value Result
|
Result(Result.Status s,
String explanation,
Exception e)
Build a single-value Result with exception
|
Result(ResultLog log)
Build a a Result based on a ResultLog, which can provide
more details than a single-value Result.
|
Modifier and Type | Method and Description |
---|---|
Result.Status |
getStatus()
Return our Status
|
boolean |
isOk()
True if our status is OK - provides a convenient way of
checking that.
|
Iterator<ResultLog.Entry> |
iterator()
Return an Iterator on the entries of our ResultLog
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
protected final ResultLog resultLog
public Result(Result.Status s, String explanation)
s
- if lower than OK, our status is set to OKpublic Result(Result.Status s, String explanation, Exception e)
s
- if lower than OK, our status is set to OKpublic Result(ResultLog log)
public boolean isOk()
public Result.Status getStatus()
public Iterator<ResultLog.Entry> iterator()
iterator
in interface Iterable<ResultLog.Entry>
Copyright © 2017 The Apache Software Foundation. All rights reserved.