public class DefaultHealthStatusProvider extends Object implements com.bytex.snamp.supervision.health.HealthStatusProvider, AutoCloseable
HealthStatusProvider.| Modifier and Type | Class and Description |
|---|---|
protected static class |
DefaultHealthStatusProvider.HealthStatusBuilder
Represents health status builder.
|
| Constructor and Description |
|---|
DefaultHealthStatusProvider()
Initializes a new health status provider.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChecker(String attributeName,
AttributeChecker checker)
Adds checker for the specified attribute.
|
void |
close() |
com.bytex.snamp.supervision.health.ResourceGroupHealthStatus |
getStatus()
Determines whether the connected managed resource is alive.
|
AttributeChecker |
removeChecker(String attributeName)
Removes checker for the specified attribute.
|
void |
removeCheckers()
Removes all attribute checkers.
|
void |
reset()
Resets internal state of the object.
|
protected DefaultHealthStatusProvider.HealthStatusBuilder |
statusBuilder()
Creates a new builder for health status.
|
public DefaultHealthStatusProvider()
protected final DefaultHealthStatusProvider.HealthStatusBuilder statusBuilder()
public final void addChecker(String attributeName, @Nonnull AttributeChecker checker)
attributeName - Name of the attribute to check.checker - Attribute checker implementation. Cannot be null.public final AttributeChecker removeChecker(String attributeName)
attributeName - Name of the attribute.public final void removeCheckers()
public void reset()
reset in interface com.bytex.snamp.Stateful@Nonnull public final com.bytex.snamp.supervision.health.ResourceGroupHealthStatus getStatus()
getStatus in interface com.bytex.snamp.supervision.health.HealthStatusProvider@OverridingMethodsMustInvokeSuper public void close() throws Exception
close in interface AutoCloseableExceptionCopyright © 2015–2017 Bytex Solutions. All rights reserved.