From c044299015b421fdd14021fac3d565829dbf3e0d Mon Sep 17 00:00:00 2001 From: Mark Fisher Date: Wed, 25 Aug 2010 20:28:18 +0000 Subject: [PATCH] INT-1257, INT-1263 Renamed setShouldIncludeInHistory() to setShouldTrack() on the HistoryProvider interface. --- .../integration/channel/AbstractMessageChannel.java | 8 ++++---- .../integration/context/HistoryProvider.java | 2 +- .../context/MessageHistoryBeanPostProcessor.java | 4 ++-- .../integration/gateway/GatewayProxyFactoryBean.java | 10 +++++----- .../integration/gateway/SimpleMessagingGateway.java | 8 ++++---- .../integration/handler/AbstractMessageHandler.java | 8 ++++---- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/spring-integration-core/src/main/java/org/springframework/integration/channel/AbstractMessageChannel.java b/spring-integration-core/src/main/java/org/springframework/integration/channel/AbstractMessageChannel.java index 28423ff44b..bc99d704e3 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/channel/AbstractMessageChannel.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/channel/AbstractMessageChannel.java @@ -50,7 +50,7 @@ public abstract class AbstractMessageChannel extends IntegrationObjectSupport im private final Log logger = LogFactory.getLog(this.getClass()); - private volatile boolean shouldIncludeInHistory = false; + private volatile boolean shouldTrack = false; private final AtomicLong sendSuccessCount = new AtomicLong(); @@ -65,8 +65,8 @@ public abstract class AbstractMessageChannel extends IntegrationObjectSupport im return "channel"; } - public void setShouldIncludeInHistory(boolean shouldIncludeInHistory) { - this.shouldIncludeInHistory = shouldIncludeInHistory; + public void setShouldTrack(boolean shouldTrack) { + this.shouldTrack = shouldTrack; } /** @@ -169,7 +169,7 @@ public abstract class AbstractMessageChannel extends IntegrationObjectSupport im public final boolean send(Message message, long timeout) { Assert.notNull(message, "message must not be null"); Assert.notNull(message.getPayload(), "message payload must not be null"); - if (this.shouldIncludeInHistory) { + if (this.shouldTrack) { message = MessageHistory.addComponentToHistory(message, this); } message = this.convertPayloadIfNecessary(message); diff --git a/spring-integration-core/src/main/java/org/springframework/integration/context/HistoryProvider.java b/spring-integration-core/src/main/java/org/springframework/integration/context/HistoryProvider.java index a0b1f03a67..79785cb584 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/context/HistoryProvider.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/context/HistoryProvider.java @@ -22,6 +22,6 @@ package org.springframework.integration.context; */ public interface HistoryProvider extends NamedComponent { - void setShouldIncludeInHistory(boolean shouldIncludeInHistory); + void setShouldTrack(boolean shouldTrack); } diff --git a/spring-integration-core/src/main/java/org/springframework/integration/context/MessageHistoryBeanPostProcessor.java b/spring-integration-core/src/main/java/org/springframework/integration/context/MessageHistoryBeanPostProcessor.java index 6af46b4121..d1ce7cf57e 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/context/MessageHistoryBeanPostProcessor.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/context/MessageHistoryBeanPostProcessor.java @@ -28,14 +28,14 @@ public class MessageHistoryBeanPostProcessor implements BeanPostProcessor { public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { if (bean instanceof HistoryProvider) { - ((HistoryProvider) bean).setShouldIncludeInHistory(true); + ((HistoryProvider) bean).setShouldTrack(true); } return bean; } public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { if (bean instanceof HistoryProvider) { - ((HistoryProvider) bean).setShouldIncludeInHistory(true); + ((HistoryProvider) bean).setShouldTrack(true); } return bean; } diff --git a/spring-integration-core/src/main/java/org/springframework/integration/gateway/GatewayProxyFactoryBean.java b/spring-integration-core/src/main/java/org/springframework/integration/gateway/GatewayProxyFactoryBean.java index 1fcb943e4c..092415e46e 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/gateway/GatewayProxyFactoryBean.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/gateway/GatewayProxyFactoryBean.java @@ -75,7 +75,7 @@ public class GatewayProxyFactoryBean extends AbstractEndpoint implements History private volatile ChannelResolver channelResolver; - private volatile boolean shouldIncludeInHistory = false; + private volatile boolean shouldTrack = false; private volatile TypeConverter typeConverter = new SimpleTypeConverter(); @@ -159,8 +159,8 @@ public class GatewayProxyFactoryBean extends AbstractEndpoint implements History this.defaultReplyTimeout = defaultReplyTimeout; } - public void setShouldIncludeInHistory(boolean shouldIncludeInHistory) { - this.shouldIncludeInHistory = shouldIncludeInHistory; + public void setShouldTrack(boolean shouldTrack) { + this.shouldTrack = shouldTrack; } public void setTypeConverter(TypeConverter typeConverter) { @@ -338,8 +338,8 @@ public class GatewayProxyFactoryBean extends AbstractEndpoint implements History if (this.getBeanFactory() != null) { gateway.setBeanFactory(this.getBeanFactory()); } - if (this.shouldIncludeInHistory) { - gateway.setShouldIncludeInHistory(this.shouldIncludeInHistory); + if (this.shouldTrack) { + gateway.setShouldTrack(this.shouldTrack); } gateway.afterPropertiesSet(); return gateway; diff --git a/spring-integration-core/src/main/java/org/springframework/integration/gateway/SimpleMessagingGateway.java b/spring-integration-core/src/main/java/org/springframework/integration/gateway/SimpleMessagingGateway.java index c606a94df9..8940cff573 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/gateway/SimpleMessagingGateway.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/gateway/SimpleMessagingGateway.java @@ -41,7 +41,7 @@ public class SimpleMessagingGateway extends AbstractMessagingGateway implements private final OutboundMessageMapper outboundMapper; - private volatile boolean shouldIncludeInHistory = false; + private volatile boolean shouldTrack = false; public SimpleMessagingGateway() { @@ -58,8 +58,8 @@ public class SimpleMessagingGateway extends AbstractMessagingGateway implements } - public void setShouldIncludeInHistory(boolean shouldIncludeInHistory) { - this.shouldIncludeInHistory = shouldIncludeInHistory; + public void setShouldTrack(boolean shouldTrack) { + this.shouldTrack = shouldTrack; } public Message sendAndReceiveMessage(Object object) { @@ -89,7 +89,7 @@ public class SimpleMessagingGateway extends AbstractMessagingGateway implements Message message = null; try { message = this.inboundMapper.toMessage(object); - if (this.shouldIncludeInHistory) { + if (this.shouldTrack) { message = MessageHistory.addComponentToHistory(message, this); } } diff --git a/spring-integration-core/src/main/java/org/springframework/integration/handler/AbstractMessageHandler.java b/spring-integration-core/src/main/java/org/springframework/integration/handler/AbstractMessageHandler.java index 360eb661e6..d3a71cf4e8 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/handler/AbstractMessageHandler.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/handler/AbstractMessageHandler.java @@ -42,7 +42,7 @@ public abstract class AbstractMessageHandler extends IntegrationObjectSupport im protected final Log logger = LogFactory.getLog(this.getClass()); - private volatile boolean shouldIncludeInHistory = false; + private volatile boolean shouldTrack = false; private volatile int order = Ordered.LOWEST_PRECEDENCE; @@ -60,8 +60,8 @@ public abstract class AbstractMessageHandler extends IntegrationObjectSupport im return "message-handler"; } - public void setShouldIncludeInHistory(boolean shouldIncludeInHistory) { - this.shouldIncludeInHistory = shouldIncludeInHistory; + public void setShouldTrack(boolean shouldTrack) { + this.shouldTrack = shouldTrack; } public final void handleMessage(Message message) { @@ -71,7 +71,7 @@ public abstract class AbstractMessageHandler extends IntegrationObjectSupport im this.logger.debug(this + " received message: " + message); } try { - if (message != null && this.shouldIncludeInHistory) { + if (message != null && this.shouldTrack) { message = MessageHistory.addComponentToHistory(message, this); } this.handleMessageInternal(message);