Renamed SimpleEndpoint to DefaultEndpoint.
This commit is contained in:
@@ -28,7 +28,7 @@ import org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser;
|
||||
import org.springframework.beans.factory.xml.ParserContext;
|
||||
import org.springframework.integration.ConfigurationException;
|
||||
import org.springframework.integration.endpoint.MessageEndpoint;
|
||||
import org.springframework.integration.endpoint.SimpleEndpoint;
|
||||
import org.springframework.integration.endpoint.DefaultEndpoint;
|
||||
import org.springframework.integration.handler.MessageHandler;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.util.xml.DomUtils;
|
||||
@@ -127,7 +127,7 @@ public abstract class AbstractHandlerEndpointParser extends AbstractSingleBeanDe
|
||||
* Subclasses may override this to return a specific MessageEndpoint class.
|
||||
*/
|
||||
protected Class<? extends MessageEndpoint> getEndpointClass() {
|
||||
return SimpleEndpoint.class;
|
||||
return DefaultEndpoint.class;
|
||||
}
|
||||
|
||||
protected void postProcessEndpointBean(BeanDefinitionBuilder builder, Element element, ParserContext parserContext) {
|
||||
|
||||
@@ -40,7 +40,7 @@ import org.springframework.integration.bus.MessageBus;
|
||||
import org.springframework.integration.channel.ChannelRegistryAware;
|
||||
import org.springframework.integration.endpoint.ConcurrencyPolicy;
|
||||
import org.springframework.integration.endpoint.MessageEndpoint;
|
||||
import org.springframework.integration.endpoint.SimpleEndpoint;
|
||||
import org.springframework.integration.endpoint.DefaultEndpoint;
|
||||
import org.springframework.integration.endpoint.interceptor.ConcurrencyInterceptor;
|
||||
import org.springframework.integration.handler.MessageHandler;
|
||||
import org.springframework.integration.handler.MessageHandlerChain;
|
||||
@@ -131,7 +131,7 @@ public class HandlerAnnotationPostProcessor extends AbstractAnnotationMethodPost
|
||||
|
||||
public MessageEndpoint createEndpoint(Object bean, String beanName, Class<?> originalBeanClass,
|
||||
org.springframework.integration.annotation.MessageEndpoint endpointAnnotation) {
|
||||
SimpleEndpoint<MessageHandler> endpoint = new SimpleEndpoint<MessageHandler>((MessageHandler) bean);
|
||||
DefaultEndpoint<MessageHandler> endpoint = new DefaultEndpoint<MessageHandler>((MessageHandler) bean);
|
||||
String outputChannelName = endpointAnnotation.output();
|
||||
if (StringUtils.hasText(outputChannelName)) {
|
||||
endpoint.setOutputChannelName(outputChannelName);
|
||||
|
||||
@@ -28,7 +28,7 @@ import org.springframework.beans.factory.config.BeanPostProcessor;
|
||||
import org.springframework.core.annotation.AnnotationUtils;
|
||||
import org.springframework.integration.annotation.Subscriber;
|
||||
import org.springframework.integration.bus.MessageBus;
|
||||
import org.springframework.integration.endpoint.SimpleEndpoint;
|
||||
import org.springframework.integration.endpoint.DefaultEndpoint;
|
||||
import org.springframework.integration.handler.DefaultMessageHandler;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.ClassUtils;
|
||||
@@ -92,7 +92,7 @@ public class SubscriberAnnotationPostProcessor implements BeanPostProcessor {
|
||||
handler.afterPropertiesSet();
|
||||
String endpointName = ClassUtils.getShortNameAsProperty(targetClass) +
|
||||
"." + method.getName() + ".endpoint";
|
||||
SimpleEndpoint<DefaultMessageHandler> endpoint = new SimpleEndpoint<DefaultMessageHandler>(handler);
|
||||
DefaultEndpoint<DefaultMessageHandler> endpoint = new DefaultEndpoint<DefaultMessageHandler>(handler);
|
||||
endpoint.setBeanName(endpointName);
|
||||
endpoint.setInputChannelName(channelName);
|
||||
messageBus.registerEndpoint(endpoint);
|
||||
|
||||
@@ -45,7 +45,7 @@ import org.springframework.integration.util.ErrorHandler;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* The most basic Message Endpoint implementation. Serves as a "host" for any
|
||||
* The default Message Endpoint implementation. Serves as a "host" for any
|
||||
* {@link MessageHandler} and resolves the target for any reply Message(s)
|
||||
* returned by that handler. If the handler returns a non-empty
|
||||
* {@link CompositeMessage}, each Message in its list will be sent
|
||||
@@ -66,7 +66,7 @@ import org.springframework.util.Assert;
|
||||
*
|
||||
* @author Mark Fisher
|
||||
*/
|
||||
public class SimpleEndpoint<T extends MessageHandler> implements MessageEndpoint, ChannelRegistryAware, BeanNameAware {
|
||||
public class DefaultEndpoint<T extends MessageHandler> implements MessageEndpoint, ChannelRegistryAware, BeanNameAware {
|
||||
|
||||
private final Log logger = LogFactory.getLog(this.getClass());
|
||||
|
||||
@@ -92,7 +92,7 @@ public class SimpleEndpoint<T extends MessageHandler> implements MessageEndpoint
|
||||
/**
|
||||
* Create an endpoint for the given handler.
|
||||
*/
|
||||
public SimpleEndpoint(T handler) {
|
||||
public DefaultEndpoint(T handler) {
|
||||
Assert.notNull(handler, "handler must not be null");
|
||||
this.handler = handler;
|
||||
}
|
||||
@@ -239,7 +239,7 @@ public class SimpleEndpoint<T extends MessageHandler> implements MessageEndpoint
|
||||
return nextInterceptor.aroundHandle(requestMessage, new MessageHandler() {
|
||||
@SuppressWarnings("unchecked")
|
||||
public Message<?> handle(Message message) {
|
||||
return SimpleEndpoint.this.handleMessage(message, index + 1);
|
||||
return DefaultEndpoint.this.handleMessage(message, index + 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -330,7 +330,7 @@ public class SimpleEndpoint<T extends MessageHandler> implements MessageEndpoint
|
||||
return (this.name != null) ? this.name : super.toString();
|
||||
}
|
||||
|
||||
/* TODO: remove the following methods after they are removed from the MessageEndpoint interface. */
|
||||
/* TODO: the following properties/methods are candidates for removal from the MessageEndpoint interface. */
|
||||
|
||||
private volatile String inputChannelName;
|
||||
private volatile String outputChannelName;
|
||||
@@ -23,7 +23,7 @@ import org.springframework.integration.channel.MessageChannel;
|
||||
import org.springframework.integration.channel.PollableChannel;
|
||||
import org.springframework.integration.endpoint.EndpointRegistry;
|
||||
import org.springframework.integration.endpoint.MessagingGateway;
|
||||
import org.springframework.integration.endpoint.SimpleEndpoint;
|
||||
import org.springframework.integration.endpoint.DefaultEndpoint;
|
||||
import org.springframework.integration.handler.ReplyMessageCorrelator;
|
||||
import org.springframework.integration.message.DefaultMessageCreator;
|
||||
import org.springframework.integration.message.DefaultMessageMapper;
|
||||
@@ -205,7 +205,7 @@ public class SimpleMessagingGateway extends MessagingGatewaySupport implements M
|
||||
throw new ConfigurationException("No EndpointRegistry available. Cannot register ReplyMessageCorrelator.");
|
||||
}
|
||||
ReplyMessageCorrelator correlator = new ReplyMessageCorrelator(this.replyMapCapacity);
|
||||
SimpleEndpoint<ReplyMessageCorrelator> endpoint = new SimpleEndpoint<ReplyMessageCorrelator>(correlator);
|
||||
DefaultEndpoint<ReplyMessageCorrelator> endpoint = new DefaultEndpoint<ReplyMessageCorrelator>(correlator);
|
||||
endpoint.setBeanName("internal.correlator." + this);
|
||||
endpoint.setSource(this.replyChannel);
|
||||
this.endpointRegistry.registerEndpoint(endpoint);
|
||||
|
||||
Reference in New Issue
Block a user