org.springframework.boot.actuate.health.AbstractHealthIndicator Java Examples

The following examples show how to use org.springframework.boot.actuate.health.AbstractHealthIndicator. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: HealthChecks.java    From data-highway with Apache License 2.0 5 votes vote down vote up
@Bean
public AbstractHealthIndicator dummyHealthCheck(Receiver receiver) {
  return new AbstractHealthIndicator() {
    @Override
    protected void doHealthCheck(Health.Builder builder) throws Exception {
      checkState(true, "True is no longer true");
      builder.up().withDetail("truth", "True is true");
    }
  };
}
 
Example #2
Source File: EurekaHealthCheckHandlerTests.java    From spring-cloud-netflix with Apache License 2.0 5 votes vote down vote up
@Bean
public HealthIndicator healthIndicator() {
	return new AbstractHealthIndicator() {
		@Override
		protected void doHealthCheck(Health.Builder builder) throws Exception {
			builder.up();
		}
	};
}
 
Example #3
Source File: EurekaHealthCheckHandlerTests.java    From spring-cloud-netflix with Apache License 2.0 5 votes vote down vote up
@Bean
public HealthIndicator healthIndicator() {
	return new AbstractHealthIndicator() {
		@Override
		protected void doHealthCheck(Health.Builder builder) throws Exception {
			builder.down();
		}
	};
}
 
Example #4
Source File: EurekaHealthCheckHandlerTests.java    From spring-cloud-netflix with Apache License 2.0 5 votes vote down vote up
@Bean
public HealthIndicator healthIndicator() {
	return new AbstractHealthIndicator() {
		@Override
		protected void doHealthCheck(Health.Builder builder) throws Exception {
			builder.status("fatal");
		}
	};
}