diff --git a/spring-amqp-core/src/main/java/org/springframework/amqp/config/AbstractAmqpConfiguration.java b/spring-amqp-core/src/main/java/org/springframework/amqp/config/AbstractAmqpConfiguration.java deleted file mode 100644 index 3b54cf20..00000000 --- a/spring-amqp-core/src/main/java/org/springframework/amqp/config/AbstractAmqpConfiguration.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2002-2010 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.amqp.config; - -import org.springframework.amqp.core.AmqpAdmin; -import org.springframework.amqp.core.DirectExchange; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -/** - * Abstract base class for code based configuration of Spring managed AMQP infrastructure, - * i.e. Exchanges, Queues, and Bindings. - *

Subclasses are required to provide an implementation of AmqpAdmin. - *

The BindingBuilder class can be used to provide a fluent API to declare bindings. - * - * @author Mark Pollack - * @author Mark Fisher - * @see org.springframework.amqp.core.Exchange - * @see org.springframework.amqp.core.Queue - * @see org.springframework.amqp.core.Binding - * @see org.springframework.amqp.core.BindingBuilder - */ -@Configuration -public abstract class AbstractAmqpConfiguration { - - @Bean - public abstract AmqpAdmin amqpAdmin(); - - /** - * Provides convenient access to the default exchange which is always declared on the broker. - */ - public DirectExchange defaultExchange() { - return new DirectExchange(""); - } - -} diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/AbstractRabbitConfiguration.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/AbstractRabbitConfiguration.java deleted file mode 100644 index 28026167..00000000 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/AbstractRabbitConfiguration.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2002-2010 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.amqp.rabbit.config; - -import org.springframework.amqp.config.AbstractAmqpConfiguration; -import org.springframework.amqp.core.AmqpAdmin; -import org.springframework.amqp.rabbit.core.RabbitAdmin; -import org.springframework.amqp.rabbit.core.RabbitTemplate; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -/** - * Abstract base class for code based configuration of Spring managed Rabbit based broker infrastructure, - * i.e. Queues, Exchanges, Bindings. - *

Subclasses are required to provide an implementation of rabbitTemplate from which the the bean - * 'amqpAdmin' will be created. - * - * @author Mark Pollack - * @author Mark Fisher - */ -@Configuration -public abstract class AbstractRabbitConfiguration extends AbstractAmqpConfiguration { - - /** - * Create a bean definition for RabbitTemplate. Since there are several properties - * one may want to set after creating a RabbitTemplate from a ConnectionFactory, this - * abstract method is provided to allow for that flexibility as compared to - * automatically creating a RabbitTemplate by specifying a ConnectionFactory. - */ - @Bean - public abstract RabbitTemplate rabbitTemplate(); - - @Bean - public AmqpAdmin amqpAdmin() { - RabbitAdmin rabbitAdmin = new RabbitAdmin(rabbitTemplate().getConnectionFactory()); - rabbitAdmin.setAutoStartup(true); - rabbitAdmin.afterPropertiesSet(); - return rabbitAdmin; - } - -}