@Service(name="healthcheck-service") @RunLevel(value=10) public class HealthCheckService extends Object implements EventListener, ConfigListener, MonitoringDataSource
EventListener.Event<T>| Constructor and Description |
|---|
HealthCheckService() |
| Modifier and Type | Method and Description |
|---|---|
UnprocessedChangeEvents |
changed(PropertyChangeEvent[] events)
Notification that @Configured objects that were injected have changed
|
void |
collect(MonitoringDataCollector collector)
Collects all the data points of this at the current moment.
|
void |
event(EventListener.Event event)
Process a Glassfish/Payara event
|
boolean |
isEnabled() |
boolean |
isSecurityEnabled() |
void |
performHealthChecks(javax.servlet.http.HttpServletResponse response)
Execute the call method of every registered HealthCheck and generate the response.
|
void |
postConstruct() |
void |
registerClassLoader(String appName,
ClassLoader classloader)
Register a ClassLoader for an application.
|
void |
registerHealthCheck(String appName,
org.eclipse.microprofile.health.HealthCheck healthCheck)
Register a HealthCheck to the Set of HealthChecks to execute when performHealthChecks is called.
|
public void collect(MonitoringDataCollector collector)
MonitoringDataSourcecollect in interface MonitoringDataSourcecollector - the MonitoringDataCollector instance to use to collect the data points of this source@PostConstruct public void postConstruct()
public void event(EventListener.Event event)
EventListenerevent in interface EventListenerpublic boolean isEnabled()
public boolean isSecurityEnabled()
public void registerHealthCheck(String appName, org.eclipse.microprofile.health.HealthCheck healthCheck)
appName - The name of the application being deployedhealthCheck - The HealthCheck to registerpublic void registerClassLoader(String appName, ClassLoader classloader)
appName - The name of the application being deployedclassloader - public void performHealthChecks(javax.servlet.http.HttpServletResponse response)
throws IOException
response - The response to returnIOException - If there's an issue writing the responsepublic UnprocessedChangeEvents changed(PropertyChangeEvent[] events)
ConfigListenerchanged in interface ConfigListenerevents - list of changesCopyright © 2019. All rights reserved.