Renamed PointToPointChannel to SimpleChannel.

This commit is contained in:
Mark Fisher
2008-01-09 14:00:56 +00:00
parent 318a34593d
commit 1e872b82eb
26 changed files with 97 additions and 97 deletions

View File

@@ -36,7 +36,7 @@ import org.springframework.integration.adapter.TargetAdapter;
import org.springframework.integration.channel.ChannelRegistry;
import org.springframework.integration.channel.DefaultChannelRegistry;
import org.springframework.integration.channel.MessageChannel;
import org.springframework.integration.channel.PointToPointChannel;
import org.springframework.integration.channel.SimpleChannel;
import org.springframework.integration.endpoint.MessageEndpoint;
import org.springframework.integration.message.ErrorMessage;
import org.springframework.integration.message.MessageReceiver;
@@ -157,7 +157,7 @@ public class MessageBus implements ChannelRegistry, ApplicationContextAware, Lif
public void initialize() {
initDispatcherExecutor();
if (this.getInvalidMessageChannel() == null) {
this.setInvalidMessageChannel(new PointToPointChannel(Integer.MAX_VALUE));
this.setInvalidMessageChannel(new SimpleChannel(Integer.MAX_VALUE));
}
}
@@ -202,7 +202,7 @@ public class MessageBus implements ChannelRegistry, ApplicationContextAware, Lif
if (this.autoCreateChannels) {
String defaultOutputChannelName = endpoint.getDefaultOutputChannelName();
if (StringUtils.hasText(defaultOutputChannelName) && this.lookupChannel(defaultOutputChannelName) == null) {
this.registerChannel(defaultOutputChannelName, new PointToPointChannel());
this.registerChannel(defaultOutputChannelName, new SimpleChannel());
}
}
}
@@ -254,7 +254,7 @@ public class MessageBus implements ChannelRegistry, ApplicationContextAware, Lif
if (this.logger.isInfoEnabled()) {
logger.info("auto-creating channel '" + channelName + "'");
}
channel = new PointToPointChannel();
channel = new SimpleChannel();
this.registerChannel(channelName, channel);
}
MessageEndpoint<?> endpoint = this.endpoints.get(endpointName);

View File

@@ -30,7 +30,7 @@ import org.springframework.integration.message.Message;
*
* @author Mark Fisher
*/
public class PointToPointChannel implements MessageChannel, BeanNameAware {
public class SimpleChannel implements MessageChannel, BeanNameAware {
private static final int DEFAULT_CAPACITY = 25;
@@ -41,14 +41,14 @@ public class PointToPointChannel implements MessageChannel, BeanNameAware {
/**
* Create a channel with the specified queue capacity.
*/
public PointToPointChannel(int capacity) {
public SimpleChannel(int capacity) {
queue = new LinkedBlockingQueue<Message<?>>(capacity);
}
/**
* Create a channel with the default queue capacity.
*/
public PointToPointChannel() {
public SimpleChannel() {
this(DEFAULT_CAPACITY);
}

View File

@@ -23,7 +23,7 @@ import org.springframework.beans.factory.parsing.BeanComponentDefinition;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.beans.factory.xml.BeanDefinitionParser;
import org.springframework.beans.factory.xml.ParserContext;
import org.springframework.integration.channel.PointToPointChannel;
import org.springframework.integration.channel.SimpleChannel;
import org.springframework.util.StringUtils;
/**
@@ -39,7 +39,7 @@ public class ChannelParser implements BeanDefinitionParser {
public BeanDefinition parse(Element element, ParserContext parserContext) {
RootBeanDefinition channelDef = new RootBeanDefinition(PointToPointChannel.class);
RootBeanDefinition channelDef = new RootBeanDefinition(SimpleChannel.class);
channelDef.setSource(parserContext.extractSource(element));
String capacity = element.getAttribute(CAPACITY_ATTRIBUTE);
if (StringUtils.hasText(capacity)) {

View File

@@ -47,7 +47,7 @@ import org.springframework.integration.bus.ConsumerPolicy;
import org.springframework.integration.bus.MessageBus;
import org.springframework.integration.channel.ChannelRegistryAware;
import org.springframework.integration.channel.MessageChannel;
import org.springframework.integration.channel.PointToPointChannel;
import org.springframework.integration.channel.SimpleChannel;
import org.springframework.integration.endpoint.GenericMessageEndpoint;
import org.springframework.integration.handler.MessageHandler;
import org.springframework.integration.handler.MessageHandlerChain;
@@ -133,7 +133,7 @@ public class MessageEndpointAnnotationPostProcessor implements BeanPostProcessor
source.setObject(bean);
source.setMethod(method.getName());
PollingSourceAdapter<Object> adapter = new PollingSourceAdapter<Object>(source);
MessageChannel channel = new PointToPointChannel();
MessageChannel channel = new SimpleChannel();
adapter.setChannel(channel);
adapter.setPeriod(period);
String channelName = beanName + "-inputChannel";
@@ -172,7 +172,7 @@ public class MessageEndpointAnnotationPostProcessor implements BeanPostProcessor
target.setMethod(method.getName());
target.afterPropertiesSet();
DefaultTargetAdapter adapter = new DefaultTargetAdapter(target);
PointToPointChannel channel = new PointToPointChannel();
SimpleChannel channel = new SimpleChannel();
String channelName = beanName + "-defaultOutputChannel";
messageBus.registerChannel(channelName, channel);
messageBus.registerTargetAdapter(beanName + "-targetAdapter", adapter);