INT-1257, INT-1263 Renamed HistoryProvider to TrackableComponent.

This commit is contained in:
Mark Fisher
2010-08-25 20:42:46 +00:00
parent df3464ed25
commit 9ed99eb10c
6 changed files with 13 additions and 13 deletions

View File

@@ -29,7 +29,7 @@ import org.springframework.core.convert.ConversionService;
import org.springframework.integration.Message;
import org.springframework.integration.MessageDeliveryException;
import org.springframework.integration.MessagingException;
import org.springframework.integration.context.HistoryProvider;
import org.springframework.integration.context.TrackableComponent;
import org.springframework.integration.context.IntegrationObjectSupport;
import org.springframework.integration.core.MessageBuilder;
import org.springframework.integration.core.MessageChannel;
@@ -46,7 +46,7 @@ import org.springframework.util.StringUtils;
* @author Mark Fisher
* @author Oleg Zhurakousky
*/
public abstract class AbstractMessageChannel extends IntegrationObjectSupport implements MessageChannel, HistoryProvider {
public abstract class AbstractMessageChannel extends IntegrationObjectSupport implements MessageChannel, TrackableComponent {
private final Log logger = LogFactory.getLog(this.getClass());

View File

@@ -27,15 +27,15 @@ import org.springframework.beans.factory.config.BeanPostProcessor;
public class MessageHistoryBeanPostProcessor implements BeanPostProcessor {
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
if (bean instanceof HistoryProvider) {
((HistoryProvider) bean).setShouldTrack(true);
if (bean instanceof TrackableComponent) {
((TrackableComponent) bean).setShouldTrack(true);
}
return bean;
}
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
if (bean instanceof HistoryProvider) {
((HistoryProvider) bean).setShouldTrack(true);
if (bean instanceof TrackableComponent) {
((TrackableComponent) bean).setShouldTrack(true);
}
return bean;
}

View File

@@ -20,7 +20,7 @@ package org.springframework.integration.context;
* @author Mark Fisher
* @since 2.0
*/
public interface HistoryProvider extends NamedComponent {
public interface TrackableComponent extends NamedComponent {
void setShouldTrack(boolean shouldTrack);

View File

@@ -37,7 +37,7 @@ import org.springframework.expression.Expression;
import org.springframework.integration.Message;
import org.springframework.integration.annotation.Gateway;
import org.springframework.integration.context.BeanFactoryChannelResolver;
import org.springframework.integration.context.HistoryProvider;
import org.springframework.integration.context.TrackableComponent;
import org.springframework.integration.context.IntegrationContextUtils;
import org.springframework.integration.core.ChannelResolver;
import org.springframework.integration.core.MessageChannel;
@@ -59,7 +59,7 @@ import org.springframework.util.StringUtils;
* @author Mark Fisher
* @author Oleg Zhurakousky
*/
public class GatewayProxyFactoryBean extends AbstractEndpoint implements HistoryProvider, FactoryBean<Object>, MethodInterceptor, BeanClassLoaderAware {
public class GatewayProxyFactoryBean extends AbstractEndpoint implements TrackableComponent, FactoryBean<Object>, MethodInterceptor, BeanClassLoaderAware {
private volatile InboundMessageMapper<Throwable> exceptionMapper;

View File

@@ -18,7 +18,7 @@ package org.springframework.integration.gateway;
import org.springframework.integration.Message;
import org.springframework.integration.MessagingException;
import org.springframework.integration.context.HistoryProvider;
import org.springframework.integration.context.TrackableComponent;
import org.springframework.integration.core.MessageHistory;
import org.springframework.integration.mapping.InboundMessageMapper;
import org.springframework.integration.mapping.OutboundMessageMapper;
@@ -35,7 +35,7 @@ import org.springframework.util.Assert;
* @author Mark Fisher
*/
@SuppressWarnings({"unchecked", "rawtypes"})
public class SimpleMessagingGateway extends AbstractMessagingGateway implements HistoryProvider {
public class SimpleMessagingGateway extends AbstractMessagingGateway implements TrackableComponent {
private final InboundMessageMapper inboundMapper;

View File

@@ -23,7 +23,7 @@ import org.springframework.core.Ordered;
import org.springframework.integration.Message;
import org.springframework.integration.MessageHandlingException;
import org.springframework.integration.MessagingException;
import org.springframework.integration.context.HistoryProvider;
import org.springframework.integration.context.TrackableComponent;
import org.springframework.integration.context.IntegrationObjectSupport;
import org.springframework.integration.core.MessageHandler;
import org.springframework.integration.core.MessageHistory;
@@ -38,7 +38,7 @@ import org.springframework.util.Assert;
* @author Mark Fisher
* @author Oleg Zhurakousky
*/
public abstract class AbstractMessageHandler extends IntegrationObjectSupport implements MessageHandler, HistoryProvider, Ordered {
public abstract class AbstractMessageHandler extends IntegrationObjectSupport implements MessageHandler, TrackableComponent, Ordered {
protected final Log logger = LogFactory.getLog(this.getClass());