INT-4390: Fix tangles

JIRA: https://jira.spring.io/browse/INT-4390

Phase I: flow context/registration cycle

- extract interfaces
- rename implementations to `Standard...`

Phase II - dsl<->dsl.channel tangles

Move the channel specs to dsl.

Fix missing refactorings

(Not related to DSL) - rename core `event` package to `events`

- avoid collision with event module package
- fix tangle caused by `MessageGroupExpiredEvent`.

Phase III - dsl<->config.dsl

- move classes from config.dsl to dsl

(Not related to DSL) - fix many tangles caused by graph being a sub-package of support.management
 - make `graph` a top-level package

(Not related to DSL) - move `IntegrationManagementConfigurer` from
`management` to `config` - tangle between core and management
* Polishing Copyrights, diamonds, some JavaDocs and What's New
This commit is contained in:
Gary Russell
2018-03-14 12:10:33 -04:00
committed by Artem Bilan
parent 7f25cba262
commit 82f252dd00
93 changed files with 968 additions and 694 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,13 +18,14 @@ package org.springframework.integration.aggregator;
import java.util.Date;
import org.springframework.integration.event.IntegrationEvent;
import org.springframework.integration.events.IntegrationEvent;
import org.springframework.integration.support.context.NamedComponent;
/**
* Event representing the expiration of a message group.
*
* @author Gary Russell
*
* @since 4.0.1
*/
public class MessageGroupExpiredEvent extends IntegrationEvent {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2015 the original author or authors.
* Copyright 2014-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,7 +24,6 @@ import java.lang.annotation.Target;
import org.springframework.context.annotation.Import;
import org.springframework.integration.support.management.IntegrationManagement;
import org.springframework.integration.support.management.IntegrationManagementConfigurer;
/**
* Enables default configuring of management in Spring Integration components in an existing application.
@@ -33,6 +32,7 @@ import org.springframework.integration.support.management.IntegrationManagementC
* bean is defined under the name {@code integrationManagementConfigurer}.
*
* @author Gary Russell
*
* @since 4.2
*/
@Target(ElementType.TYPE)

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015 the original author or authors.
* Copyright 2015-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,7 +30,6 @@ import org.springframework.context.annotation.Role;
import org.springframework.core.annotation.AnnotationAttributes;
import org.springframework.core.env.Environment;
import org.springframework.core.type.AnnotationMetadata;
import org.springframework.integration.support.management.IntegrationManagementConfigurer;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
@@ -42,6 +41,7 @@ import org.springframework.util.StringUtils;
*
* @author Artem Bilan
* @author Gary Russell
*
* @since 4.2
*/
@Configuration

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.integration.support.management;
package org.springframework.integration.config;
import java.util.Arrays;
import java.util.HashMap;
@@ -31,7 +31,18 @@ import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.integration.core.MessageSource;
import org.springframework.integration.support.management.AbstractMessageChannelMetrics;
import org.springframework.integration.support.management.AbstractMessageHandlerMetrics;
import org.springframework.integration.support.management.ConfigurableMetricsAware;
import org.springframework.integration.support.management.DefaultMetricsFactory;
import org.springframework.integration.support.management.IntegrationManagement;
import org.springframework.integration.support.management.IntegrationManagement.ManagementOverrides;
import org.springframework.integration.support.management.MessageChannelMetrics;
import org.springframework.integration.support.management.MessageHandlerMetrics;
import org.springframework.integration.support.management.MessageSourceMetrics;
import org.springframework.integration.support.management.MessageSourceMetricsConfigurer;
import org.springframework.integration.support.management.MetricsFactory;
import org.springframework.integration.support.management.PollableChannelManagement;
import org.springframework.integration.support.management.metrics.MetricsCaptor;
import org.springframework.integration.support.management.micrometer.MicrometerMetricsCaptor;
import org.springframework.integration.support.utils.PatternMatchUtils;

View File

@@ -1,4 +0,0 @@
/**
* Provides config classes of the Spring Integration Java DSL.
*/
package org.springframework.integration.config.dsl;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2017 the original author or authors.
* Copyright 2015-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,7 +23,7 @@ import org.springframework.beans.factory.support.AbstractBeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.xml.AbstractBeanDefinitionParser;
import org.springframework.beans.factory.xml.ParserContext;
import org.springframework.integration.support.management.IntegrationManagementConfigurer;
import org.springframework.integration.config.IntegrationManagementConfigurer;
/**
* Parser for the &lt;management/&gt; element.
@@ -37,6 +37,7 @@ public class IntegrationManagementParser extends AbstractBeanDefinitionParser {
@Override
protected String resolveId(Element element, AbstractBeanDefinition definition, ParserContext parserContext)
throws BeanDefinitionStoreException {
return IntegrationManagementConfigurer.MANAGEMENT_CONFIGURER_NAME;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2017 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,14 +19,6 @@ package org.springframework.integration.dsl;
import java.util.Queue;
import java.util.concurrent.Executor;
import org.springframework.integration.dsl.channel.DirectChannelSpec;
import org.springframework.integration.dsl.channel.ExecutorChannelSpec;
import org.springframework.integration.dsl.channel.FluxMessageChannelSpec;
import org.springframework.integration.dsl.channel.MessageChannels;
import org.springframework.integration.dsl.channel.PriorityChannelSpec;
import org.springframework.integration.dsl.channel.PublishSubscribeChannelSpec;
import org.springframework.integration.dsl.channel.QueueChannelSpec;
import org.springframework.integration.dsl.channel.RendezvousChannelSpec;
import org.springframework.integration.store.ChannelMessageStore;
import org.springframework.integration.store.PriorityCapableChannelMessageStore;
import org.springframework.messaging.Message;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.integration.dsl.channel;
package org.springframework.integration.dsl;
import org.springframework.integration.channel.DirectChannel;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.integration.dsl.channel;
package org.springframework.integration.dsl;
import java.util.concurrent.Executor;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2017 the original author or authors.
* Copyright 2017-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.integration.dsl.channel;
package org.springframework.integration.dsl;
import org.springframework.integration.channel.FluxMessageChannel;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2017 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,7 +21,6 @@ import java.util.function.Consumer;
import org.springframework.context.SmartLifecycle;
import org.springframework.integration.core.MessageSource;
import org.springframework.integration.dsl.channel.MessageChannelSpec;
import org.springframework.integration.endpoint.MessageProducerSupport;
import org.springframework.integration.gateway.MessagingGatewaySupport;
import org.springframework.messaging.MessageChannel;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2017 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.integration.config.dsl;
package org.springframework.integration.dsl;
import java.util.Collection;
import java.util.LinkedHashMap;
@@ -41,14 +41,6 @@ import org.springframework.integration.config.ConsumerEndpointFactoryBean;
import org.springframework.integration.config.IntegrationConfigUtils;
import org.springframework.integration.config.SourcePollingChannelAdapterFactoryBean;
import org.springframework.integration.core.MessageSource;
import org.springframework.integration.dsl.ComponentsRegistration;
import org.springframework.integration.dsl.ConsumerEndpointSpec;
import org.springframework.integration.dsl.IntegrationComponentSpec;
import org.springframework.integration.dsl.IntegrationFlow;
import org.springframework.integration.dsl.IntegrationFlowBuilder;
import org.springframework.integration.dsl.IntegrationFlows;
import org.springframework.integration.dsl.SourcePollingChannelAdapterSpec;
import org.springframework.integration.dsl.StandardIntegrationFlow;
import org.springframework.integration.dsl.support.MessageChannelReference;
import org.springframework.integration.gateway.AnnotationGatewayProxyFactoryBean;
import org.springframework.integration.support.context.NamedComponent;

View File

@@ -46,8 +46,6 @@ import org.springframework.integration.context.IntegrationContextUtils;
import org.springframework.integration.core.GenericSelector;
import org.springframework.integration.core.MessageProducer;
import org.springframework.integration.core.MessageSelector;
import org.springframework.integration.dsl.channel.MessageChannelSpec;
import org.springframework.integration.dsl.channel.WireTapSpec;
import org.springframework.integration.dsl.support.FixedSubscriberChannelPrototype;
import org.springframework.integration.dsl.support.MessageChannelReference;
import org.springframework.integration.expression.ControlBusMethodFilter;
@@ -111,7 +109,7 @@ import reactor.util.function.Tuple2;
*
* @since 5.0
*
* @see org.springframework.integration.config.dsl.IntegrationFlowBeanPostProcessor
* @see org.springframework.integration.dsl.IntegrationFlowBeanPostProcessor
*/
public abstract class IntegrationFlowDefinition<B extends IntegrationFlowDefinition<B>> {
@@ -190,7 +188,7 @@ public abstract class IntegrationFlowDefinition<B extends IntegrationFlowDefinit
* fluent API.
* @param messageChannelSpec the {@link MessageChannelSpec} to use.
* @return the current {@link IntegrationFlowDefinition}.
* @see org.springframework.integration.dsl.channel.MessageChannels
* @see org.springframework.integration.dsl.MessageChannels
*/
public B channel(MessageChannelSpec<?, ?> messageChannelSpec) {
Assert.notNull(messageChannelSpec, "'messageChannelSpec' must not be null");
@@ -201,7 +199,7 @@ public abstract class IntegrationFlowDefinition<B extends IntegrationFlowDefinit
* Populate the provided {@link MessageChannel} instance
* at the current {@link IntegrationFlow} chain position.
* The {@code messageChannel} can be an existing bean, or fresh instance, in which case
* the {@link org.springframework.integration.config.dsl.IntegrationFlowBeanPostProcessor}
* the {@link org.springframework.integration.dsl.IntegrationFlowBeanPostProcessor}
* will populate it as a bean with a generated name.
* @param messageChannel the {@link MessageChannel} to populate.
* @return the current {@link IntegrationFlowDefinition}.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2017 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,7 +24,6 @@ import org.reactivestreams.Publisher;
import org.springframework.integration.channel.DirectChannel;
import org.springframework.integration.channel.FluxMessageChannel;
import org.springframework.integration.core.MessageSource;
import org.springframework.integration.dsl.channel.MessageChannelSpec;
import org.springframework.integration.dsl.support.FixedSubscriberChannelPrototype;
import org.springframework.integration.dsl.support.MessageChannelReference;
import org.springframework.integration.endpoint.MessageProducerSupport;
@@ -46,7 +45,7 @@ import org.springframework.util.Assert;
*
* @since 5.0
*
* @see org.springframework.integration.config.dsl.IntegrationFlowBeanPostProcessor
* @see org.springframework.integration.dsl.IntegrationFlowBeanPostProcessor
*/
public final class IntegrationFlows {
@@ -90,7 +89,7 @@ public final class IntegrationFlows {
* The {@link org.springframework.integration.dsl.IntegrationFlow} {@code inputChannel}.
* @param messageChannelSpec the MessageChannelSpec to populate {@link MessageChannel} instance.
* @return new {@link IntegrationFlowBuilder}.
* @see org.springframework.integration.dsl.channel.MessageChannels
* @see org.springframework.integration.dsl.MessageChannels
*/
public static IntegrationFlowBuilder from(MessageChannelSpec<?, ?> messageChannelSpec) {
Assert.notNull(messageChannelSpec, "'messageChannelSpec' must not be null");

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.integration.dsl.channel;
package org.springframework.integration.dsl;
import org.springframework.integration.channel.AbstractMessageChannel;
import org.springframework.integration.dispatcher.LoadBalancingStrategy;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2017 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.integration.dsl.channel;
package org.springframework.integration.dsl;
import java.util.ArrayList;
import java.util.Arrays;
@@ -25,8 +25,6 @@ import java.util.Map;
import org.springframework.integration.channel.AbstractMessageChannel;
import org.springframework.integration.channel.interceptor.WireTap;
import org.springframework.integration.dsl.ComponentsRegistration;
import org.springframework.integration.dsl.IntegrationComponentSpec;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.converter.MessageConverter;
import org.springframework.messaging.support.ChannelInterceptor;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2017 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.integration.dsl.channel;
package org.springframework.integration.dsl;
import java.util.Queue;
import java.util.concurrent.Executor;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2017 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.integration.dsl.channel;
package org.springframework.integration.dsl;
import java.util.Comparator;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.integration.dsl.channel;
package org.springframework.integration.dsl;
import java.util.concurrent.Executor;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2017 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,8 +20,6 @@ import java.util.LinkedHashMap;
import java.util.Map;
import java.util.concurrent.Executor;
import org.springframework.integration.dsl.channel.PublishSubscribeChannelSpec;
/**
* @author Artem Bilan
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2017 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.integration.dsl.channel;
package org.springframework.integration.dsl;
import java.util.Queue;
import java.util.concurrent.locks.Lock;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.integration.dsl.channel;
package org.springframework.integration.dsl;
import org.springframework.integration.channel.RendezvousChannel;

View File

@@ -60,7 +60,7 @@ import org.springframework.context.SmartLifecycle;
* @since 5.0
*
* @see IntegrationFlows
* @see org.springframework.integration.config.dsl.IntegrationFlowBeanPostProcessor
* @see org.springframework.integration.dsl.IntegrationFlowBeanPostProcessor
* @see org.springframework.integration.dsl.context.IntegrationFlowContext
*/
public class StandardIntegrationFlow implements IntegrationFlow, SmartLifecycle {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2017 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.integration.dsl.channel;
package org.springframework.integration.dsl;
import java.util.Collections;
import java.util.Map;
@@ -22,8 +22,6 @@ import java.util.Map;
import org.springframework.expression.Expression;
import org.springframework.integration.channel.interceptor.WireTap;
import org.springframework.integration.core.MessageSelector;
import org.springframework.integration.dsl.ComponentsRegistration;
import org.springframework.integration.dsl.IntegrationComponentSpec;
import org.springframework.integration.filter.ExpressionEvaluatingSelector;
import org.springframework.messaging.MessageChannel;
import org.springframework.util.Assert;

View File

@@ -1,4 +0,0 @@
/**
* Contains MessageChannel Builders DSL.
*/
package org.springframework.integration.dsl.channel;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.integration.config.dsl;
package org.springframework.integration.dsl.context;
import java.beans.Introspector;
@@ -24,7 +24,7 @@ import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.integration.config.IntegrationConfigurationInitializer;
import org.springframework.integration.dsl.IntegrationComponentSpec;
import org.springframework.integration.dsl.context.IntegrationFlowContext;
import org.springframework.integration.dsl.IntegrationFlowBeanPostProcessor;
import org.springframework.util.Assert;
/**
@@ -34,6 +34,7 @@ import org.springframework.util.Assert;
* {@link IntegrationComponentSpec#get()}.
*
* @author Artem Bilan
* @author Gary Russell
* @since 5.0
*
* @see org.springframework.integration.config.IntegrationConfigurationBeanFactoryPostProcessor
@@ -58,7 +59,7 @@ public class DslIntegrationConfigurationInitializer implements IntegrationConfig
registry.registerBeanDefinition(INTEGRATION_FLOW_BPP_BEAN_NAME,
new RootBeanDefinition(IntegrationFlowBeanPostProcessor.class));
registry.registerBeanDefinition(INTEGRATION_FLOW_CONTEXT_BEAN_NAME,
new RootBeanDefinition(IntegrationFlowContext.class));
new RootBeanDefinition(StandardIntegrationFlowContext.class));
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2018 the original author or authors.
* Copyright 2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,24 +16,12 @@
package org.springframework.integration.dsl.context;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.beans.factory.BeanFactoryUtils;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.integration.core.MessagingTemplate;
import org.springframework.integration.dsl.IntegrationFlow;
import org.springframework.integration.support.context.NamedComponent;
import org.springframework.messaging.MessageChannel;
import org.springframework.util.Assert;
/**
* A public API for dynamic (manual) registration of {@link IntegrationFlow}s,
@@ -58,28 +46,13 @@ import org.springframework.util.Assert;
* It can be used for access to the target {@link IntegrationFlow} or for manipulation with its lifecycle.
*
* @author Artem Bilan
* @author Gary Russell
*
* @since 5.0
*
* @see IntegrationFlowRegistration
*/
public final class IntegrationFlowContext implements BeanFactoryAware {
private final Map<String, IntegrationFlowRegistration> registry = new HashMap<>();
private ConfigurableListableBeanFactory beanFactory;
private IntegrationFlowContext() {
}
@Override
public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
Assert.isInstanceOf(ConfigurableListableBeanFactory.class, beanFactory,
"To use Spring Integration Java DSL the 'beanFactory' has to be an instance of " +
"'ConfigurableListableBeanFactory'. " +
"Consider using 'GenericApplicationContext' implementation.");
this.beanFactory = (ConfigurableListableBeanFactory) beanFactory;
}
public interface IntegrationFlowContext {
/**
* Associate provided {@link IntegrationFlow} with an {@link IntegrationFlowRegistrationBuilder}
@@ -87,52 +60,7 @@ public final class IntegrationFlowContext implements BeanFactoryAware {
* @param integrationFlow the {@link IntegrationFlow} to register
* @return the IntegrationFlowRegistrationBuilder associated with the provided {@link IntegrationFlow}
*/
public IntegrationFlowRegistrationBuilder registration(IntegrationFlow integrationFlow) {
return new IntegrationFlowRegistrationBuilder(integrationFlow);
}
private void register(IntegrationFlowRegistrationBuilder builder) {
IntegrationFlow integrationFlow = builder.integrationFlowRegistration.getIntegrationFlow();
String flowId = builder.integrationFlowRegistration.getId();
if (flowId == null) {
flowId = generateBeanName(integrationFlow, null);
builder.id(flowId);
}
else if (this.registry.containsKey(flowId)) {
throw new IllegalArgumentException("An IntegrationFlow '" + this.registry.get(flowId) +
"' with flowId '" + flowId + "' is already registered.\n" +
"An existing IntegrationFlowRegistration must be destroyed before overriding.");
}
IntegrationFlow theFlow = (IntegrationFlow) registerBean(integrationFlow, flowId, null);
builder.integrationFlowRegistration.setIntegrationFlow(theFlow);
final String theFlowId = flowId;
builder.additionalBeans.forEach((key, value) -> registerBean(key, value, theFlowId));
if (builder.autoStartup) {
builder.integrationFlowRegistration.start();
}
this.registry.put(flowId, builder.integrationFlowRegistration);
}
@SuppressWarnings("unchecked")
private Object registerBean(Object bean, String beanName, String parentName) {
if (beanName == null) {
beanName = generateBeanName(bean, parentName);
}
BeanDefinition beanDefinition =
BeanDefinitionBuilder.genericBeanDefinition((Class<Object>) bean.getClass(), () -> bean)
.getRawBeanDefinition();
((BeanDefinitionRegistry) this.beanFactory).registerBeanDefinition(beanName, beanDefinition);
if (parentName != null) {
this.beanFactory.registerDependentBean(parentName, beanName);
}
return this.beanFactory.getBean(beanName);
}
IntegrationFlowRegistrationBuilder registration(IntegrationFlow integrationFlow);
/**
* Obtain an {@link IntegrationFlowRegistration} for the {@link IntegrationFlow}
@@ -140,30 +68,14 @@ public final class IntegrationFlowContext implements BeanFactoryAware {
* @param flowId the bean name to obtain
* @return the IntegrationFlowRegistration for provided {@code id} or {@code null}
*/
public IntegrationFlowRegistration getRegistrationById(String flowId) {
return this.registry.get(flowId);
}
IntegrationFlowRegistration getRegistrationById(String flowId);
/**
* Destroy an {@link IntegrationFlow} bean (as well as all its dependant beans)
* for provided {@code flowId} and clean up all the local cache for it.
* @param flowId the bean name to destroy from
*/
public synchronized void remove(String flowId) {
if (this.registry.containsKey(flowId)) {
IntegrationFlowRegistration flowRegistration = this.registry.remove(flowId);
flowRegistration.stop();
Arrays.stream(this.beanFactory.getDependentBeans(flowId))
.forEach(((BeanDefinitionRegistry) this.beanFactory)::removeBeanDefinition);
((BeanDefinitionRegistry) this.beanFactory).removeBeanDefinition(flowId);
}
else {
throw new IllegalStateException("Only manually registered IntegrationFlows can be removed. "
+ "But [" + flowId + "] ins't one of them.");
}
}
void remove(String flowId);
/**
* Obtain a {@link MessagingTemplate} with its default destination set to the input channel
@@ -174,51 +86,91 @@ public final class IntegrationFlowContext implements BeanFactoryAware {
* @param flowId the bean name to obtain the input channel from
* @return the {@link MessagingTemplate} instance
*/
public MessagingTemplate messagingTemplateFor(String flowId) {
return this.registry.get(flowId)
.getMessagingTemplate();
}
MessagingTemplate messagingTemplateFor(String flowId);
/**
* Provide the state of the mapping of integration flow names to their
* {@link IntegrationFlowRegistration} instances.
* @return the registry of flow ids and their registration.
*/
public Map<String, IntegrationFlowRegistration> getRegistry() {
return Collections.unmodifiableMap(this.registry);
}
Map<String, IntegrationFlowRegistration> getRegistry();
/**
* @author Gary Russell
* @since 5.1
*
*/
interface IntegrationFlowRegistration extends BeanFactoryAware {
/**
* Return the flow id.
* @return the id.
*/
String getId();
/**
* Set the flow id.
* @param id the id.
*/
void setId(String id);
/**
* Return the flow.
* @return the flow.
*/
IntegrationFlow getIntegrationFlow();
/**
* Set the integration flow.
* @param integrationFlow the flow.
*/
void setIntegrationFlow(IntegrationFlow integrationFlow);
/**
* Return the flow input channel.
* @return the channel.
*/
MessageChannel getInputChannel();
/**
* Set the flow context.
* @param integrationFlowContext the context.
*/
void setIntegrationFlowContext(IntegrationFlowContext integrationFlowContext);
/**
* Obtain a {@link MessagingTemplate} with its default destination set to the input channel
* of the {@link IntegrationFlow}.
* <p> Any {@link IntegrationFlow} bean (not only manually registered) can be used for this method.
* <p> If {@link IntegrationFlow} doesn't start with the {@link MessageChannel}, the
* {@link IllegalStateException} is thrown.
* @return the {@link MessagingTemplate} instance
*/
MessagingTemplate getMessagingTemplate();
/**
* Start the registration.
*/
void start();
/**
* Stop the registration.
*/
void stop();
/**
* Destroy the {@link IntegrationFlow} bean (as well as all its dependent beans)
* and clean up all the local cache for it.
*/
void destroy();
private String generateBeanName(Object instance, String parentName) {
if (instance instanceof NamedComponent && ((NamedComponent) instance).getComponentName() != null) {
return ((NamedComponent) instance).getComponentName();
}
String generatedBeanName = (parentName != null ? parentName : "") + instance.getClass().getName();
String id = generatedBeanName;
int counter = -1;
while (counter == -1 || this.beanFactory.containsBean(id)) {
counter++;
id = generatedBeanName + BeanFactoryUtils.GENERATED_BEAN_NAME_SEPARATOR + counter;
}
return id;
}
/**
* A Builder pattern implementation for the options to register {@link IntegrationFlow}
* in the application context.
*/
public final class IntegrationFlowRegistrationBuilder {
private Map<Object, String> additionalBeans = new HashMap<>();
private final IntegrationFlowRegistration integrationFlowRegistration;
private boolean autoStartup = true;
IntegrationFlowRegistrationBuilder(IntegrationFlow integrationFlow) {
this.integrationFlowRegistration = new IntegrationFlowRegistration(integrationFlow);
this.integrationFlowRegistration.setBeanFactory(IntegrationFlowContext.this.beanFactory);
this.integrationFlowRegistration.setIntegrationFlowContext(IntegrationFlowContext.this);
}
interface IntegrationFlowRegistrationBuilder {
/**
* Specify an {@code id} for the {@link IntegrationFlow} to register.
@@ -228,10 +180,7 @@ public final class IntegrationFlowContext implements BeanFactoryAware {
* @param id the id for the {@link IntegrationFlow} to register
* @return the current builder instance
*/
public IntegrationFlowRegistrationBuilder id(String id) {
this.integrationFlowRegistration.setId(id);
return this;
}
IntegrationFlowRegistrationBuilder id(String id);
/**
* The {@code boolean} flag to indication if an {@link IntegrationFlow} must be started
@@ -239,10 +188,7 @@ public final class IntegrationFlowContext implements BeanFactoryAware {
* @param autoStartup start or not the {@link IntegrationFlow} automatically after registration.
* @return the current builder instance
*/
public IntegrationFlowRegistrationBuilder autoStartup(boolean autoStartup) {
this.autoStartup = autoStartup;
return this;
}
IntegrationFlowRegistrationBuilder autoStartup(boolean autoStartup);
/**
* Add an object which will be registered as an {@link IntegrationFlow} dependant bean in the
@@ -251,9 +197,7 @@ public final class IntegrationFlowContext implements BeanFactoryAware {
* @param bean an additional arbitrary bean to register into the application context.
* @return the current builder instance
*/
public IntegrationFlowRegistrationBuilder addBean(Object bean) {
return addBean(null, bean);
}
IntegrationFlowRegistrationBuilder addBean(Object bean);
/**
* Add an object which will be registered as an {@link IntegrationFlow} dependant bean in the
@@ -263,10 +207,7 @@ public final class IntegrationFlowContext implements BeanFactoryAware {
* @param bean an additional arbitrary bean to register into the application context.
* @return the current builder instance
*/
public IntegrationFlowRegistrationBuilder addBean(String name, Object bean) {
this.additionalBeans.put(bean, name);
return this;
}
IntegrationFlowRegistrationBuilder addBean(String name, Object bean);
/**
* Register an {@link IntegrationFlow} and all the dependant and support components
@@ -274,10 +215,7 @@ public final class IntegrationFlowContext implements BeanFactoryAware {
* control object.
* @return the {@link IntegrationFlowRegistration} instance.
*/
public IntegrationFlowRegistration register() {
IntegrationFlowContext.this.register(this);
return this.integrationFlowRegistration;
}
IntegrationFlowRegistration register();
}

View File

@@ -0,0 +1,275 @@
/*
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.integration.dsl.context;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.beans.factory.BeanFactoryUtils;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.integration.core.MessagingTemplate;
import org.springframework.integration.dsl.IntegrationFlow;
import org.springframework.integration.support.context.NamedComponent;
import org.springframework.messaging.MessageChannel;
import org.springframework.util.Assert;
/**
* Standard implementation of {@link IntegrationFlowContext}.
*
* @author Artem Bilan
* @author Gary Russell
*
* @since 5.1
*
*/
public final class StandardIntegrationFlowContext implements IntegrationFlowContext, BeanFactoryAware {
private final Map<String, IntegrationFlowRegistration> registry = new HashMap<>();
private ConfigurableListableBeanFactory beanFactory;
private StandardIntegrationFlowContext() {
}
@Override
public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
Assert.isInstanceOf(ConfigurableListableBeanFactory.class, beanFactory,
"To use Spring Integration Java DSL the 'beanFactory' has to be an instance of " +
"'ConfigurableListableBeanFactory'. " +
"Consider using 'GenericApplicationContext' implementation.");
this.beanFactory = (ConfigurableListableBeanFactory) beanFactory;
}
/**
* Associate provided {@link IntegrationFlow} with an {@link StandardIntegrationFlowRegistrationBuilder}
* for additional options and farther registration in the application context.
* @param integrationFlow the {@link IntegrationFlow} to register
* @return the IntegrationFlowRegistrationBuilder associated with the provided {@link IntegrationFlow}
*/
@Override
public StandardIntegrationFlowRegistrationBuilder registration(IntegrationFlow integrationFlow) {
return new StandardIntegrationFlowRegistrationBuilder(integrationFlow);
}
private void register(StandardIntegrationFlowRegistrationBuilder builder) {
IntegrationFlow integrationFlow = builder.integrationFlowRegistration.getIntegrationFlow();
String flowId = builder.integrationFlowRegistration.getId();
if (flowId == null) {
flowId = generateBeanName(integrationFlow, null);
builder.id(flowId);
}
else if (this.registry.containsKey(flowId)) {
throw new IllegalArgumentException("An IntegrationFlow '" + this.registry.get(flowId) +
"' with flowId '" + flowId + "' is already registered.\n" +
"An existing IntegrationFlowRegistration must be destroyed before overriding.");
}
IntegrationFlow theFlow = (IntegrationFlow) registerBean(integrationFlow, flowId, null);
builder.integrationFlowRegistration.setIntegrationFlow(theFlow);
final String theFlowId = flowId;
builder.additionalBeans.forEach((key, value) -> registerBean(key, value, theFlowId));
if (builder.autoStartup) {
builder.integrationFlowRegistration.start();
}
this.registry.put(flowId, builder.integrationFlowRegistration);
}
@SuppressWarnings("unchecked")
private Object registerBean(Object bean, String beanName, String parentName) {
if (beanName == null) {
beanName = generateBeanName(bean, parentName);
}
BeanDefinition beanDefinition =
BeanDefinitionBuilder.genericBeanDefinition((Class<Object>) bean.getClass(), () -> bean)
.getRawBeanDefinition();
((BeanDefinitionRegistry) this.beanFactory).registerBeanDefinition(beanName, beanDefinition);
if (parentName != null) {
this.beanFactory.registerDependentBean(parentName, beanName);
}
return this.beanFactory.getBean(beanName);
}
/**
* Obtain an {@link IntegrationFlowRegistration} for the {@link IntegrationFlow}
* associated with the provided {@code flowId}.
* @param flowId the bean name to obtain
* @return the IntegrationFlowRegistration for provided {@code id} or {@code null}
*/
@Override
public IntegrationFlowRegistration getRegistrationById(String flowId) {
return this.registry.get(flowId);
}
/**
* Destroy an {@link IntegrationFlow} bean (as well as all its dependant beans)
* for provided {@code flowId} and clean up all the local cache for it.
* @param flowId the bean name to destroy from
*/
@Override
public synchronized void remove(String flowId) {
if (this.registry.containsKey(flowId)) {
IntegrationFlowRegistration flowRegistration = this.registry.remove(flowId);
flowRegistration.stop();
Arrays.stream(this.beanFactory.getDependentBeans(flowId))
.forEach(((BeanDefinitionRegistry) this.beanFactory)::removeBeanDefinition);
((BeanDefinitionRegistry) this.beanFactory).removeBeanDefinition(flowId);
}
else {
throw new IllegalStateException("Only manually registered IntegrationFlows can be removed. "
+ "But [" + flowId + "] ins't one of them.");
}
}
/**
* Obtain a {@link MessagingTemplate} with its default destination set to the input channel
* of the {@link IntegrationFlow} for provided {@code flowId}.
* <p> Any {@link IntegrationFlow} bean (not only manually registered) can be used for this method.
* <p> If {@link IntegrationFlow} doesn't start with the {@link MessageChannel}, the
* {@link IllegalStateException} is thrown.
* @param flowId the bean name to obtain the input channel from
* @return the {@link MessagingTemplate} instance
*/
@Override
public MessagingTemplate messagingTemplateFor(String flowId) {
return this.registry.get(flowId)
.getMessagingTemplate();
}
/**
* Provide the state of the mapping of integration flow names to their
* {@link IntegrationFlowRegistration} instances.
* @return the registry of flow ids and their registration.
*/
@Override
public Map<String, IntegrationFlowRegistration> getRegistry() {
return Collections.unmodifiableMap(this.registry);
}
private String generateBeanName(Object instance, String parentName) {
if (instance instanceof NamedComponent && ((NamedComponent) instance).getComponentName() != null) {
return ((NamedComponent) instance).getComponentName();
}
String generatedBeanName = (parentName != null ? parentName : "") + instance.getClass().getName();
String id = generatedBeanName;
int counter = -1;
while (counter == -1 || this.beanFactory.containsBean(id)) {
counter++;
id = generatedBeanName + BeanFactoryUtils.GENERATED_BEAN_NAME_SEPARATOR + counter;
}
return id;
}
/**
* A Builder pattern implementation for the options to register {@link IntegrationFlow}
* in the application context.
*/
public final class StandardIntegrationFlowRegistrationBuilder implements IntegrationFlowRegistrationBuilder {
private final Map<Object, String> additionalBeans = new HashMap<>();
private final IntegrationFlowRegistration integrationFlowRegistration;
private boolean autoStartup = true;
StandardIntegrationFlowRegistrationBuilder(IntegrationFlow integrationFlow) {
this.integrationFlowRegistration = new StandardIntegrationFlowRegistration(integrationFlow);
this.integrationFlowRegistration.setBeanFactory(StandardIntegrationFlowContext.this.beanFactory);
this.integrationFlowRegistration.setIntegrationFlowContext(StandardIntegrationFlowContext.this);
}
/**
* Specify an {@code id} for the {@link IntegrationFlow} to register.
* Must be unique per context.
* The registration with this {@code id} must be destroyed before reusing for
* a new {@link IntegrationFlow} instance.
* @param id the id for the {@link IntegrationFlow} to register
* @return the current builder instance
*/
@Override
public StandardIntegrationFlowRegistrationBuilder id(String id) {
this.integrationFlowRegistration.setId(id);
return this;
}
/**
* The {@code boolean} flag to indication if an {@link IntegrationFlow} must be started
* automatically after registration. Defaults to {@code true}.
* @param autoStartup start or not the {@link IntegrationFlow} automatically after registration.
* @return the current builder instance
*/
@Override
public StandardIntegrationFlowRegistrationBuilder autoStartup(boolean autoStartup) {
this.autoStartup = autoStartup;
return this;
}
/**
* Add an object which will be registered as an {@link IntegrationFlow} dependant bean in the
* application context. Usually it is some support component, which needs an application context.
* For example dynamically created connection factories or header mappers for AMQP, JMS, TCP etc.
* @param bean an additional arbitrary bean to register into the application context.
* @return the current builder instance
*/
@Override
public StandardIntegrationFlowRegistrationBuilder addBean(Object bean) {
return addBean(null, bean);
}
/**
* Add an object which will be registered as an {@link IntegrationFlow} dependant bean in the
* application context. Usually it is some support component, which needs an application context.
* For example dynamically created connection factories or header mappers for AMQP, JMS, TCP etc.
* @param name the name for the bean to register.
* @param bean an additional arbitrary bean to register into the application context.
* @return the current builder instance
*/
@Override
public StandardIntegrationFlowRegistrationBuilder addBean(String name, Object bean) {
this.additionalBeans.put(bean, name);
return this;
}
/**
* Register an {@link IntegrationFlow} and all the dependant and support components
* in the application context and return an associated {@link IntegrationFlowRegistration}
* control object.
* @return the {@link IntegrationFlowRegistration} instance.
*/
@Override
public IntegrationFlowRegistration register() {
StandardIntegrationFlowContext.this.register(this);
return this.integrationFlowRegistration;
}
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2018 the original author or authors.
* Copyright 2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,26 +16,29 @@
package org.springframework.integration.dsl.context;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.context.Lifecycle;
import org.springframework.integration.core.MessagingTemplate;
import org.springframework.integration.dsl.IntegrationFlow;
import org.springframework.integration.dsl.StandardIntegrationFlow;
import org.springframework.integration.dsl.context.IntegrationFlowContext.IntegrationFlowRegistration;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageChannel;
/**
* Instances of this classes are returned as a result of
* {@link IntegrationFlowContext#registration(IntegrationFlow)} invocation
* {@link StandardIntegrationFlowContext#registration(IntegrationFlow)} invocation
* and provide an API for some useful {@link IntegrationFlow} options and its lifecycle.
*
* @author Artem Bilan
* @author Gary Russell
*
* @since 5.0
* @since 5.1
*
* @see IntegrationFlowContext
*/
public class IntegrationFlowRegistration {
class StandardIntegrationFlowRegistration implements IntegrationFlowRegistration {
private IntegrationFlow integrationFlow;
@@ -49,34 +52,41 @@ public class IntegrationFlowRegistration {
private ConfigurableListableBeanFactory beanFactory;
IntegrationFlowRegistration(IntegrationFlow integrationFlow) {
StandardIntegrationFlowRegistration(IntegrationFlow integrationFlow) {
this.integrationFlow = integrationFlow;
}
void setBeanFactory(ConfigurableListableBeanFactory beanFactory) {
this.beanFactory = beanFactory; // NOSONAR (synchronization)
@Override
public void setBeanFactory(BeanFactory beanFactory) {
this.beanFactory = (ConfigurableListableBeanFactory) beanFactory;
}
void setIntegrationFlowContext(IntegrationFlowContext integrationFlowContext) {
@Override
public void setIntegrationFlowContext(IntegrationFlowContext integrationFlowContext) {
this.integrationFlowContext = integrationFlowContext;
}
void setId(String id) {
@Override
public void setId(String id) {
this.id = id;
}
void setIntegrationFlow(IntegrationFlow integrationFlow) {
@Override
public void setIntegrationFlow(IntegrationFlow integrationFlow) {
this.integrationFlow = integrationFlow;
}
@Override
public String getId() {
return this.id;
}
@Override
public IntegrationFlow getIntegrationFlow() {
return this.integrationFlow;
}
@Override
public MessageChannel getInputChannel() {
if (this.inputChannel == null) {
if (this.integrationFlow instanceof StandardIntegrationFlow) {
@@ -110,6 +120,7 @@ public class IntegrationFlowRegistration {
* {@link IllegalStateException} is thrown.
* @return the {@link MessagingTemplate} instance
*/
@Override
public MessagingTemplate getMessagingTemplate() {
if (this.messagingTemplate == null) {
this.messagingTemplate = new MessagingTemplate(getInputChannel()) {
@@ -131,6 +142,7 @@ public class IntegrationFlowRegistration {
return this.messagingTemplate;
}
@Override
public void start() {
if (this.integrationFlow instanceof Lifecycle) {
((Lifecycle) this.integrationFlow).start();
@@ -143,6 +155,7 @@ public class IntegrationFlowRegistration {
}
}
@Override
public void stop() {
if (this.integrationFlow instanceof Lifecycle) {
((Lifecycle) this.integrationFlow).stop();
@@ -153,6 +166,7 @@ public class IntegrationFlowRegistration {
* Destroy the {@link IntegrationFlow} bean (as well as all its dependant beans)
* and clean up all the local cache for it.
*/
@Override
public void destroy() {
this.integrationFlowContext.remove(this.id);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,7 +28,7 @@ import org.springframework.messaging.MessageChannel;
* @author Artem Bilan
* @since 5.0
*
* @see org.springframework.integration.config.dsl.IntegrationFlowBeanPostProcessor
* @see org.springframework.integration.dsl.IntegrationFlowBeanPostProcessor
*/
public class FixedSubscriberChannelPrototype implements MessageChannel {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2017 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,7 +29,7 @@ import org.springframework.util.Assert;
*
* @since 5.0
*
* @see org.springframework.integration.config.dsl.IntegrationFlowBeanPostProcessor
* @see org.springframework.integration.dsl.IntegrationFlowBeanPostProcessor
*/
public class MessageChannelReference implements MessageChannel {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2016 the original author or authors.
* Copyright 2013-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.integration.event;
package org.springframework.integration.events;
import org.springframework.context.ApplicationEvent;

View File

@@ -1,4 +1,4 @@
/**
* ApplicationEvents generated by the Spring Integration framework.
*/
package org.springframework.integration.event;
package org.springframework.integration.events;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.integration.support.management.graph;
package org.springframework.integration.graph;
import java.util.ArrayList;
import java.util.List;
@@ -25,15 +25,17 @@ import org.springframework.messaging.MessageHandler;
* Represents a composite message handler.
*
* @author Gary Russell
*
* @since 4.3
*
*/
public class CompositeMessageHandlerNode extends MessageHandlerNode {
private final List<InnerHandler> handlers = new ArrayList<InnerHandler>();
private final List<InnerHandler> handlers = new ArrayList<>();
public CompositeMessageHandlerNode(int nodeId, String name, MessageHandler handler, String input, String output,
List<InnerHandler> handlers) {
super(nodeId, name, handler, input, output);
this.handlers.addAll(handlers);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.integration.support.management.graph;
package org.springframework.integration.graph;
import org.springframework.messaging.MessageHandler;
@@ -22,6 +22,7 @@ import org.springframework.messaging.MessageHandler;
* Represents an endpoint that has a discard channel.
*
* @author Gary Russell
*
* @since 4.3
*
*/
@@ -31,6 +32,7 @@ public class DiscardingMessageHandlerNode extends MessageHandlerNode {
public DiscardingMessageHandlerNode(int nodeId, String name, MessageHandler handler, String input, String output,
String discards) {
super(nodeId, name, handler, input, output);
this.discards = discards;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,12 +14,13 @@
* limitations under the License.
*/
package org.springframework.integration.support.management.graph;
package org.springframework.integration.graph;
/**
* Base class for all endpoints.
*
* @author Gary Russell
*
* @since 4.3
*
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.integration.support.management.graph;
package org.springframework.integration.graph;
import java.util.List;
@@ -25,6 +25,7 @@ import org.springframework.integration.handler.CompositeMessageHandler;
* (pollable endpoint).
*
* @author Gary Russell
*
* @since 4.3
*
*/
@@ -34,6 +35,7 @@ public class ErrorCapableCompositeMessageHandlerNode extends CompositeMessageHan
public ErrorCapableCompositeMessageHandlerNode(int nodeId, String name, CompositeMessageHandler handler, String input,
String output, String errors, List<InnerHandler> handlers) {
super(nodeId, name, handler, input, output, handlers);
this.errors = errors;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.integration.support.management.graph;
package org.springframework.integration.graph;
import org.springframework.messaging.MessageHandler;
@@ -23,6 +23,7 @@ import org.springframework.messaging.MessageHandler;
* (pollable endpoint).
*
* @author Gary Russell
*
* @since 4.3
*
*/
@@ -32,6 +33,7 @@ public class ErrorCapableDiscardingMessageHandlerNode extends DiscardingMessageH
public ErrorCapableDiscardingMessageHandlerNode(int nodeId, String name, MessageHandler handler, String input,
String output, String discards, String errors) {
super(nodeId, name, handler, input, output, discards);
this.errors = errors;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,12 +14,13 @@
* limitations under the License.
*/
package org.springframework.integration.support.management.graph;
package org.springframework.integration.graph;
/**
* Represents nodes that can natively handle errors.
*
* @author Gary Russell
*
* @since 4.3
*
*/
@@ -29,6 +30,7 @@ public class ErrorCapableEndpointNode extends EndpointNode implements ErrorCapab
protected ErrorCapableEndpointNode(int nodeId, String name, Object nodeObject, String output, String errors,
Stats stats) {
super(nodeId, name, nodeObject, output, stats);
this.errors = errors;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.integration.support.management.graph;
package org.springframework.integration.graph;
import org.springframework.messaging.MessageHandler;
@@ -31,6 +31,7 @@ public class ErrorCapableMessageHandlerNode extends MessageHandlerNode implement
public ErrorCapableMessageHandlerNode(int nodeId, String name, MessageHandler handler, String input,
String output, String errors) {
super(nodeId, name, handler, input, output);
this.errors = errors;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,12 +14,13 @@
* limitations under the License.
*/
package org.springframework.integration.support.management.graph;
package org.springframework.integration.graph;
/**
* Nodes implementing this interface are capable of emitting errors.
*
* @author Gary Russell
*
* @since 4.3
*
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.integration.support.management.graph;
package org.springframework.integration.graph;
import java.util.Collection;
@@ -25,6 +25,7 @@ import org.springframework.messaging.MessageHandler;
* (pollable endpoint).
*
* @author Gary Russell
*
* @since 4.3
*
*/
@@ -34,6 +35,7 @@ public class ErrorCapableRoutingNode extends RoutingMessageHandlerNode implement
public ErrorCapableRoutingNode(int nodeId, String name, MessageHandler handler, String input, String output,
String errors, Collection<String> routes) {
super(nodeId, name, handler, input, output, routes);
this.errors = errors;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.integration.support.management.graph;
package org.springframework.integration.graph;
import java.util.Collection;
import java.util.Map;
@@ -25,6 +25,7 @@ import java.util.Map;
*
* @author Andy Clement
* @author Gary Russell
*
* @since 4.3
*
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.integration.support.management.graph;
package org.springframework.integration.graph;
import java.lang.reflect.Method;
import java.util.ArrayList;
@@ -51,6 +51,7 @@ import org.springframework.util.StringUtils;
*
* @author Gary Russell
* @author Artem Bilan
*
* @since 4.3
*
*/
@@ -122,8 +123,8 @@ public class IntegrationGraphServer implements ApplicationContextAware, Applicat
descriptor.put("name", name);
}
this.nodeFactory.reset();
Collection<IntegrationNode> nodes = new ArrayList<IntegrationNode>();
Collection<LinkNode> links = new ArrayList<LinkNode>();
Collection<IntegrationNode> nodes = new ArrayList<>();
Collection<LinkNode> links = new ArrayList<>();
Map<String, MessageChannelNode> channelNodes = channels(nodes);
pollingAdapters(nodes, links, channelNodes);
gateways(nodes, links, channelNodes);
@@ -136,7 +137,7 @@ public class IntegrationGraphServer implements ApplicationContextAware, Applicat
private Map<String, MessageChannelNode> channels(Collection<IntegrationNode> nodes) {
Map<String, MessageChannel> channels = this.applicationContext
.getBeansOfType(MessageChannel.class);
Map<String, MessageChannelNode> channelNodes = new HashMap<String, MessageChannelNode>();
Map<String, MessageChannelNode> channelNodes = new HashMap<>();
for (Entry<String, MessageChannel> entry : channels.entrySet()) {
MessageChannel channel = entry.getValue();
MessageChannelNode channelNode = this.nodeFactory.channelNode(entry.getKey(), channel);
@@ -149,6 +150,7 @@ public class IntegrationGraphServer implements ApplicationContextAware, Applicat
private void pollingAdapters(Collection<IntegrationNode> nodes, Collection<LinkNode> links,
Map<String, MessageChannelNode> channelNodes) {
Map<String, SourcePollingChannelAdapter> spcas = this.applicationContext
.getBeansOfType(SourcePollingChannelAdapter.class);
for (Entry<String, SourcePollingChannelAdapter> entry : spcas.entrySet()) {
@@ -161,6 +163,7 @@ public class IntegrationGraphServer implements ApplicationContextAware, Applicat
private void gateways(Collection<IntegrationNode> nodes, Collection<LinkNode> links,
Map<String, MessageChannelNode> channelNodes) {
Map<String, MessagingGatewaySupport> gateways = this.applicationContext
.getBeansOfType(MessagingGatewaySupport.class);
for (Entry<String, MessagingGatewaySupport> entry : gateways.entrySet()) {
@@ -194,6 +197,7 @@ public class IntegrationGraphServer implements ApplicationContextAware, Applicat
private void producers(Collection<IntegrationNode> nodes, Collection<LinkNode> links,
Map<String, MessageChannelNode> channelNodes) {
Map<String, MessageProducerSupport> producers = this.applicationContext
.getBeansOfType(MessageProducerSupport.class);
for (Entry<String, MessageProducerSupport> entry : producers.entrySet()) {
@@ -206,6 +210,7 @@ public class IntegrationGraphServer implements ApplicationContextAware, Applicat
private void consumers(Collection<IntegrationNode> nodes, Collection<LinkNode> links,
Map<String, MessageChannelNode> channelNodes) {
Map<String, IntegrationConsumer> consumers = this.applicationContext.getBeansOfType(IntegrationConsumer.class);
for (Entry<String, IntegrationConsumer> entry : consumers.entrySet()) {
IntegrationConsumer consumer = entry.getValue();
@@ -223,6 +228,7 @@ public class IntegrationGraphServer implements ApplicationContextAware, Applicat
private void producerLink(Collection<LinkNode> links, Map<String, MessageChannelNode> channelNodes,
EndpointNode endpointNode) {
MessageChannelNode channelNode;
if (endpointNode.getOutput() != null) {
channelNode = channelNodes.get(endpointNode.getOutput());
@@ -355,9 +361,9 @@ public class IntegrationGraphServer implements ApplicationContextAware, Applicat
private MessageHandlerNode compositeHandler(String name, IntegrationConsumer consumer,
CompositeMessageHandler handler, String output, String errors, boolean polled) {
List<MessageHandler> handlers = handler.getHandlers();
List<CompositeMessageHandlerNode.InnerHandler> innerHandlers =
new ArrayList<CompositeMessageHandlerNode.InnerHandler>();
List<CompositeMessageHandlerNode.InnerHandler> innerHandlers = new ArrayList<>();
for (MessageHandler innerHandler : handlers) {
if (innerHandler instanceof NamedComponent) {
NamedComponent named = (NamedComponent) innerHandler;
@@ -375,6 +381,7 @@ public class IntegrationGraphServer implements ApplicationContextAware, Applicat
private MessageHandlerNode discardingHandler(String name, IntegrationConsumer consumer,
DiscardingMessageHandler handler, String output, String errors, boolean polled) {
String discards = handler.getDiscardChannel() != null ? handler.getDiscardChannel().toString() : null;
String inputChannel = consumer.getInputChannel() != null ? consumer.getInputChannel().toString() : null;
return polled
@@ -386,6 +393,7 @@ public class IntegrationGraphServer implements ApplicationContextAware, Applicat
private MessageHandlerNode routingHandler(String name, IntegrationConsumer consumer, MessageHandler handler,
MappingMessageRouterManagement router, String output, String errors, boolean polled) {
Collection<String> routes = router.getChannelMappings().values();
Collection<String> dynamicChannelNames = router.getDynamicChannelNames();
if (dynamicChannelNames.size() > 0) {
@@ -403,8 +411,9 @@ public class IntegrationGraphServer implements ApplicationContextAware, Applicat
private MessageHandlerNode recipientListRoutingHandler(String name, IntegrationConsumer consumer,
MessageHandler handler, RecipientListRouterManagement router, String output, String errors,
boolean polled) {
Collection<?> recipients = router.getRecipients();
List<String> routes = new ArrayList<String>(recipients.size());
List<String> routes = new ArrayList<>(recipients.size());
for (Object recipient : recipients) {
routes.add(((Recipient) recipient).getChannel().toString());
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.integration.support.management.graph;
package org.springframework.integration.graph;
import java.util.HashMap;
import java.util.Map;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.integration.support.management.graph;
package org.springframework.integration.graph;
/**
* Represents a link between nodes.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.integration.support.management.graph;
package org.springframework.integration.graph;
import org.springframework.integration.support.management.MessageChannelMetrics;
import org.springframework.integration.support.management.Statistics;
@@ -24,6 +24,7 @@ import org.springframework.messaging.MessageChannel;
* Represents a message channel.
*
* @author Gary Russell
*
* @since 4.3
*
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.integration.support.management.graph;
package org.springframework.integration.graph;
import org.springframework.integration.gateway.MessagingGatewaySupport;
@@ -22,6 +22,7 @@ import org.springframework.integration.gateway.MessagingGatewaySupport;
* Represents an inbound gateway.
*
* @author Gary Russell
*
* @since 4.3
*
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.integration.support.management.graph;
package org.springframework.integration.graph;
import org.springframework.integration.support.management.MessageHandlerMetrics;
import org.springframework.integration.support.management.Statistics;
@@ -24,6 +24,7 @@ import org.springframework.messaging.MessageHandler;
* Represents a message handler.
*
* @author Gary Russell
*
* @since 4.3
*
*/
@@ -97,6 +98,7 @@ public class MessageHandlerNode extends EndpointNode {
public boolean isCountsEnabled() {
return this.handler.isCountsEnabled();
}
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.integration.support.management.graph;
package org.springframework.integration.graph;
import org.springframework.integration.endpoint.MessageProducerSupport;
@@ -22,6 +22,7 @@ import org.springframework.integration.endpoint.MessageProducerSupport;
* Represents an inbound message producer.
*
* @author Gary Russell
*
* @since 4.3
*
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.integration.support.management.graph;
package org.springframework.integration.graph;
import org.springframework.integration.core.MessageSource;
import org.springframework.integration.support.management.MessageSourceMetrics;
@@ -23,6 +23,7 @@ import org.springframework.integration.support.management.MessageSourceMetrics;
* Represents a message source.
*
* @author Gary Russell
*
* @since 4.3
*
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.integration.support.management.graph;
package org.springframework.integration.graph;
import java.util.Collection;
@@ -24,6 +24,7 @@ import org.springframework.messaging.MessageHandler;
* Represents an endpoint that can route to multiple channels.
*
* @author Gary Russell
*
* @since 4.3
*
*/
@@ -33,6 +34,7 @@ public class RoutingMessageHandlerNode extends MessageHandlerNode {
public RoutingMessageHandlerNode(int nodeId, String name, MessageHandler handler, String input, String output,
Collection<String> routes) {
super(nodeId, name, handler, input, output);
this.routes = routes;
}

View File

@@ -0,0 +1,4 @@
/**
* Provides classes related to the runtime object graph.
*/
package org.springframework.integration.graph;

View File

@@ -1,4 +0,0 @@
/**
* Provides classes related to the runtime object graph.
*/
package org.springframework.integration.support.management.graph;

View File

@@ -2,4 +2,4 @@ org.springframework.integration.config.IntegrationConfigurationInitializer=\
org.springframework.integration.config.GlobalChannelInterceptorInitializer,\
org.springframework.integration.config.IntegrationConverterInitializer,\
org.springframework.integration.config.IdempotentReceiverAutoProxyCreatorInitializer,\
org.springframework.integration.config.dsl.DslIntegrationConfigurationInitializer
org.springframework.integration.dsl.context.DslIntegrationConfigurationInitializer

View File

@@ -43,7 +43,7 @@ import org.springframework.integration.channel.QueueChannel;
import org.springframework.integration.config.EnableIntegration;
import org.springframework.integration.dsl.IntegrationFlow;
import org.springframework.integration.dsl.IntegrationFlows;
import org.springframework.integration.dsl.channel.MessageChannels;
import org.springframework.integration.dsl.MessageChannels;
import org.springframework.integration.handler.MessageTriggerAction;
import org.springframework.integration.support.MessageBuilder;
import org.springframework.messaging.Message;

View File

@@ -61,9 +61,9 @@ import org.springframework.integration.config.EnableIntegration;
import org.springframework.integration.context.IntegrationContextUtils;
import org.springframework.integration.dsl.IntegrationFlow;
import org.springframework.integration.dsl.IntegrationFlows;
import org.springframework.integration.dsl.MessageChannels;
import org.springframework.integration.dsl.Pollers;
import org.springframework.integration.dsl.Transformers;
import org.springframework.integration.dsl.channel.MessageChannels;
import org.springframework.integration.handler.AbstractReplyProducingMessageHandler;
import org.springframework.integration.handler.GenericHandler;
import org.springframework.integration.handler.advice.ErrorMessageSendingRecoverer;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2017 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -48,7 +48,7 @@ import org.springframework.integration.dsl.IntegrationFlow;
import org.springframework.integration.dsl.IntegrationFlowAdapter;
import org.springframework.integration.dsl.IntegrationFlowDefinition;
import org.springframework.integration.dsl.IntegrationFlows;
import org.springframework.integration.dsl.channel.MessageChannels;
import org.springframework.integration.dsl.MessageChannels;
import org.springframework.integration.handler.LoggingHandler;
import org.springframework.integration.support.MessageBuilder;
import org.springframework.messaging.Message;

View File

@@ -54,11 +54,11 @@ import org.springframework.integration.dsl.IntegrationFlow;
import org.springframework.integration.dsl.IntegrationFlowAdapter;
import org.springframework.integration.dsl.IntegrationFlowDefinition;
import org.springframework.integration.dsl.IntegrationFlows;
import org.springframework.integration.dsl.MessageChannels;
import org.springframework.integration.dsl.MessageProducerSpec;
import org.springframework.integration.dsl.StandardIntegrationFlow;
import org.springframework.integration.dsl.channel.MessageChannels;
import org.springframework.integration.dsl.context.IntegrationFlowContext;
import org.springframework.integration.dsl.context.IntegrationFlowRegistration;
import org.springframework.integration.dsl.context.IntegrationFlowContext.IntegrationFlowRegistration;
import org.springframework.integration.endpoint.MessageProducerSupport;
import org.springframework.integration.handler.AbstractReplyProducingMessageHandler;
import org.springframework.integration.support.SmartLifecycleRoleController;

View File

@@ -48,7 +48,7 @@ import org.springframework.integration.channel.QueueChannel;
import org.springframework.integration.config.EnableIntegration;
import org.springframework.integration.dsl.IntegrationFlow;
import org.springframework.integration.dsl.IntegrationFlows;
import org.springframework.integration.dsl.channel.MessageChannels;
import org.springframework.integration.dsl.MessageChannels;
import org.springframework.integration.dsl.context.IntegrationFlowContext;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageChannel;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2017 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -44,7 +44,7 @@ import org.springframework.integration.config.EnableIntegration;
import org.springframework.integration.config.EnableMessageHistory;
import org.springframework.integration.dsl.IntegrationFlow;
import org.springframework.integration.dsl.IntegrationFlows;
import org.springframework.integration.dsl.channel.MessageChannels;
import org.springframework.integration.dsl.MessageChannels;
import org.springframework.integration.expression.FunctionExpression;
import org.springframework.integration.support.MessageBuilder;
import org.springframework.messaging.Message;

View File

@@ -49,8 +49,8 @@ import org.springframework.integration.codec.Codec;
import org.springframework.integration.config.EnableIntegration;
import org.springframework.integration.dsl.IntegrationFlow;
import org.springframework.integration.dsl.IntegrationFlows;
import org.springframework.integration.dsl.MessageChannels;
import org.springframework.integration.dsl.Transformers;
import org.springframework.integration.dsl.channel.MessageChannels;
import org.springframework.integration.handler.advice.AbstractRequestHandlerAdvice;
import org.springframework.integration.handler.advice.IdempotentReceiverInterceptor;
import org.springframework.integration.selector.MetadataStoreSelector;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2017 the original author or authors.
* Copyright 2017-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -36,7 +36,7 @@ import org.springframework.integration.annotation.ServiceActivator;
import org.springframework.integration.config.EnableIntegration;
import org.springframework.integration.dsl.IntegrationFlow;
import org.springframework.integration.dsl.IntegrationFlows;
import org.springframework.integration.dsl.channel.MessageChannels;
import org.springframework.integration.dsl.MessageChannels;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.MessageHeaders;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2017 the original author or authors.
* Copyright 2015-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -36,6 +36,7 @@ import org.springframework.integration.channel.AbstractMessageChannel;
import org.springframework.integration.channel.DirectChannel;
import org.springframework.integration.config.EnableIntegration;
import org.springframework.integration.config.EnableIntegrationManagement;
import org.springframework.integration.config.IntegrationManagementConfigurer;
import org.springframework.integration.endpoint.AbstractMessageSource;
import org.springframework.integration.handler.AbstractMessageHandler;
import org.springframework.integration.router.RecipientListRouter;
@@ -44,6 +45,7 @@ import org.springframework.messaging.MessageChannel;
/**
* @author Gary Russell
*
* @since 4.2
*
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -48,6 +48,8 @@ import org.springframework.integration.core.MessageProducer;
import org.springframework.integration.endpoint.EventDrivenConsumer;
import org.springframework.integration.endpoint.MessageProducerSupport;
import org.springframework.integration.endpoint.PollingConsumer;
import org.springframework.integration.graph.Graph;
import org.springframework.integration.graph.IntegrationGraphServer;
import org.springframework.integration.router.ExpressionEvaluatingRouter;
import org.springframework.integration.router.HeaderValueRouter;
import org.springframework.integration.router.RecipientListRouter;
@@ -69,6 +71,7 @@ import com.fasterxml.jackson.databind.SerializationFeature;
/**
* @author Gary Russell
* @author Artem Bilan
*
* @since 4.3
*
*/