Skip to content

Commit

Permalink
GH-1352: Spring Integration 5.5 Compatibility
Browse files Browse the repository at this point in the history
Refactoring to allow Spring Integration 5.5 to be used with both
2.3.x and 2.4.x.
  • Loading branch information
garyrussell committed Jun 23, 2021
1 parent ab840e2 commit 7b9be95
Showing 1 changed file with 23 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014-2020 the original author or authors.
* Copyright 2014-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,7 +17,9 @@
package org.springframework.amqp.rabbit.listener;

import org.springframework.amqp.core.MessageListener;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.SmartLifecycle;
import org.springframework.lang.Nullable;

/**
* Internal abstraction used by the framework representing a message
Expand All @@ -27,7 +29,7 @@
* @author Gary Russell
* @since 1.4
*/
public interface MessageListenerContainer extends SmartLifecycle {
public interface MessageListenerContainer extends SmartLifecycle, InitializingBean {

/**
* Setup the message listener to use. Throws an {@link IllegalArgumentException}
Expand Down Expand Up @@ -57,4 +59,23 @@ default boolean isConsumerBatchEnabled() {
return false;
}

/**
* Set auto startup.
* @param autoStart true to auto start.
* @since 2.3.10
*/
void setAutoStartup(boolean autoStart);

/**
* Get the message listener.
* @return The message listener object.
* @since 2.3.10
*/
@Nullable
Object getMessageListener();

@Override
default void afterPropertiesSet() {
}

}

0 comments on commit 7b9be95

Please sign in to comment.