public class HealthChecker extends NotificationBroadcasterSupport implements HealthCheckerMBean
HealthCheckerMBean, provides the
actual definition of the health Checking. Needs to be used by the MBean
Manager to register/deRegister it to Application JMX Environment.MBeanRegistration, so the MBeans
will be registered in the standard MBean server deployed with the JRE.HealthCheckerMBeanNotification
with the current status of the application.| Modifier and Type | Method and Description |
|---|---|
static HealthChecker |
getInstance()
Gets the single instance of HealthChecker.
|
boolean |
isAlive()
Checks if this service is alive, and functioning well.
|
void |
setAlive(boolean isAlive)
Sets the alive status based on the status of the application that it is
running in.
|
addNotificationListener, getNotificationInfo, removeNotificationListener, removeNotificationListener, sendNotificationpublic static HealthChecker getInstance()
public boolean isAlive()
HealthCheckerMBeanisAlive in interface HealthCheckerMBeanpublic void setAlive(boolean isAlive)
HealthCheckerMBeanNotification with the
current status respectively.
Needs to be analyzed the status of the application based on its functionality and set this value.
Eg: Suppose it is running in mail application, which sends a mail for
every free configured interval then this setAlive(boolean)
should be set to true if the mail application is sending the mails
correctly, else setAlive(boolean) should be set to false, as
mail application has some issue in sending the mails.
isAlive - the isAlive to setCopyright © 2016 utils4j. All Rights Reserved.