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 11/*
2- * Copyright 2014-2020 the original author or authors.
2+ * Copyright 2014-2021 the original author or authors.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
1717package org .springframework .amqp .rabbit .listener ;
1818
1919import org .springframework .amqp .core .MessageListener ;
20+ import org .springframework .beans .factory .InitializingBean ;
2021import org .springframework .context .SmartLifecycle ;
22+ import org .springframework .lang .Nullable ;
2123
2224/**
2325 * Internal abstraction used by the framework representing a message
2729 * @author Gary Russell
2830 * @since 1.4
2931 */
30- public interface MessageListenerContainer extends SmartLifecycle {
32+ public interface MessageListenerContainer extends SmartLifecycle , InitializingBean {
3133
3234 /**
3335 * Setup the message listener to use. Throws an {@link IllegalArgumentException}
@@ -57,4 +59,23 @@ default boolean isConsumerBatchEnabled() {
5759 return false ;
5860 }
5961
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+
6081}
You can’t perform that action at this time.
0 commit comments