Package org.apache.camel.main
Class HealthConfigurationProperties
- java.lang.Object
-
- org.apache.camel.main.HealthConfigurationProperties
-
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.camel.spi.BootstrapCloseable
@Configurer(bootstrap=true) public class HealthConfigurationProperties extends Object implements org.apache.camel.spi.BootstrapCloseable
Global configuration for Health Check
-
-
Constructor Summary
Constructors Constructor Description HealthConfigurationProperties(MainConfigurationProperties parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()MainConfigurationPropertiesend()BooleangetComponentsEnabled()BooleangetConsumersEnabled()BooleangetEnabled()StringgetExcludePattern()StringgetExposureLevel()StringgetInitialState()BooleangetRegistryEnabled()BooleangetRoutesEnabled()voidsetComponentsEnabled(Boolean componentsEnabled)Whether components health check is enabledvoidsetConsumersEnabled(Boolean consumersEnabled)Whether consumers health check is enabledvoidsetEnabled(Boolean enabled)Whether health check is enabled globallyvoidsetExcludePattern(String excludePattern)Pattern to exclude health checks from being invoked by Camel when checking healths.voidsetExposureLevel(String exposureLevel)Sets the level of details to exposure as result of invoking health checks.voidsetInitialState(String initialState)The initial state of health-checks (readiness).voidsetRegistryEnabled(Boolean registryEnabled)Whether registry health check is enabledvoidsetRoutesEnabled(Boolean routesEnabled)Whether routes health check is enabledHealthConfigurationPropertieswithEnabled(boolean enabled)Whether health check is enabled globallyHealthConfigurationPropertieswithExcludePattern(String excludePattern)Pattern to exclude health checks from being invoked by Camel when checking healths.HealthConfigurationPropertieswithExposureLevel(String exposureLevel)Sets the level of details to exposure as result of invoking health checks.HealthConfigurationPropertieswithInitialState(String initialState)The initial state of health-checks (readiness).HealthConfigurationPropertieswithRegistryEnabled(boolean registryEnabled)Whether registry health check is enabledHealthConfigurationPropertieswithRoutesEnabled(boolean routesEnabled)Whether routes health check is enabled
-
-
-
Constructor Detail
-
HealthConfigurationProperties
public HealthConfigurationProperties(MainConfigurationProperties parent)
-
-
Method Detail
-
end
public MainConfigurationProperties end()
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
getEnabled
public Boolean getEnabled()
-
setEnabled
public void setEnabled(Boolean enabled)
Whether health check is enabled globally
-
getRoutesEnabled
public Boolean getRoutesEnabled()
-
setRoutesEnabled
public void setRoutesEnabled(Boolean routesEnabled)
Whether routes health check is enabled
-
getConsumersEnabled
public Boolean getConsumersEnabled()
-
setConsumersEnabled
public void setConsumersEnabled(Boolean consumersEnabled)
Whether consumers health check is enabled
-
getComponentsEnabled
public Boolean getComponentsEnabled()
-
setComponentsEnabled
public void setComponentsEnabled(Boolean componentsEnabled)
Whether components health check is enabled
-
getRegistryEnabled
public Boolean getRegistryEnabled()
-
setRegistryEnabled
public void setRegistryEnabled(Boolean registryEnabled)
Whether registry health check is enabled
-
getExcludePattern
public String getExcludePattern()
-
setExcludePattern
public void setExcludePattern(String excludePattern)
Pattern to exclude health checks from being invoked by Camel when checking healths. Multiple patterns can be separated by comma.
-
getExposureLevel
public String getExposureLevel()
-
setExposureLevel
public void setExposureLevel(String exposureLevel)
Sets the level of details to exposure as result of invoking health checks. There are the following levels: full, default, oneline The full level will include all details and status from all the invoked health checks. The default level will report UP if everything is okay, and only include detailed information for health checks that was DOWN. The oneline level will only report either UP or DOWN.
-
getInitialState
public String getInitialState()
-
setInitialState
public void setInitialState(String initialState)
The initial state of health-checks (readiness). There are the following states: UP, DOWN, UNKNOWN. By default, the state is DOWN, is regarded as being pessimistic/careful. This means that the overall health checks may report as DOWN during startup and then only if everything is up and running flip to being UP. Setting the initial state to UP, is regarded as being optimistic. This means that the overall health checks may report as UP during startup and then if a consumer or other service is in fact un-healthy, then the health-checks can flip being DOWN. Setting the state to UNKNOWN means that some health-check would be reported in unknown state, especially during early bootstrap where a consumer may not be fully initialized or validated a connection to a remote system. This option allows to pre-configure the state for different modes.
-
withEnabled
public HealthConfigurationProperties withEnabled(boolean enabled)
Whether health check is enabled globally
-
withRoutesEnabled
public HealthConfigurationProperties withRoutesEnabled(boolean routesEnabled)
Whether routes health check is enabled
-
withRegistryEnabled
public HealthConfigurationProperties withRegistryEnabled(boolean registryEnabled)
Whether registry health check is enabled
-
withExcludePattern
public HealthConfigurationProperties withExcludePattern(String excludePattern)
Pattern to exclude health checks from being invoked by Camel when checking healths. Multiple patterns can be separated by comma.
-
withExposureLevel
public HealthConfigurationProperties withExposureLevel(String exposureLevel)
Sets the level of details to exposure as result of invoking health checks. There are the following levels: full, default, oneline The full level will include all details and status from all the invoked health checks. The default level will report UP if everything is okay, and only include detailed information for health checks that was DOWN. The oneline level will only report either UP or DOWN.
-
withInitialState
public HealthConfigurationProperties withInitialState(String initialState)
The initial state of health-checks (readiness). There are the following states: UP, DOWN, UNKNOWN. By default, the state is DOWN, is regarded as being pessimistic/careful. This means that the overall health checks may report as DOWN during startup and then only if everything is up and running flip to being UP. Setting the initial state to UP, is regarded as being optimistic. This means that the overall health checks may report as UP during startup and then if a consumer or other service is in fact un-healthy, then the health-checks can flip being DOWN. Setting the state to UNKNOWN means that some health-check would be reported in unknown state, especially during early bootstrap where a consumer may not be fully initialized or validated a connection to a remote system. This option allows to pre-configure the state for different modes.
-
-