@@ -668,9 +668,9 @@ public <P> B convert(Class<P> payloadType) {
668
668
669
669
/**
670
670
* Populate the {@link MessageTransformingHandler} instance for the provided
671
- * {@link GenericTransformer} for the specific {@code payloadType } to convert at
671
+ * {@link GenericTransformer} for the specific {@code expectedType } to convert at
672
672
* runtime.
673
- * @param payloadType the {@link Class} for expected payload type. It can also be
673
+ * @param expectedType the {@link Class} for expected payload type. It can also be
674
674
* {@code Message.class} if you wish to access the entire message in the transformer.
675
675
* Conversion to this type will be attempted, if necessary.
676
676
* @param genericTransformer the {@link GenericTransformer} to populate.
@@ -680,14 +680,14 @@ public <P> B convert(Class<P> payloadType) {
680
680
* @see MethodInvokingTransformer
681
681
* @see LambdaMessageProcessor
682
682
*/
683
- public <P , T > B transform (Class <P > payloadType , GenericTransformer <P , T > genericTransformer ) {
684
- return transform (payloadType , genericTransformer , null );
683
+ public <P , T > B transform (Class <P > expectedType , GenericTransformer <P , T > genericTransformer ) {
684
+ return transform (expectedType , genericTransformer , null );
685
685
}
686
686
687
687
/**
688
688
* Populate the {@link MessageTransformingHandler} instance
689
689
* for the provided {@code payloadType} to convert at runtime.
690
- * In addition accept options for the integration endpoint using {@link GenericEndpointSpec}.
690
+ * In addition, accept options for the integration endpoint using {@link GenericEndpointSpec}.
691
691
* @param payloadType the {@link Class} for expected payload type.
692
692
* @param endpointConfigurer the {@link Consumer} to provide integration endpoint options.
693
693
* @param <P> the payload type - 'transform to'.
@@ -706,9 +706,9 @@ public <P> B convert(Class<P> payloadType,
706
706
707
707
/**
708
708
* Populate the {@link MessageTransformingHandler} instance for the provided {@link GenericTransformer}
709
- * for the specific {@code payloadType } to convert at runtime.
709
+ * for the specific {@code expectedType } to convert at runtime.
710
710
* In addition accept options for the integration endpoint using {@link GenericEndpointSpec}.
711
- * @param payloadType the {@link Class} for expected payload type. It can also be
711
+ * @param expectedType the {@link Class} for expected payload type. It can also be
712
712
* {@code Message.class} if you wish to access the entire message in the transformer.
713
713
* Conversion to this type will be attempted, if necessary.
714
714
* @param genericTransformer the {@link GenericTransformer} to populate.
@@ -720,13 +720,13 @@ public <P> B convert(Class<P> payloadType,
720
720
* @see LambdaMessageProcessor
721
721
* @see GenericEndpointSpec
722
722
*/
723
- public <P , T > B transform (Class <P > payloadType , GenericTransformer <P , T > genericTransformer ,
723
+ public <P , T > B transform (Class <P > expectedType , GenericTransformer <P , T > genericTransformer ,
724
724
Consumer <GenericEndpointSpec <MessageTransformingHandler >> endpointConfigurer ) {
725
725
726
726
Assert .notNull (genericTransformer , "'genericTransformer' must not be null" );
727
727
Transformer transformer = genericTransformer instanceof Transformer ? (Transformer ) genericTransformer :
728
728
(ClassUtils .isLambda (genericTransformer .getClass ())
729
- ? new MethodInvokingTransformer (new LambdaMessageProcessor (genericTransformer , payloadType ))
729
+ ? new MethodInvokingTransformer (new LambdaMessageProcessor (genericTransformer , expectedType ))
730
730
: new MethodInvokingTransformer (genericTransformer , ClassUtils .TRANSFORMER_TRANSFORM_METHOD ));
731
731
return addComponent (transformer )
732
732
.handle (new MessageTransformingHandler (transformer ), endpointConfigurer );
@@ -840,35 +840,35 @@ public B filter(MessageProcessorSpec<?> messageProcessorSpec, Consumer<FilterEnd
840
840
/**
841
841
* Populate a {@link MessageFilter} with {@link MethodInvokingSelector}
842
842
* for the provided {@link GenericSelector}.
843
- * Typically used with a Java 8 Lambda expression:
843
+ * Typically, used with a Java 8 Lambda expression:
844
844
* <pre class="code">
845
845
* {@code
846
846
* .filter(Date.class, p -> p.after(new Date()))
847
847
* }
848
848
* </pre>
849
- * @param payloadType the {@link Class} for expected payload type. It can also be
849
+ * @param expectedType the {@link Class} for expected payload type. It can also be
850
850
* {@code Message.class} if you wish to access the entire message in the selector.
851
851
* Conversion to this type will be attempted, if necessary.
852
852
* @param genericSelector the {@link GenericSelector} to use.
853
853
* @param <P> the source payload type or {@code Message.class}.
854
854
* @return the current {@link BaseIntegrationFlowDefinition}.
855
855
* @see LambdaMessageProcessor
856
856
*/
857
- public <P > B filter (Class <P > payloadType , GenericSelector <P > genericSelector ) {
858
- return filter (payloadType , genericSelector , null );
857
+ public <P > B filter (Class <P > expectedType , GenericSelector <P > genericSelector ) {
858
+ return filter (expectedType , genericSelector , null );
859
859
}
860
860
861
861
/**
862
862
* Populate a {@link MessageFilter} with {@link MethodInvokingSelector}
863
863
* for the provided {@link GenericSelector}.
864
- * In addition accept options for the integration endpoint using {@link FilterEndpointSpec}.
865
- * Typically used with a Java 8 Lambda expression:
864
+ * In addition, accept options for the integration endpoint using {@link FilterEndpointSpec}.
865
+ * Typically, used with a Java 8 Lambda expression:
866
866
* <pre class="code">
867
867
* {@code
868
868
* .filter(Date.class, p -> p.after(new Date()), e -> e.autoStartup(false))
869
869
* }
870
870
* </pre>
871
- * @param payloadType the {@link Class} for expected payload type. It can also be
871
+ * @param expectedType the {@link Class} for expected payload type. It can also be
872
872
* {@code Message.class} if you wish to access the entire message in the selector.
873
873
* Conversion to this type will be attempted, if necessary.
874
874
* @param genericSelector the {@link GenericSelector} to use.
@@ -878,13 +878,13 @@ public <P> B filter(Class<P> payloadType, GenericSelector<P> genericSelector) {
878
878
* @see LambdaMessageProcessor
879
879
* @see FilterEndpointSpec
880
880
*/
881
- public <P > B filter (Class <P > payloadType , GenericSelector <P > genericSelector ,
881
+ public <P > B filter (Class <P > expectedType , GenericSelector <P > genericSelector ,
882
882
Consumer <FilterEndpointSpec > endpointConfigurer ) {
883
883
884
884
Assert .notNull (genericSelector , "'genericSelector' must not be null" );
885
885
MessageSelector selector = genericSelector instanceof MessageSelector ? (MessageSelector ) genericSelector :
886
886
(ClassUtils .isLambda (genericSelector .getClass ())
887
- ? new MethodInvokingSelector (new LambdaMessageProcessor (genericSelector , payloadType ))
887
+ ? new MethodInvokingSelector (new LambdaMessageProcessor (genericSelector , expectedType ))
888
888
: new MethodInvokingSelector (genericSelector , ClassUtils .SELECTOR_ACCEPT_METHOD ));
889
889
return this .register (new FilterEndpointSpec (new MessageFilter (selector )), endpointConfigurer );
890
890
}
@@ -1001,22 +1001,22 @@ public B handle(Object service, String methodName,
1001
1001
* Populate a {@link ServiceActivatingHandler} for the
1002
1002
* {@link org.springframework.integration.handler.MethodInvokingMessageProcessor}
1003
1003
* to invoke the provided {@link GenericHandler} at runtime.
1004
- * Typically used with a Java 8 Lambda expression:
1004
+ * Typically, used with a Java 8 Lambda expression:
1005
1005
* <pre class="code">
1006
1006
* {@code
1007
1007
* .handle(Integer.class, (p, h) -> p / 2)
1008
1008
* }
1009
1009
* </pre>
1010
- * @param payloadType the {@link Class} for expected payload type. It can also be
1010
+ * @param expectedType the {@link Class} for expected payload type. It can also be
1011
1011
* {@code Message.class} if you wish to access the entire message in the handler.
1012
1012
* Conversion to this type will be attempted, if necessary.
1013
1013
* @param handler the handler to invoke.
1014
1014
* @param <P> the payload type to expect, or {@code Message.class}.
1015
1015
* @return the current {@link BaseIntegrationFlowDefinition}.
1016
1016
* @see LambdaMessageProcessor
1017
1017
*/
1018
- public <P > B handle (Class <P > payloadType , GenericHandler <P > handler ) {
1019
- return handle (payloadType , handler , null );
1018
+ public <P > B handle (Class <P > expectedType , GenericHandler <P > handler ) {
1019
+ return handle (expectedType , handler , null );
1020
1020
}
1021
1021
1022
1022
/**
@@ -1030,7 +1030,7 @@ public <P> B handle(Class<P> payloadType, GenericHandler<P> handler) {
1030
1030
* .handle(Integer.class, (p, h) -> p / 2, e -> e.autoStartup(false))
1031
1031
* }
1032
1032
* </pre>
1033
- * @param payloadType the {@link Class} for expected payload type. It can also be
1033
+ * @param expectedType the {@link Class} for expected payload type. It can also be
1034
1034
* {@code Message.class} if you wish to access the entire message in the handler.
1035
1035
* Conversion to this type will be attempted, if necessary.
1036
1036
* @param handler the handler to invoke.
@@ -1039,15 +1039,15 @@ public <P> B handle(Class<P> payloadType, GenericHandler<P> handler) {
1039
1039
* @return the current {@link BaseIntegrationFlowDefinition}.
1040
1040
* @see LambdaMessageProcessor
1041
1041
*/
1042
- public <P > B handle (Class <P > payloadType , GenericHandler <P > handler ,
1042
+ public <P > B handle (Class <P > expectedType , GenericHandler <P > handler ,
1043
1043
Consumer <GenericEndpointSpec <ServiceActivatingHandler >> endpointConfigurer ) {
1044
1044
1045
1045
ServiceActivatingHandler serviceActivatingHandler ;
1046
1046
if (ClassUtils .isLambda (handler .getClass ())) {
1047
- serviceActivatingHandler = new ServiceActivatingHandler (new LambdaMessageProcessor (handler , payloadType ));
1047
+ serviceActivatingHandler = new ServiceActivatingHandler (new LambdaMessageProcessor (handler , expectedType ));
1048
1048
}
1049
- else if (payloadType != null ) {
1050
- return handle (payloadType , handler ::handle , endpointConfigurer );
1049
+ else if (expectedType != null ) {
1050
+ return handle (expectedType , handler ::handle , endpointConfigurer );
1051
1051
}
1052
1052
else {
1053
1053
serviceActivatingHandler = new ServiceActivatingHandler (handler , ClassUtils .HANDLER_HANDLE_METHOD );
@@ -1488,7 +1488,7 @@ public B split(MessageProcessorSpec<?> messageProcessorSpec,
1488
1488
/**
1489
1489
* Populate the {@link MethodInvokingSplitter} to evaluate the provided
1490
1490
* {@link Function} at runtime.
1491
- * Typically used with a Java 8 Lambda expression:
1491
+ * Typically, used with a Java 8 Lambda expression:
1492
1492
* <pre class="code">
1493
1493
* {@code
1494
1494
* .split(String.class, p ->
@@ -1499,23 +1499,23 @@ public B split(MessageProcessorSpec<?> messageProcessorSpec,
1499
1499
* new Foo(rs.getInt(1), rs.getString(2)))))
1500
1500
* }
1501
1501
* </pre>
1502
- * @param payloadType the {@link Class} for expected payload type. It can also be
1502
+ * @param expectedType the {@link Class} for expected payload type. It can also be
1503
1503
* {@code Message.class} if you wish to access the entire message in the splitter.
1504
1504
* Conversion to this type will be attempted, if necessary.
1505
1505
* @param splitter the splitter {@link Function}.
1506
1506
* @param <P> the payload type or {@code Message.class}.
1507
1507
* @return the current {@link BaseIntegrationFlowDefinition}.
1508
1508
* @see LambdaMessageProcessor
1509
1509
*/
1510
- public <P > B split (Class <P > payloadType , Function <P , ?> splitter ) {
1511
- return split (payloadType , splitter , null );
1510
+ public <P > B split (Class <P > expectedType , Function <P , ?> splitter ) {
1511
+ return split (expectedType , splitter , null );
1512
1512
}
1513
1513
1514
1514
/**
1515
1515
* Populate the {@link MethodInvokingSplitter} to evaluate the provided
1516
1516
* {@link Function} at runtime.
1517
- * In addition accept options for the integration endpoint using {@link GenericEndpointSpec}.
1518
- * Typically used with a Java 8 Lambda expression:
1517
+ * In addition, accept options for the integration endpoint using {@link GenericEndpointSpec}.
1518
+ * Typically, used with a Java 8 Lambda expression:
1519
1519
* <pre class="code">
1520
1520
* {@code
1521
1521
* .split(String.class, p ->
@@ -1527,7 +1527,7 @@ public <P> B split(Class<P> payloadType, Function<P, ?> splitter) {
1527
1527
* , e -> e.applySequence(false))
1528
1528
* }
1529
1529
* </pre>
1530
- * @param payloadType the {@link Class} for expected payload type. It can also be
1530
+ * @param expectedType the {@link Class} for expected payload type. It can also be
1531
1531
* {@code Message.class} if you wish to access the entire message in the splitter.
1532
1532
* Conversion to this type will be attempted, if necessary.
1533
1533
* @param splitter the splitter {@link Function}.
@@ -1537,12 +1537,12 @@ public <P> B split(Class<P> payloadType, Function<P, ?> splitter) {
1537
1537
* @see LambdaMessageProcessor
1538
1538
* @see SplitterEndpointSpec
1539
1539
*/
1540
- public <P > B split (Class <P > payloadType , Function <P , ?> splitter ,
1540
+ public <P > B split (Class <P > expectedType , Function <P , ?> splitter ,
1541
1541
Consumer <SplitterEndpointSpec <MethodInvokingSplitter >> endpointConfigurer ) {
1542
1542
1543
1543
MethodInvokingSplitter split =
1544
1544
ClassUtils .isLambda (splitter .getClass ())
1545
- ? new MethodInvokingSplitter (new LambdaMessageProcessor (splitter , payloadType ))
1545
+ ? new MethodInvokingSplitter (new LambdaMessageProcessor (splitter , expectedType ))
1546
1546
: new MethodInvokingSplitter (splitter , ClassUtils .FUNCTION_APPLY_METHOD );
1547
1547
return split (split , endpointConfigurer );
1548
1548
}
@@ -1880,24 +1880,24 @@ public <T> B route(String expression, Consumer<RouterSpec<T, ExpressionEvaluatin
1880
1880
* .route(Integer.class, p -> p % 2 == 0)
1881
1881
* }
1882
1882
* </pre>
1883
- * @param payloadType the {@link Class} for expected payload type. It can also be
1884
- * {@code Message.class} if you wish to access the entire message in the splitter .
1883
+ * @param expectedType the {@link Class} for expected payload type. It can also be
1884
+ * {@code Message.class} if you wish to access the entire message in the router .
1885
1885
* Conversion to this type will be attempted, if necessary.
1886
1886
* @param router the {@link Function} to use.
1887
1887
* @param <S> the source payload type or {@code Message.class}.
1888
1888
* @param <T> the target result type.
1889
1889
* @return the current {@link BaseIntegrationFlowDefinition}.
1890
1890
* @see LambdaMessageProcessor
1891
1891
*/
1892
- public <S , T > B route (Class <S > payloadType , Function <S , T > router ) {
1893
- return route (payloadType , router , null );
1892
+ public <S , T > B route (Class <S > expectedType , Function <S , T > router ) {
1893
+ return route (expectedType , router , null );
1894
1894
}
1895
1895
1896
1896
/**
1897
1897
* Populate the {@link MethodInvokingRouter} for provided {@link Function}
1898
1898
* and payload type and options from {@link RouterSpec}.
1899
- * In addition accept options for the integration endpoint using {@link GenericEndpointSpec}.
1900
- * Typically used with a Java 8 Lambda expression:
1899
+ * In addition, accept options for the integration endpoint using {@link GenericEndpointSpec}.
1900
+ * Typically, used with a Java 8 Lambda expression:
1901
1901
* <pre class="code">
1902
1902
* {@code
1903
1903
* .route(Integer.class, p -> p % 2 == 0,
@@ -1907,8 +1907,8 @@ public <S, T> B route(Class<S> payloadType, Function<S, T> router) {
1907
1907
* .applySequence(false))
1908
1908
* }
1909
1909
* </pre>
1910
- * @param payloadType the {@link Class} for expected payload type. It can also be
1911
- * {@code Message.class} if you wish to access the entire message in the splitter .
1910
+ * @param expectedType the {@link Class} for expected payload type. It can also be
1911
+ * {@code Message.class} if you wish to access the entire message in the router .
1912
1912
* Conversion to this type will be attempted, if necessary.
1913
1913
* @param router the {@link Function} to use.
1914
1914
* @param routerConfigurer the {@link Consumer} to provide {@link MethodInvokingRouter} options.
@@ -1917,12 +1917,12 @@ public <S, T> B route(Class<S> payloadType, Function<S, T> router) {
1917
1917
* @return the current {@link BaseIntegrationFlowDefinition}.
1918
1918
* @see LambdaMessageProcessor
1919
1919
*/
1920
- public <P , T > B route (Class <P > payloadType , Function <P , T > router ,
1920
+ public <P , T > B route (Class <P > expectedType , Function <P , T > router ,
1921
1921
Consumer <RouterSpec <T , MethodInvokingRouter >> routerConfigurer ) {
1922
1922
1923
1923
MethodInvokingRouter methodInvokingRouter =
1924
1924
ClassUtils .isLambda (router .getClass ())
1925
- ? new MethodInvokingRouter (new LambdaMessageProcessor (router , payloadType ))
1925
+ ? new MethodInvokingRouter (new LambdaMessageProcessor (router , expectedType ))
1926
1926
: new MethodInvokingRouter (router , ClassUtils .FUNCTION_APPLY_METHOD );
1927
1927
return route (new RouterSpec <>(methodInvokingRouter ), routerConfigurer );
1928
1928
}
0 commit comments