org.springframework.boot.actuate.autoconfigure.endpoint.condition.ConditionalOnAvailableEndpoint Java Examples

The following examples show how to use org.springframework.boot.actuate.autoconfigure.endpoint.condition.ConditionalOnAvailableEndpoint. 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: ServiceRegistryAutoConfiguration.java    From spring-cloud-commons with Apache License 2.0 5 votes vote down vote up
@Bean
@ConditionalOnAvailableEndpoint
public ServiceRegistryEndpoint serviceRegistryEndpoint(
		ServiceRegistry serviceRegistry) {
	ServiceRegistryEndpoint endpoint = new ServiceRegistryEndpoint(
			serviceRegistry);
	endpoint.setRegistration(this.registration);
	return endpoint;
}
 
Example #2
Source File: RefreshEndpointAutoConfiguration.java    From spring-cloud-commons with Apache License 2.0 5 votes vote down vote up
@Bean
@ConditionalOnBean(RestartEndpoint.class)
@ConditionalOnMissingBean
@ConditionalOnAvailableEndpoint
public RestartEndpoint.ResumeEndpoint resumeEndpoint(
		RestartEndpoint restartEndpoint) {
	return restartEndpoint.getResumeEndpoint();
}
 
Example #3
Source File: RefreshEndpointAutoConfiguration.java    From spring-cloud-commons with Apache License 2.0 5 votes vote down vote up
@Bean
@ConditionalOnBean(RestartEndpoint.class)
@ConditionalOnMissingBean
@ConditionalOnAvailableEndpoint
public RestartEndpoint.PauseEndpoint pauseEndpoint(RestartEndpoint restartEndpoint) {
	return restartEndpoint.getPauseEndpoint();
}
 
Example #4
Source File: GatewayAutoConfiguration.java    From spring-cloud-gateway with Apache License 2.0 5 votes vote down vote up
@Bean
@ConditionalOnProperty(name = "spring.cloud.gateway.actuator.verbose.enabled",
		matchIfMissing = true)
@ConditionalOnAvailableEndpoint
public GatewayControllerEndpoint gatewayControllerEndpoint(
		List<GlobalFilter> globalFilters,
		List<GatewayFilterFactory> gatewayFilters,
		List<RoutePredicateFactory> routePredicates,
		RouteDefinitionWriter routeDefinitionWriter, RouteLocator routeLocator) {
	return new GatewayControllerEndpoint(globalFilters, gatewayFilters,
			routePredicates, routeDefinitionWriter, routeLocator);
}
 
Example #5
Source File: GatewayAutoConfiguration.java    From spring-cloud-gateway with Apache License 2.0 5 votes vote down vote up
@Bean
@Conditional(OnVerboseDisabledCondition.class)
@ConditionalOnAvailableEndpoint
public GatewayLegacyControllerEndpoint gatewayLegacyControllerEndpoint(
		RouteDefinitionLocator routeDefinitionLocator,
		List<GlobalFilter> globalFilters,
		List<GatewayFilterFactory> gatewayFilters,
		List<RoutePredicateFactory> routePredicates,
		RouteDefinitionWriter routeDefinitionWriter, RouteLocator routeLocator) {
	return new GatewayLegacyControllerEndpoint(routeDefinitionLocator,
			globalFilters, gatewayFilters, routePredicates, routeDefinitionWriter,
			routeLocator);
}
 
Example #6
Source File: JHipsterMetricsEndpointConfiguration.java    From jhipster with Apache License 2.0 5 votes vote down vote up
/**
 * <p>jHipsterMetricsEndpoint.</p>
 *
 * @param meterRegistry a {@link io.micrometer.core.instrument.MeterRegistry} object.
 * @return a {@link io.github.jhipster.config.metric.JHipsterMetricsEndpoint} object.
 */
@Bean
@ConditionalOnBean({MeterRegistry.class})
@ConditionalOnMissingBean
@ConditionalOnAvailableEndpoint
public JHipsterMetricsEndpoint jHipsterMetricsEndpoint(MeterRegistry meterRegistry) {
    return new JHipsterMetricsEndpoint(meterRegistry);
}
 
Example #7
Source File: RefreshEndpointAutoConfiguration.java    From spring-cloud-commons with Apache License 2.0 5 votes vote down vote up
@Bean
@ConditionalOnAvailableEndpoint
@ConditionalOnMissingBean
public RestartEndpoint restartEndpoint() {
	RestartEndpoint endpoint = new RestartEndpoint();
	if (this.exporter != null) {
		endpoint.setIntegrationMBeanExporter(this.exporter);
	}
	return endpoint;
}
 
Example #8
Source File: RefreshEndpointAutoConfiguration.java    From spring-cloud-commons with Apache License 2.0 5 votes vote down vote up
@Bean
@ConditionalOnBean(ContextRefresher.class)
@ConditionalOnAvailableEndpoint
@ConditionalOnMissingBean
public RefreshEndpoint refreshEndpoint(ContextRefresher contextRefresher) {
	return new RefreshEndpoint(contextRefresher);
}
 
Example #9
Source File: WritableEnvironmentEndpointAutoConfiguration.java    From spring-cloud-commons with Apache License 2.0 5 votes vote down vote up
@Bean
@ConditionalOnMissingBean
@ConditionalOnAvailableEndpoint
public WritableEnvironmentEndpoint writableEnvironmentEndpoint(
		Environment environment) {
	WritableEnvironmentEndpoint endpoint = new WritableEnvironmentEndpoint(
			environment);
	String[] keysToSanitize = this.properties.getKeysToSanitize();
	if (keysToSanitize != null) {
		endpoint.setKeysToSanitize(keysToSanitize);
	}
	return endpoint;
}
 
Example #10
Source File: RefreshEndpointAutoConfiguration.java    From spring-cloud-commons with Apache License 2.0 4 votes vote down vote up
@Bean
@ConditionalOnAvailableEndpoint
@ConditionalOnMissingBean
public RestartEndpoint restartEndpointWithoutIntegration() {
	return new RestartEndpoint();
}
 
Example #11
Source File: ChannelsEndpointAutoConfiguration.java    From spring-cloud-stream with Apache License 2.0 4 votes vote down vote up
@Bean
@ConditionalOnAvailableEndpoint
public ChannelsEndpoint channelsEndpoint(BindingServiceProperties properties) {
	return new ChannelsEndpoint(this.adapters, properties);
}
 
Example #12
Source File: BindingsEndpointAutoConfiguration.java    From spring-cloud-stream with Apache License 2.0 4 votes vote down vote up
@Bean
@ConditionalOnAvailableEndpoint
public BindingsEndpoint bindingsEndpoint(List<InputBindingLifecycle> inputBindings,
		List<OutputBindingLifecycle> outputBindings) {
	return new BindingsEndpoint(inputBindings, outputBindings);
}
 
Example #13
Source File: BusAutoConfiguration.java    From spring-cloud-bus with Apache License 2.0 4 votes vote down vote up
@Bean
@ConditionalOnAvailableEndpoint
public EnvironmentBusEndpoint environmentBusEndpoint(
		ApplicationContext context, BusProperties bus) {
	return new EnvironmentBusEndpoint(context, bus.getId());
}
 
Example #14
Source File: BusRefreshAutoConfiguration.java    From spring-cloud-bus with Apache License 2.0 4 votes vote down vote up
@Bean
@ConditionalOnAvailableEndpoint
public RefreshBusEndpoint refreshBusEndpoint(ApplicationContext context,
		BusProperties bus) {
	return new RefreshBusEndpoint(context, bus.getId());
}
 
Example #15
Source File: WritableEnvironmentEndpointAutoConfiguration.java    From spring-cloud-commons with Apache License 2.0 4 votes vote down vote up
@Bean
@ConditionalOnAvailableEndpoint
public WritableEnvironmentEndpointWebExtension writableEnvironmentEndpointWebExtension(
		WritableEnvironmentEndpoint endpoint, EnvironmentManager environment) {
	return new WritableEnvironmentEndpointWebExtension(endpoint, environment);
}
 
Example #16
Source File: RetryAutoConfiguration.java    From resilience4j with Apache License 2.0 4 votes vote down vote up
@Bean
@ConditionalOnAvailableEndpoint
public RetryEventsEndpoint retryEventsEndpoint(
    EventConsumerRegistry<RetryEvent> eventConsumerRegistry) {
    return new RetryEventsEndpoint(eventConsumerRegistry);
}
 
Example #17
Source File: CommonsClientAutoConfiguration.java    From spring-cloud-commons with Apache License 2.0 4 votes vote down vote up
@Bean
@ConditionalOnAvailableEndpoint
public FeaturesEndpoint featuresEndpoint() {
	return new FeaturesEndpoint(this.hasFeatures);
}
 
Example #18
Source File: ConsulAutoConfiguration.java    From spring-cloud-consul with Apache License 2.0 4 votes vote down vote up
@Bean
@ConditionalOnMissingBean
@ConditionalOnAvailableEndpoint
public ConsulEndpoint consulEndpoint(ConsulClient consulClient) {
	return new ConsulEndpoint(consulClient);
}
 
Example #19
Source File: RateLimiterAutoConfiguration.java    From resilience4j with Apache License 2.0 4 votes vote down vote up
@Bean
@ConditionalOnAvailableEndpoint
public RateLimiterEventsEndpoint rateLimiterEventsEndpoint(
    EventConsumerRegistry<RateLimiterEvent> eventConsumerRegistry) {
    return new RateLimiterEventsEndpoint(eventConsumerRegistry);
}
 
Example #20
Source File: RateLimiterAutoConfiguration.java    From resilience4j with Apache License 2.0 4 votes vote down vote up
@Bean
@ConditionalOnAvailableEndpoint
public RateLimiterEndpoint rateLimiterEndpoint(RateLimiterRegistry rateLimiterRegistry) {
    return new RateLimiterEndpoint(rateLimiterRegistry);
}
 
Example #21
Source File: ArthasEndPointAutoconfiguration.java    From arthas with Apache License 2.0 4 votes vote down vote up
@ConditionalOnMissingBean
@Bean
@ConditionalOnAvailableEndpoint
public ArthasEndpoint arthasEndPoint() {
    return new ArthasEndpoint();
}
 
Example #22
Source File: RetryAutoConfiguration.java    From resilience4j with Apache License 2.0 4 votes vote down vote up
@Bean
@ConditionalOnAvailableEndpoint
public RetryEndpoint retryEndpoint(RetryRegistry retryRegistry) {
    return new RetryEndpoint(retryRegistry);
}
 
Example #23
Source File: TimeLimiterAutoConfiguration.java    From resilience4j with Apache License 2.0 4 votes vote down vote up
@Bean
@ConditionalOnAvailableEndpoint
public TimeLimiterEventsEndpoint timeLimiterEventsEndpoint(EventConsumerRegistry<TimeLimiterEvent> eventConsumerRegistry) {
    return new TimeLimiterEventsEndpoint(eventConsumerRegistry);
}
 
Example #24
Source File: TimeLimiterAutoConfiguration.java    From resilience4j with Apache License 2.0 4 votes vote down vote up
@Bean
@ConditionalOnAvailableEndpoint
public TimeLimiterEndpoint timeLimiterEndpoint(TimeLimiterRegistry timeLimiterRegistry) {
    return new TimeLimiterEndpoint(timeLimiterRegistry);
}
 
Example #25
Source File: BulkheadAutoConfiguration.java    From resilience4j with Apache License 2.0 4 votes vote down vote up
@Bean
@ConditionalOnAvailableEndpoint
public BulkheadEventsEndpoint bulkheadEventsEndpoint(
    EventConsumerRegistry<BulkheadEvent> eventConsumerRegistry) {
    return new BulkheadEventsEndpoint(eventConsumerRegistry);
}
 
Example #26
Source File: BulkheadAutoConfiguration.java    From resilience4j with Apache License 2.0 4 votes vote down vote up
@Bean
@ConditionalOnAvailableEndpoint
public BulkheadEndpoint bulkheadEndpoint(BulkheadRegistry bulkheadRegistry,
    ThreadPoolBulkheadRegistry threadPoolBulkheadRegistry) {
    return new BulkheadEndpoint(bulkheadRegistry, threadPoolBulkheadRegistry);
}
 
Example #27
Source File: CircuitBreakerAutoConfiguration.java    From resilience4j with Apache License 2.0 4 votes vote down vote up
@Bean
@ConditionalOnAvailableEndpoint
public CircuitBreakerEventsEndpoint circuitBreakerEventsEndpoint(
    EventConsumerRegistry<CircuitBreakerEvent> eventConsumerRegistry) {
    return new CircuitBreakerEventsEndpoint(eventConsumerRegistry);
}
 
Example #28
Source File: CircuitBreakerAutoConfiguration.java    From resilience4j with Apache License 2.0 4 votes vote down vote up
@Bean
@ConditionalOnAvailableEndpoint
public CircuitBreakerEndpoint circuitBreakerEndpoint(
    CircuitBreakerRegistry circuitBreakerRegistry) {
    return new CircuitBreakerEndpoint(circuitBreakerRegistry);
}
 
Example #29
Source File: KafkaStreamsTopologyEndpointAutoConfiguration.java    From spring-cloud-stream-binder-kafka with Apache License 2.0 4 votes vote down vote up
@Bean
@ConditionalOnAvailableEndpoint
public KafkaStreamsTopologyEndpoint topologyEndpoint(KafkaStreamsRegistry kafkaStreamsRegistry) {
	return new KafkaStreamsTopologyEndpoint(kafkaStreamsRegistry);
}
 
Example #30
Source File: ActuatorBeans.java    From zhcet-web with Apache License 2.0 4 votes vote down vote up
@Bean
@ConditionalOnMissingBean
@ConditionalOnAvailableEndpoint
public ServiceStatusEndpoint serviceStatusEndpoint(EmailProperties emailProperties, FirebaseService firebaseService) {
    return new ServiceStatusEndpoint(emailProperties, firebaseService);
}