public static class HealthCheckResult.FailedHealthCheckResult extends HealthCheckResult
HealthCheckResult.FailedHealthCheckResult, HealthCheckResult.PassedHealthCheckResult
Constructor and Description |
---|
FailedHealthCheckResult(HealthCheck healthCheck,
com.atlassian.johnson.event.Event event,
URL kbUrl,
String cause,
String logMessage) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
<T> T |
fold(java.util.function.Function<? super HealthCheckResult.FailedHealthCheckResult,T> onFail,
java.util.function.Function<? super HealthCheckResult.PassedHealthCheckResult,T> onPassed)
Consume a HealthCheckResult
|
String |
getCause()
Returns a human-readable description of this result, with a value that is allowed to be sent via analytics.
|
com.atlassian.johnson.event.Event |
getEvent()
Returns the Johnson event to be raised as a result of this result.
|
Optional<URL> |
getKbUrl()
Returns the URL of the Atlassian Knowledgebase article that helps the user respond to this result.
|
String |
getLogMessage()
Returns the log equivalent of the message shown in the UI for this result
|
int |
hashCode() |
void |
ifFailed(java.util.function.Consumer<HealthCheckResult.FailedHealthCheckResult> onFail)
Perform an action if this is a failed health check result.
|
fail, getHealthCheck, pass, toFailures, toString
public FailedHealthCheckResult(HealthCheck healthCheck, com.atlassian.johnson.event.Event event, @Nullable URL kbUrl, String cause, String logMessage)
@Nonnull public com.atlassian.johnson.event.Event getEvent()
@Nonnull public Optional<URL> getKbUrl()
@Nonnull public String getCause()
@Nonnull public String getLogMessage()
public void ifFailed(java.util.function.Consumer<HealthCheckResult.FailedHealthCheckResult> onFail)
HealthCheckResult
ifFailed
in class HealthCheckResult
onFail
- a Consumerpublic <T> T fold(java.util.function.Function<? super HealthCheckResult.FailedHealthCheckResult,T> onFail, java.util.function.Function<? super HealthCheckResult.PassedHealthCheckResult,T> onPassed)
HealthCheckResult
fold
in class HealthCheckResult
T
- the type of the value to returnonFail
- the function to apply to a failed resultonPassed
- the function to apply to a passed resultCopyright © 2002-2017 Atlassian. All Rights Reserved.