INT-3504: Deprecate AmqpHeaders

JIRA: https://jira.spring.io/browse/INT-3504

* Deprecate `AmqpHeaders` and extend it from `org.springframework.amqp.support.AmqpHeaders` for backward compatibility
* Change AMQP dependency to `1.4.0`
* Remove usage of deprecated `spring_reply_correlation` and `spring_reply_to` AMQP headers
* Fix syslog `DefaultMessageConverter` JavaDoc

Reformat code
This commit is contained in:
Artem Bilan
2014-08-28 13:21:38 +03:00
committed by Gary Russell
parent 93b1224e99
commit 0b917622a6
13 changed files with 168 additions and 232 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2014 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.
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.integration.syslog;
import java.util.Arrays;
@@ -34,10 +35,10 @@ import org.springframework.messaging.Message;
* Default {@link MessageConverter}; delegates to a {@link SyslogToMapTransformer} to
* convert the payload to a map of values and also provides some of the map contents as
* message headers. See @link {@link SyslogHeaders} for the headers that are mapped.
*
* @author Gary Russell
* @author David Liu
* @since 3.0
*
*/
public class DefaultMessageConverter implements MessageConverter, BeanFactoryAware {
@@ -46,15 +47,13 @@ public class DefaultMessageConverter implements MessageConverter, BeanFactoryAwa
public static final Set<String> SYSLOG_PAYLOAD_ENTRIES = new HashSet<String>(
Arrays.asList(new String[] {SyslogToMapTransformer.MESSAGE, SyslogToMapTransformer.UNDECODED}));
private volatile BeanFactory beanFactory;
private volatile MessageBuilderFactory messageBuilderFactory = new DefaultMessageBuilderFactory();
private volatile boolean asMap = true;
/**
* Set false will leave the payload as the original complete syslog.
* @param asMap
* @param asMap boolean flag.
*/
public void setAsMap(boolean asMap) {
this.asMap = asMap;
@@ -62,8 +61,7 @@ public class DefaultMessageConverter implements MessageConverter, BeanFactoryAwa
@Override
public final void setBeanFactory(BeanFactory beanFactory) {
this.beanFactory = beanFactory;
this.messageBuilderFactory = IntegrationUtils.getMessageBuilderFactory(this.beanFactory);
this.messageBuilderFactory = IntegrationUtils.getMessageBuilderFactory(beanFactory);
}
protected MessageBuilderFactory getMessageBuilderFactory() {