de.codecentric.boot.admin.server.notify.CompositeNotifier Java Examples

The following examples show how to use de.codecentric.boot.admin.server.notify.CompositeNotifier. 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: AdminServerNotifierAutoConfigurationTest.java    From Moss with Apache License 2.0 5 votes vote down vote up
@Test
public void test_multipleNotifiers() {
    contextRunner.withUserConfiguration(TestMultipleNotifierConfig.class).run(context -> {
        assertThat(context.getBean(Notifier.class)).isInstanceOf(CompositeNotifier.class);
        assertThat(context).getBeans(Notifier.class).hasSize(3);
    });
}
 
Example #2
Source File: AdminServerNotifierAutoConfigurationTest.java    From spring-boot-admin with Apache License 2.0 5 votes vote down vote up
@Test
public void test_multipleNotifiers() {
	this.contextRunner.withUserConfiguration(TestMultipleNotifierConfig.class).run((context) -> {
		assertThat(context.getBean(Notifier.class)).isInstanceOf(CompositeNotifier.class);
		assertThat(context).getBeans(Notifier.class).hasSize(3);
	});
}
 
Example #3
Source File: AdminServerNotifierAutoConfiguration.java    From Moss with Apache License 2.0 4 votes vote down vote up
@Bean
@Primary
@Conditional(NoSingleNotifierCandidateCondition.class)
public CompositeNotifier compositeNotifier(List<Notifier> notifiers) {
    return new CompositeNotifier(notifiers);
}
 
Example #4
Source File: NotifierConfiguration.java    From spring-boot-start-current with Apache License 2.0 4 votes vote down vote up
@Bean
public FilteringNotifier filteringNotifier () {
	CompositeNotifier delegate = new CompositeNotifier( otherNotifiers.getIfAvailable( Collections::emptyList ) );
	return new FilteringNotifier( delegate , repository );
}
 
Example #5
Source File: AdminServerNotifierAutoConfiguration.java    From spring-boot-admin with Apache License 2.0 4 votes vote down vote up
@Bean
@Primary
@Conditional(NoSingleNotifierCandidateCondition.class)
public CompositeNotifier compositeNotifier(List<Notifier> notifiers) {
	return new CompositeNotifier(notifiers);
}
 
Example #6
Source File: NotifierConfig.java    From spring-boot-admin with Apache License 2.0 4 votes vote down vote up
@Bean
public FilteringNotifier filteringNotifier() { // <1>
	CompositeNotifier delegate = new CompositeNotifier(this.otherNotifiers.getIfAvailable(Collections::emptyList));
	return new FilteringNotifier(delegate, this.repository);
}
 
Example #7
Source File: NotifierConfiguration.java    From tutorials with MIT License 4 votes vote down vote up
@Bean
public FilteringNotifier filteringNotifier() {
    CompositeNotifier delegate = new CompositeNotifier(this.otherNotifiers.getIfAvailable(Collections::emptyList));
    return new FilteringNotifier(delegate, this.repository);
}