001/*
002 * Copyright 2002-2014 the original author or authors.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *      https://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016
017package org.springframework.jms.annotation;
018
019import org.springframework.jms.config.JmsListenerEndpointRegistrar;
020
021/**
022 * Optional interface to be implemented by a Spring managed bean willing
023 * to customize how JMS listener endpoints are configured. Typically
024 * used to define the default {@link org.springframework.jms.config.JmsListenerContainerFactory
025 * JmsListenerContainerFactory} to use or for registering JMS endpoints
026 * in a <em>programmatic</em> fashion as opposed to the <em>declarative</em>
027 * approach of using the @{@link JmsListener} annotation.
028 *
029 * <p>See @{@link EnableJms} for detailed usage examples.
030 *
031 * @author Stephane Nicoll
032 * @since 4.1
033 * @see EnableJms
034 * @see JmsListenerEndpointRegistrar
035 */
036public interface JmsListenerConfigurer {
037
038        /**
039         * Callback allowing a {@link org.springframework.jms.config.JmsListenerEndpointRegistry
040         * JmsListenerEndpointRegistry} and specific {@link org.springframework.jms.config.JmsListenerEndpoint
041         * JmsListenerEndpoint} instances to be registered against the given
042         * {@link JmsListenerEndpointRegistrar}. The default
043         * {@link org.springframework.jms.config.JmsListenerContainerFactory JmsListenerContainerFactory}
044         * can also be customized.
045         * @param registrar the registrar to be configured
046         */
047        void configureJmsListeners(JmsListenerEndpointRegistrar registrar);
048
049}