INT-1257, INT-1263 Renamed setShouldIncludeInHistory() to setShouldTrack() on the HistoryProvider interface.

This commit is contained in:
Mark Fisher
2010-08-25 20:28:18 +00:00
parent 64ab7f5734
commit c044299015
6 changed files with 20 additions and 20 deletions

View File

@@ -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);

View File

@@ -22,6 +22,6 @@ package org.springframework.integration.context;
*/
public interface HistoryProvider extends NamedComponent {
void setShouldIncludeInHistory(boolean shouldIncludeInHistory);
void setShouldTrack(boolean shouldTrack);
}

View File

@@ -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;
}

View File

@@ -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;

View File

@@ -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);
}
}

View File

@@ -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);