File tree Expand file tree Collapse file tree 1 file changed +23
-2
lines changed
spring-rabbit/src/main/java/org/springframework/amqp/rabbit/listener Expand file tree Collapse file tree 1 file changed +23
-2
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2014-2020 the original author or authors.
2
+ * Copyright 2014-2021 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
17
17
package org .springframework .amqp .rabbit .listener ;
18
18
19
19
import org .springframework .amqp .core .MessageListener ;
20
+ import org .springframework .beans .factory .InitializingBean ;
20
21
import org .springframework .context .SmartLifecycle ;
22
+ import org .springframework .lang .Nullable ;
21
23
22
24
/**
23
25
* Internal abstraction used by the framework representing a message
27
29
* @author Gary Russell
28
30
* @since 1.4
29
31
*/
30
- public interface MessageListenerContainer extends SmartLifecycle {
32
+ public interface MessageListenerContainer extends SmartLifecycle , InitializingBean {
31
33
32
34
/**
33
35
* Setup the message listener to use. Throws an {@link IllegalArgumentException}
@@ -57,4 +59,23 @@ default boolean isConsumerBatchEnabled() {
57
59
return false ;
58
60
}
59
61
62
+ /**
63
+ * Set auto startup.
64
+ * @param autoStart true to auto start.
65
+ * @since 2.3.10
66
+ */
67
+ void setAutoStartup (boolean autoStart );
68
+
69
+ /**
70
+ * Get the message listener.
71
+ * @return The message listener object.
72
+ * @since 2.3.10
73
+ */
74
+ @ Nullable
75
+ Object getMessageListener ();
76
+
77
+ @ Override
78
+ default void afterPropertiesSet () {
79
+ }
80
+
60
81
}
You can’t perform that action at this time.
0 commit comments