Package org.apache.felix.hc.api
Class Result
java.lang.Object
org.apache.felix.hc.api.Result
- All Implemented Interfaces:
Iterable<ResultLog.Entry>
The result of executing a
HealthCheck-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionResult(Result.Status s, String explanation) Build a single-value ResultResult(Result.Status s, String explanation, Exception e) Build a single-value Result with exceptionBuild a a Result based on a ResultLog, which can provide more details than a single-value Result -
Method Summary
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
Result
Build a single-value Result- Parameters:
s- if lower than OK, our status is set to OKexplanation- message for the status
-
Result
Build a single-value Result with exception- Parameters:
s- if lower than OK, our status is set to OKexplanation- message for the statuse- the exception for this Result
-
Result
Build a a Result based on a ResultLog, which can provide more details than a single-value Result- Parameters:
log- the log to base the result on
-
-
Method Details
-
isOk
public boolean isOk()True if our status is OK - provides a convenient way of checking that- Returns:
- true if the status is ok.
-
getStatus
- Returns:
- the status of this result
-
iterator
- Specified by:
iteratorin interfaceIterable<ResultLog.Entry>- Returns:
- an Iterator on the entries of our ResultLog
-
toString
-