diff --git a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/core/DslIntegrationConfigurationInitializer.java b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/config/DslIntegrationConfigurationInitializer.java similarity index 92% rename from spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/core/DslIntegrationConfigurationInitializer.java rename to spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/config/DslIntegrationConfigurationInitializer.java index 4f18767..96caf6f 100644 --- a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/core/DslIntegrationConfigurationInitializer.java +++ b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/config/DslIntegrationConfigurationInitializer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.integration.dsl.core; +package org.springframework.integration.dsl.config; import java.util.Arrays; import java.util.List; @@ -25,6 +25,8 @@ import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; 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.core.IntegrationComponentSpec; +import org.springframework.integration.dsl.config.IntegrationFlowBeanPostProcessor; import org.springframework.util.Assert; /** diff --git a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/core/IntegrationFlowBeanPostProcessor.java b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/config/IntegrationFlowBeanPostProcessor.java similarity index 97% rename from spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/core/IntegrationFlowBeanPostProcessor.java rename to spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/config/IntegrationFlowBeanPostProcessor.java index dcc66da..23d75e5 100644 --- a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/core/IntegrationFlowBeanPostProcessor.java +++ b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/config/IntegrationFlowBeanPostProcessor.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.integration.dsl.core; +package org.springframework.integration.dsl.config; import java.util.Collection; @@ -36,6 +36,8 @@ 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.core.ConsumerEndpointSpec; +import org.springframework.integration.dsl.core.IntegrationComponentSpec; import org.springframework.integration.dsl.support.MessageChannelReference; import org.springframework.integration.support.context.NamedComponent; import org.springframework.messaging.MessageChannel; diff --git a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/config/package-info.java b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/config/package-info.java new file mode 100644 index 0000000..6a30f88 --- /dev/null +++ b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/config/package-info.java @@ -0,0 +1,4 @@ +/** + * Provides config classes of the Spring Integration Java DSL. + */ +package org.springframework.integration.dsl.config; diff --git a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/core/EndpointSpec.java b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/core/EndpointSpec.java index 9f41575..e1b0f06 100644 --- a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/core/EndpointSpec.java +++ b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/core/EndpointSpec.java @@ -19,8 +19,8 @@ package org.springframework.integration.dsl.core; import org.springframework.beans.factory.BeanNameAware; import org.springframework.core.ResolvableType; import org.springframework.integration.dsl.support.Function; -import org.springframework.integration.dsl.support.tuple.Tuple; import org.springframework.integration.dsl.support.tuple.Tuple2; +import org.springframework.integration.dsl.support.tuple.Tuples; import org.springframework.integration.scheduling.PollerMetadata; import org.springframework.util.Assert; @@ -37,7 +37,7 @@ public abstract class EndpointSpec, F extends Be try { Class fClass = ResolvableType.forClass(this.getClass()).as(EndpointSpec.class).resolveGenerics()[1]; F endpointFactoryBean = (F) fClass.newInstance(); - this.target = Tuple.of(endpointFactoryBean, handler); + this.target = Tuples.of(endpointFactoryBean, handler); } catch (Exception e) { throw new IllegalStateException(e); diff --git a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/core/IntegrationComponentSpec.java b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/core/IntegrationComponentSpec.java index 0b8f477..ce2769a 100644 --- a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/core/IntegrationComponentSpec.java +++ b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/core/IntegrationComponentSpec.java @@ -41,7 +41,7 @@ public abstract class IntegrationComponentSpec The type of the first value. - * @return The new {@link Tuple1}. - */ - public static Tuple1 of(T1 t1) { - return new Tuple1(t1); - } - - /** - * Create a {@link Tuple2} with the given objects. - * - * @param t1 The first value in the tuple. - * @param t2 The second value in the tuple. - * @param The type of the first value. - * @param The type of the second value. - * @return The new {@link Tuple2}. - */ - public static Tuple2 of(T1 t1, T2 t2) { - return new Tuple2(t1, t2); - } - /** * Get the object at the given index. diff --git a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/support/tuple/Tuples.java b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/support/tuple/Tuples.java new file mode 100644 index 0000000..7a81c79 --- /dev/null +++ b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/support/tuple/Tuples.java @@ -0,0 +1,47 @@ +/* + * Copyright 2014 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.support.tuple; + +/** + * @author Artem Bilan + */ +public abstract class Tuples { + /** + * Create a {@link Tuple1} with the given object. + * + * @param t1 The first value in the tuple. + * @param The type of the first value. + * @return The new {@link Tuple1}. + */ + public static Tuple1 of(T1 t1) { + return new Tuple1(t1); + } + + /** + * Create a {@link Tuple2} with the given objects. + * + * @param t1 The first value in the tuple. + * @param t2 The second value in the tuple. + * @param The type of the first value. + * @param The type of the second value. + * @return The new {@link Tuple2}. + */ + public static Tuple2 of(T1 t1, T2 t2) { + return new Tuple2(t1, t2); + } + +} diff --git a/spring-integration-java-dsl/src/main/resources/META-INF/spring.factories b/spring-integration-java-dsl/src/main/resources/META-INF/spring.factories index 4c31c0a..d11f830 100644 --- a/spring-integration-java-dsl/src/main/resources/META-INF/spring.factories +++ b/spring-integration-java-dsl/src/main/resources/META-INF/spring.factories @@ -1,2 +1,2 @@ org.springframework.integration.config.IntegrationConfigurationInitializer=\ -org.springframework.integration.dsl.core.DslIntegrationConfigurationInitializer +org.springframework.integration.dsl.config.DslIntegrationConfigurationInitializer