@@ -67,6 +67,7 @@ import java.util.function.Consumer
67
67
*
68
68
* @since 5.3
69
69
*/
70
+ @IntegrationDsl
70
71
class KotlinIntegrationFlowDefinition (@PublishedApi internal val delegate : IntegrationFlowDefinition <* >) {
71
72
72
73
/* *
@@ -171,7 +172,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
171
172
* at the current [IntegrationFlow] chain position.
172
173
* The provided `messageChannelName` is used for the bean registration
173
174
* ([org.springframework.integration.channel.DirectChannel]), if there is no such a bean
174
- * in the application context. Otherwise the existing [MessageChannel] bean is used
175
+ * in the application context. Otherwise, the existing [MessageChannel] bean is used
175
176
* to wire integration endpoints.
176
177
*/
177
178
fun channel (messageChannelName : String ) {
@@ -297,7 +298,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
297
298
fun transform (transformer : Transformer ,
298
299
endpointConfigurer : GenericEndpointSpec <MessageTransformingHandler >.() -> Unit = {}) {
299
300
300
- this .delegate.transform(transformer, Consumer { endpointConfigurer(it) })
301
+ this .delegate.transform(transformer) { endpointConfigurer(it) }
301
302
}
302
303
303
304
/* *
@@ -331,7 +332,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
331
332
/* *
332
333
* Populate the [MessageTransformingHandler] instance for the
333
334
* [org.springframework.integration.handler.MessageProcessor] from provided [MessageProcessorSpec].
334
- * In addition accept options for the integration endpoint using [GenericEndpointSpec].
335
+ * In addition, accept options for the integration endpoint using [GenericEndpointSpec].
335
336
*/
336
337
fun transform (messageProcessorSpec : MessageProcessorSpec <* >,
337
338
endpointConfigurer : GenericEndpointSpec <MessageTransformingHandler >.() -> Unit = {}) {
@@ -341,7 +342,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
341
342
342
343
/* *
343
344
* Populate a [MessageFilter] with [MessageSelector] for the provided SpEL expression.
344
- * In addition accept options for the integration endpoint using [KotlinFilterEndpointSpec]:
345
+ * In addition, accept options for the integration endpoint using [KotlinFilterEndpointSpec]:
345
346
*/
346
347
fun filter (expression : String , filterConfigurer : KotlinFilterEndpointSpec .() -> Unit = {}) {
347
348
this .delegate.filter(expression) { filterConfigurer(KotlinFilterEndpointSpec (it)) }
@@ -367,7 +368,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
367
368
* Populate a [MessageFilter] with [MethodInvokingSelector]
368
369
* for the [MessageProcessor] from
369
370
* the provided [MessageProcessorSpec].
370
- * In addition accept options for the integration endpoint using [KotlinFilterEndpointSpec].
371
+ * In addition, accept options for the integration endpoint using [KotlinFilterEndpointSpec].
371
372
*/
372
373
fun filter (messageProcessorSpec : MessageProcessorSpec <* >,
373
374
filterConfigurer : KotlinFilterEndpointSpec .() -> Unit = {}) {
@@ -378,14 +379,13 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
378
379
379
380
/* *
380
381
* Populate a [MessageFilter] with the provided [MessageSelector].
381
- * In addition accept options for the integration endpoint using [KotlinFilterEndpointSpec].
382
+ * In addition, accept options for the integration endpoint using [KotlinFilterEndpointSpec].
382
383
* @since 5.3.1
383
384
*/
384
385
fun filter (messageSelector : MessageSelector ,
385
386
filterConfigurer : KotlinFilterEndpointSpec .() -> Unit = {}) {
386
387
387
- this .delegate.filter(Message ::class .java, messageSelector,
388
- Consumer { filterConfigurer(KotlinFilterEndpointSpec (it)) })
388
+ this .delegate.filter(Message ::class .java, messageSelector) { filterConfigurer(KotlinFilterEndpointSpec (it)) }
389
389
}
390
390
391
391
/* *
@@ -417,7 +417,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
417
417
* Populate a [ServiceActivatingHandler] for the
418
418
* [org.springframework.integration.handler.MethodInvokingMessageProcessor]
419
419
* to invoke the `method` for provided `bean` at runtime.
420
- * In addition accept options for the integration endpoint using [GenericEndpointSpec].
420
+ * In addition, accept options for the integration endpoint using [GenericEndpointSpec].
421
421
*/
422
422
fun handle (beanName : String , methodName : String? ,
423
423
endpointConfigurer : GenericEndpointSpec <ServiceActivatingHandler >.() -> Unit ) {
@@ -429,7 +429,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
429
429
* Populate a [ServiceActivatingHandler] for the
430
430
* [org.springframework.integration.handler.MethodInvokingMessageProcessor]
431
431
* to invoke the `method` for provided `bean` at runtime.
432
- * In addition accept options for the integration endpoint using [GenericEndpointSpec].
432
+ * In addition, accept options for the integration endpoint using [GenericEndpointSpec].
433
433
*/
434
434
fun handle (service : Any , methodName : String? = null) {
435
435
this .delegate.handle(service, methodName)
@@ -439,7 +439,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
439
439
* Populate a [ServiceActivatingHandler] for the
440
440
* [org.springframework.integration.handler.MethodInvokingMessageProcessor]
441
441
* to invoke the `method` for provided `bean` at runtime.
442
- * In addition accept options for the integration endpoint using [GenericEndpointSpec].
442
+ * In addition, accept options for the integration endpoint using [GenericEndpointSpec].
443
443
*/
444
444
fun handle (service : Any , methodName : String? ,
445
445
endpointConfigurer : GenericEndpointSpec <ServiceActivatingHandler >.() -> Unit ) {
@@ -460,7 +460,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
460
460
* Populate a [ServiceActivatingHandler] for the
461
461
* [org.springframework.integration.handler.MethodInvokingMessageProcessor]
462
462
* to invoke the provided [GenericHandler] at runtime.
463
- * In addition accept options for the integration endpoint using [GenericEndpointSpec].
463
+ * In addition, accept options for the integration endpoint using [GenericEndpointSpec].
464
464
*/
465
465
inline fun <reified P > handle (
466
466
crossinline handler : (P , MessageHeaders ) -> Any ,
@@ -471,7 +471,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
471
471
472
472
/* *
473
473
* Populate a [ServiceActivatingHandler] for the [MessageProcessor] from the provided [MessageProcessorSpec].
474
- * In addition accept options for the integration endpoint using [GenericEndpointSpec].
474
+ * In addition, accept options for the integration endpoint using [GenericEndpointSpec].
475
475
*/
476
476
fun handle (messageProcessorSpec : MessageProcessorSpec <* >,
477
477
endpointConfigurer : GenericEndpointSpec <ServiceActivatingHandler >.() -> Unit = {}) {
@@ -482,7 +482,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
482
482
/* *
483
483
* Populate a [ServiceActivatingHandler] for the selected protocol specific
484
484
* [MessageHandler] implementation from `Namespace Factory`:
485
- * In addition accept options for the integration endpoint using [GenericEndpointSpec].
485
+ * In addition, accept options for the integration endpoint using [GenericEndpointSpec].
486
486
*/
487
487
fun <H : MessageHandler > handle (messageHandlerSpec : MessageHandlerSpec <* , H >,
488
488
endpointConfigurer : GenericEndpointSpec <H >.() -> Unit = {}) {
@@ -501,7 +501,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
501
501
/* *
502
502
* Populate a [ServiceActivatingHandler] for the provided
503
503
* [MessageHandler] lambda.
504
- * In addition accept options for the integration endpoint using [GenericEndpointSpec].
504
+ * In addition, accept options for the integration endpoint using [GenericEndpointSpec].
505
505
*/
506
506
fun handle (messageHandler : (Message <* >) -> Unit ,
507
507
endpointConfigurer : GenericEndpointSpec <MessageHandler >.() -> Unit ) {
@@ -512,7 +512,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
512
512
/* *
513
513
* Populate a [ServiceActivatingHandler] for the provided
514
514
* [MessageHandler] implementation.
515
- * In addition accept options for the integration endpoint using [GenericEndpointSpec].
515
+ * In addition, accept options for the integration endpoint using [GenericEndpointSpec].
516
516
*/
517
517
fun <H : MessageHandler > handle (messageHandler : H , endpointConfigurer : GenericEndpointSpec <H >.() -> Unit = {}) {
518
518
this .delegate.handle(messageHandler, endpointConfigurer)
@@ -545,7 +545,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
545
545
* Populate a [MessageTransformingHandler] for
546
546
* a [org.springframework.integration.transformer.HeaderEnricher]
547
547
* using header values from provided [MapBuilder].
548
- * In addition accept options for the integration endpoint using [GenericEndpointSpec].
548
+ * In addition, accept options for the integration endpoint using [GenericEndpointSpec].
549
549
*/
550
550
fun enrichHeaders (headers : MapBuilder <* , String , Any >,
551
551
endpointConfigurer : GenericEndpointSpec <MessageTransformingHandler >.() -> Unit = {}) {
@@ -603,7 +603,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
603
603
/* *
604
604
* Populate the [MethodInvokingSplitter] to evaluate the provided
605
605
* `method` of the `bean` at runtime.
606
- * In addition accept options for the integration endpoint using [KotlinSplitterEndpointSpec].
606
+ * In addition, accept options for the integration endpoint using [KotlinSplitterEndpointSpec].
607
607
*/
608
608
fun split (service : Any , methodName : String? ,
609
609
splitterConfigurer : KotlinSplitterEndpointSpec <MethodInvokingSplitter >.() -> Unit ) {
@@ -622,7 +622,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
622
622
/* *
623
623
* Populate the [MethodInvokingSplitter] to evaluate the provided
624
624
* `method` of the `bean` at runtime.
625
- * In addition accept options for the integration endpoint using [KotlinSplitterEndpointSpec].
625
+ * In addition, accept options for the integration endpoint using [KotlinSplitterEndpointSpec].
626
626
*/
627
627
fun split (beanName : String , methodName : String? ,
628
628
splitterConfigurer : KotlinSplitterEndpointSpec <MethodInvokingSplitter >.() -> Unit ) {
@@ -632,9 +632,8 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
632
632
633
633
/* *
634
634
* Populate the [MethodInvokingSplitter] to evaluate the
635
- * [MessageProcessor] at runtime
636
- * from provided [MessageProcessorSpec].
637
- * In addition accept options for the integration endpoint using [KotlinSplitterEndpointSpec].
635
+ * [MessageProcessor] at runtime from provided [MessageProcessorSpec].
636
+ * In addition, accept options for the integration endpoint using [KotlinSplitterEndpointSpec].
638
637
*/
639
638
fun split (messageProcessorSpec : MessageProcessorSpec <* >,
640
639
splitterConfigurer : KotlinSplitterEndpointSpec <MethodInvokingSplitter >.() -> Unit = {}) {
@@ -681,7 +680,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
681
680
/* *
682
681
* Populate the [MessageTransformingHandler] for the [ClaimCheckInTransformer]
683
682
* with provided [MessageStore].
684
- * In addition accept options for the integration endpoint using [GenericEndpointSpec].
683
+ * In addition, accept options for the integration endpoint using [GenericEndpointSpec].
685
684
*/
686
685
fun claimCheckIn (messageStore : MessageStore ,
687
686
endpointConfigurer : GenericEndpointSpec <MessageTransformingHandler >.() -> Unit = {}) {
@@ -700,7 +699,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
700
699
/* *
701
700
* Populate the [MessageTransformingHandler] for the [ClaimCheckOutTransformer]
702
701
* with provided [MessageStore] and `removeMessage` flag.
703
- * In addition accept options for the integration endpoint using [GenericEndpointSpec].
702
+ * In addition, accept options for the integration endpoint using [GenericEndpointSpec].
704
703
*/
705
704
fun claimCheckOut (messageStore : MessageStore , removeMessage : Boolean ,
706
705
endpointConfigurer : GenericEndpointSpec <MessageTransformingHandler >.() -> Unit ) {
@@ -712,7 +711,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
712
711
* Populate the
713
712
* [org.springframework.integration.aggregator.ResequencingMessageHandler] with
714
713
* provided options from [ResequencerSpec].
715
- * In addition accept options for the integration endpoint using [GenericEndpointSpec].
714
+ * In addition, accept options for the integration endpoint using [GenericEndpointSpec].
716
715
*/
717
716
fun resequence (resequencer : ResequencerSpec .() -> Unit = {}) {
718
717
this .delegate.resequence(resequencer)
@@ -728,7 +727,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
728
727
729
728
/* *
730
729
* Populate the [AggregatingMessageHandler] with provided options from [AggregatorSpec].
731
- * In addition accept options for the integration endpoint using [GenericEndpointSpec].
730
+ * In addition, accept options for the integration endpoint using [GenericEndpointSpec].
732
731
*/
733
732
fun aggregate (aggregator : AggregatorSpec .() -> Unit = {}) {
734
733
this .delegate.aggregate(aggregator)
@@ -781,8 +780,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
781
780
}
782
781
783
782
/* *
784
- * Populate the [MethodInvokingRouter] for the
785
- * [MessageProcessor]
783
+ * Populate the [MethodInvokingRouter] for the [MessageProcessor]
786
784
* from the provided [MessageProcessorSpec] with default options.
787
785
*/
788
786
fun route (messageProcessorSpec : MessageProcessorSpec <* >,
@@ -810,7 +808,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
810
808
/* *
811
809
* Populate the provided [AbstractMessageRouter] implementation to the
812
810
* current integration flow position.
813
- * In addition accept options for the integration endpoint using [GenericEndpointSpec].
811
+ * In addition, accept options for the integration endpoint using [GenericEndpointSpec].
814
812
*/
815
813
fun <R : AbstractMessageRouter ?> route (router : R , endpointConfigurer : GenericEndpointSpec <R >.() -> Unit = {}) {
816
814
this .delegate.route(router, endpointConfigurer)
@@ -929,7 +927,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
929
927
* the `org.springframework.integration.handler.LoggingHandler`
930
928
* as a default logging category and SpEL expression to evaluate
931
929
* logger message at runtime against the request [Message].
932
- * When this operator is used in the end of flow, it is treated
930
+ * When this operator is used in the end of flow, it is treated
933
931
* as one-way handler without any replies to continue.
934
932
*/
935
933
fun log (level : LoggingHandler .Level , logExpression : Expression ) {
0 commit comments