File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change
1
+ package org .springframework .amqp .rabbit .config ;
2
+
3
+ import java .util .List ;
4
+ import org .springframework .amqp .rabbit .listener .MessageListenerContainer ;
5
+ import org .springframework .util .Assert ;
6
+
7
+ /**
8
+ * Implementation of {@link ContainerCustomizer<C>} providing the configuration of multiple customizers at the same time.
9
+ */
10
+ public class CompositeContainerCustomizer <C extends MessageListenerContainer > implements ContainerCustomizer <C > {
11
+
12
+ private final List <ContainerCustomizer <C >> customizers ;
13
+
14
+ public CompositeContainerCustomizer (List <ContainerCustomizer <C >> customizers ) {
15
+ Assert .notNull (customizers , "At least one customizer must be present" );
16
+ this .customizers = customizers ;
17
+ }
18
+
19
+ @ Override
20
+ public void configure (C container ) {
21
+ customizers .forEach (c -> c .configure (container ));
22
+ }
23
+ }
You can’t perform that action at this time.
0 commit comments