List of usage examples for org.springframework.integration.channel AbstractMessageChannel getChannelInterceptors
default List<ChannelInterceptor> getChannelInterceptors()
From source file:org.springframework.integration.configuration.EnableIntegrationTests.java
@Test public void testParentChildAnnotationConfiguration() { AnnotationConfigApplicationContext child = new AnnotationConfigApplicationContext(); child.register(ChildConfiguration.class); child.setParent(this.context); child.refresh();//from w w w . j a v a 2s. c o m AbstractMessageChannel foo = child.getBean("foo", AbstractMessageChannel.class); ChannelInterceptor baz = child.getBean("baz", ChannelInterceptor.class); assertTrue(foo.getChannelInterceptors().contains(baz)); assertFalse(this.output.getChannelInterceptors().contains(baz)); child.close(); }
From source file:org.springframework.integration.configuration.EnableIntegrationTests.java
@Test public void testParentChildAnnotationConfigurationFromAnotherPackage() { AnnotationConfigApplicationContext child = new AnnotationConfigApplicationContext(); child.register(org.springframework.integration.configuration2.ChildConfiguration.class); child.setParent(this.context); child.refresh();//from ww w . j a va2 s . co m AbstractMessageChannel foo = child.getBean("foo", AbstractMessageChannel.class); ChannelInterceptor baz = child.getBean("baz", ChannelInterceptor.class); assertTrue(foo.getChannelInterceptors().contains(baz)); assertFalse(this.output.getChannelInterceptors().contains(baz)); child.close(); }