Example usage for org.springframework.jms.listener MessageListenerContainer isAutoStartup

List of usage examples for org.springframework.jms.listener MessageListenerContainer isAutoStartup

Introduction

In this page you can find the example usage for org.springframework.jms.listener MessageListenerContainer isAutoStartup.

Prototype

default boolean isAutoStartup() 

Source Link

Document

Returns true if this Lifecycle component should get started automatically by the container at the time that the containing ApplicationContext gets refreshed.

Usage

From source file:org.springframework.jms.config.JmsListenerEndpointRegistry.java

/**
 * Start the specified {@link MessageListenerContainer} if it should be started
 * on startup or when start is called explicitly after startup.
 * @see MessageListenerContainer#isAutoStartup()
 *///from ww w .j  a  v  a  2s  .  com
private void startIfNecessary(MessageListenerContainer listenerContainer) {
    if (this.contextRefreshed || listenerContainer.isAutoStartup()) {
        listenerContainer.start();
    }
}