@@ -47,6 +47,7 @@ import org.springframework.integration.dsl.ResequencerSpec
47
47
import org.springframework.integration.dsl.RouterSpec
48
48
import org.springframework.integration.dsl.ScatterGatherSpec
49
49
import org.springframework.integration.dsl.SplitterEndpointSpec
50
+ import org.springframework.integration.dsl.SplitterSpec
50
51
import org.springframework.integration.dsl.TransformerEndpointSpec
51
52
import org.springframework.integration.dsl.WireTapSpec
52
53
import org.springframework.integration.filter.MethodInvokingSelector
@@ -710,18 +711,47 @@ class GroovyIntegrationFlowDefinition {
710
711
this
711
712
}
712
713
714
+ /**
715
+ * Populate the {@link DefaultMessageSplitter} with default options to the current integration flow position.
716
+ */
717
+ GroovyIntegrationFlowDefinition split () {
718
+ this . delegate. split()
719
+ this
720
+ }
721
+
713
722
/**
714
723
* Populate the {@link DefaultMessageSplitter} with provided options
715
724
* to the current integration flow position.
716
725
* Used with a Closure expression (optional).
717
726
* @param endpointConfigurer the {@link Consumer} to provide integration endpoint options
718
727
* and for {@link DefaultMessageSplitter}.
728
+ * @since 6.2
729
+ * @see SplitterSpec
730
+ */
731
+ GroovyIntegrationFlowDefinition splitWith (
732
+ @DelegatesTo (value = SplitterSpec , strategy = Closure .DELEGATE_FIRST )
733
+ @ClosureParams (value = SimpleType .class, options = ' org.springframework.integration.dsl.SplitterSpec' )
734
+ Closure<?> splitConfigurer ) {
735
+
736
+ this . delegate. splitWith createConfigurerIfAny(splitConfigurer)
737
+ this
738
+ }
739
+
740
+ /**
741
+ * Populate the {@link DefaultMessageSplitter} with provided options
742
+ * to the current integration flow position.
743
+ * Used with a Closure expression.
744
+ * @param endpointConfigurer the {@link Consumer} to provide integration endpoint options
745
+ * and for {@link DefaultMessageSplitter}.
746
+ * @deprecated since 6.2 in favor of {@link #splitWith(groovy.lang.Closure)}
719
747
* @see SplitterEndpointSpec
720
748
*/
749
+ @Deprecated (since = ' 6.2' , forRemoval = true )
750
+ @SuppressWarnings ([' removal' , ' deprecation' ])
721
751
GroovyIntegrationFlowDefinition split (
722
752
@DelegatesTo (value = SplitterEndpointSpec<DefaultMessageSplitter > , strategy = Closure .DELEGATE_FIRST )
723
753
@ClosureParams (value = SimpleType .class, options = ' org.springframework.integration.dsl.SplitterEndpointSpec' )
724
- Closure<?> endpointConfigurer = null ) {
754
+ Closure<?> endpointConfigurer ) {
725
755
726
756
this . delegate. split createConfigurerIfAny(endpointConfigurer)
727
757
this
@@ -733,7 +763,10 @@ class GroovyIntegrationFlowDefinition {
733
763
* @param expression the splitter SpEL expression.
734
764
* @param endpointConfigurer the {@link Consumer} to provide integration endpoint options
735
765
* and for {@link ExpressionEvaluatingSplitter}.
766
+ * @deprecated since 6.2 in favor of {@link #splitWith(groovy.lang.Closure)}
736
767
*/
768
+ @Deprecated (since = ' 6.2' , forRemoval = true )
769
+ @SuppressWarnings ([' removal' , ' deprecation' ])
737
770
GroovyIntegrationFlowDefinition split (
738
771
String expression ,
739
772
@DelegatesTo (value = SplitterEndpointSpec<ExpressionEvaluatingSplitter > , strategy = Closure .DELEGATE_FIRST )
@@ -752,7 +785,10 @@ class GroovyIntegrationFlowDefinition {
752
785
* @param methodName the method to invoke.
753
786
* @param endpointConfigurer the {@link Consumer} to provide integration endpoint options
754
787
* and for {@link MethodInvokingSplitter}.
788
+ * @deprecated since 6.2 in favor of {@link #splitWith(groovy.lang.Closure)}
755
789
*/
790
+ @Deprecated (since = ' 6.2' , forRemoval = true )
791
+ @SuppressWarnings ([' removal' , ' deprecation' ])
756
792
GroovyIntegrationFlowDefinition split (
757
793
Object service , String methodName = null ,
758
794
@DelegatesTo (value = SplitterEndpointSpec<MethodInvokingSplitter > , strategy = Closure .DELEGATE_FIRST )
@@ -772,7 +808,10 @@ class GroovyIntegrationFlowDefinition {
772
808
* @param endpointConfigurer the {@link Consumer} to provide integration endpoint options
773
809
* and for {@link MethodInvokingSplitter}.
774
810
* @see org.springframework.integration.dsl.SplitterEndpointSpec
811
+ * @deprecated since 6.2 in favor of {@link #splitWith(groovy.lang.Closure)}
775
812
*/
813
+ @Deprecated (since = ' 6.2' , forRemoval = true )
814
+ @SuppressWarnings ([' removal' , ' deprecation' ])
776
815
GroovyIntegrationFlowDefinition split (
777
816
String beanName , String methodName ,
778
817
@DelegatesTo (value = SplitterEndpointSpec<MethodInvokingSplitter > , strategy = Closure .DELEGATE_FIRST )
@@ -791,7 +830,10 @@ class GroovyIntegrationFlowDefinition {
791
830
* @param messageProcessorSpec the splitter {@link MessageProcessorSpec}.
792
831
* @param endpointConfigurer the {@link Consumer} to provide integration endpoint options
793
832
* and for {@link MethodInvokingSplitter}.
833
+ * @deprecated since 6.2 in favor of {@link #splitWith(groovy.lang.Closure)}
794
834
*/
835
+ @Deprecated (since = ' 6.2' , forRemoval = true )
836
+ @SuppressWarnings ([' removal' , ' deprecation' ])
795
837
GroovyIntegrationFlowDefinition split (
796
838
MessageProcessorSpec<?> messageProcessorSpec ,
797
839
@DelegatesTo (value = SplitterEndpointSpec<MethodInvokingSplitter > , strategy = Closure .DELEGATE_FIRST )
@@ -811,8 +853,11 @@ class GroovyIntegrationFlowDefinition {
811
853
* Conversion to this type will be attempted, if necessary.
812
854
* @param splitter the splitter {@link Function}.
813
855
* @param endpointConfigurer the {@link Consumer} to provide integration endpoint options.
814
- * @param < P > the payload type or {@code Message.class }.
856
+ * @param <P> the payload type or {@code Message.class }.
857
+ * @deprecated since 6.2 in favor of {@link #splitWith(groovy.lang.Closure)}
815
858
*/
859
+ @Deprecated (since = ' 6.2' , forRemoval = true )
860
+ @SuppressWarnings ([' removal' , ' deprecation' ])
816
861
< P> GroovyIntegrationFlowDefinition split(
817
862
Class<P> expectedType, Function<P, ?> splitter,
818
863
@DelegatesTo (value = SplitterEndpointSpec<MethodInvokingSplitter > , strategy = Closure .DELEGATE_FIRST )
@@ -830,9 +875,12 @@ class GroovyIntegrationFlowDefinition {
830
875
* flow position.
831
876
* @param splitterMessageHandlerSpec the {@link MessageHandlerSpec} to populate.
832
877
* @param endpointConfigurer the {@link Consumer} to provide integration endpoint options.
833
- * @param < S > the {@link AbstractMessageSplitter}
878
+ * @param <S> the {@link AbstractMessageSplitter}
879
+ * @deprecated since 6.2 in favor of {@link #splitWith(groovy.lang.Closure)}
834
880
* @see org.springframework.integration.dsl.SplitterEndpointSpec
835
881
*/
882
+ @Deprecated (since = ' 6.2' , forRemoval = true )
883
+ @SuppressWarnings ([' removal' , ' deprecation' ])
836
884
< S extends AbstractMessageSplitter > GroovyIntegrationFlowDefinition split(
837
885
MessageHandlerSpec<?, S> splitterMessageHandlerSpec,
838
886
@DelegatesTo (value = SplitterEndpointSpec<S> , strategy = Closure .DELEGATE_FIRST )
@@ -848,9 +896,12 @@ class GroovyIntegrationFlowDefinition {
848
896
* flow position.
849
897
* @param splitter the {@link AbstractMessageSplitter} to populate.
850
898
* @param endpointConfigurer the {@link Consumer} to provide integration endpoint options.
851
- * @param < S > the {@link AbstractMessageSplitter}
899
+ * @param <S> the {@link AbstractMessageSplitter}
900
+ * @deprecated since 6.2 in favor of {@link #splitWith(groovy.lang.Closure)}
852
901
* @see org.springframework.integration.dsl.SplitterEndpointSpec
853
902
*/
903
+ @Deprecated (since = ' 6.2' , forRemoval = true )
904
+ @SuppressWarnings ([' removal' , ' deprecation' ])
854
905
< S extends AbstractMessageSplitter > GroovyIntegrationFlowDefinition split(
855
906
S splitter,
856
907
@DelegatesTo (value = SplitterEndpointSpec<S> , strategy = Closure .DELEGATE_FIRST )
0 commit comments