Package org.opennms.core.health.api
Class Health
- java.lang.Object
-
- org.opennms.core.health.api.Health
-
public class Health extends java.lang.Object
Represents the "Health", by holding a list ofResponse
s. It allows accessing the responses and also provides some helper methods (e.g. to get the worst response).- Author:
- mvrueden
-
-
Constructor Summary
Constructors Constructor Description Health()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Response response)
java.lang.String
getErrorMessage()
java.util.List<Response>
getResponses()
java.util.Optional<Response>
getWorst()
boolean
isSuccess()
void
setError(java.lang.String errorMessage)
Health
withResponse(Response response)
-
-
-
Method Detail
-
isSuccess
public boolean isSuccess()
-
getWorst
public java.util.Optional<Response> getWorst()
-
add
public void add(Response response)
-
setError
public void setError(java.lang.String errorMessage)
-
getErrorMessage
public java.lang.String getErrorMessage()
-
getResponses
public java.util.List<Response> getResponses()
-
-