@@ -67,6 +67,7 @@ import java.util.function.Consumer
6767 *
6868 * @since 5.3
6969 */
70+ @IntegrationDsl
7071class KotlinIntegrationFlowDefinition (@PublishedApi internal val delegate : IntegrationFlowDefinition <* >) {
7172
7273 /* *
@@ -171,7 +172,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
171172 * at the current [IntegrationFlow] chain position.
172173 * The provided `messageChannelName` is used for the bean registration
173174 * ([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
175176 * to wire integration endpoints.
176177 */
177178 fun channel (messageChannelName : String ) {
@@ -297,7 +298,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
297298 fun transform (transformer : Transformer ,
298299 endpointConfigurer : GenericEndpointSpec <MessageTransformingHandler >.() -> Unit = {}) {
299300
300- this .delegate.transform(transformer, Consumer { endpointConfigurer(it) })
301+ this .delegate.transform(transformer) { endpointConfigurer(it) }
301302 }
302303
303304 /* *
@@ -331,7 +332,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
331332 /* *
332333 * Populate the [MessageTransformingHandler] instance for the
333334 * [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].
335336 */
336337 fun transform (messageProcessorSpec : MessageProcessorSpec <* >,
337338 endpointConfigurer : GenericEndpointSpec <MessageTransformingHandler >.() -> Unit = {}) {
@@ -341,7 +342,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
341342
342343 /* *
343344 * 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]:
345346 */
346347 fun filter (expression : String , filterConfigurer : KotlinFilterEndpointSpec .() -> Unit = {}) {
347348 this .delegate.filter(expression) { filterConfigurer(KotlinFilterEndpointSpec (it)) }
@@ -367,7 +368,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
367368 * Populate a [MessageFilter] with [MethodInvokingSelector]
368369 * for the [MessageProcessor] from
369370 * 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].
371372 */
372373 fun filter (messageProcessorSpec : MessageProcessorSpec <* >,
373374 filterConfigurer : KotlinFilterEndpointSpec .() -> Unit = {}) {
@@ -378,14 +379,13 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
378379
379380 /* *
380381 * 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].
382383 * @since 5.3.1
383384 */
384385 fun filter (messageSelector : MessageSelector ,
385386 filterConfigurer : KotlinFilterEndpointSpec .() -> Unit = {}) {
386387
387- this .delegate.filter(Message ::class .java, messageSelector,
388- Consumer { filterConfigurer(KotlinFilterEndpointSpec (it)) })
388+ this .delegate.filter(Message ::class .java, messageSelector) { filterConfigurer(KotlinFilterEndpointSpec (it)) }
389389 }
390390
391391 /* *
@@ -417,7 +417,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
417417 * Populate a [ServiceActivatingHandler] for the
418418 * [org.springframework.integration.handler.MethodInvokingMessageProcessor]
419419 * 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].
421421 */
422422 fun handle (beanName : String , methodName : String? ,
423423 endpointConfigurer : GenericEndpointSpec <ServiceActivatingHandler >.() -> Unit ) {
@@ -429,7 +429,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
429429 * Populate a [ServiceActivatingHandler] for the
430430 * [org.springframework.integration.handler.MethodInvokingMessageProcessor]
431431 * 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].
433433 */
434434 fun handle (service : Any , methodName : String? = null) {
435435 this .delegate.handle(service, methodName)
@@ -439,7 +439,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
439439 * Populate a [ServiceActivatingHandler] for the
440440 * [org.springframework.integration.handler.MethodInvokingMessageProcessor]
441441 * 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].
443443 */
444444 fun handle (service : Any , methodName : String? ,
445445 endpointConfigurer : GenericEndpointSpec <ServiceActivatingHandler >.() -> Unit ) {
@@ -460,7 +460,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
460460 * Populate a [ServiceActivatingHandler] for the
461461 * [org.springframework.integration.handler.MethodInvokingMessageProcessor]
462462 * 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].
464464 */
465465 inline fun <reified P > handle (
466466 crossinline handler : (P , MessageHeaders ) -> Any ,
@@ -471,7 +471,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
471471
472472 /* *
473473 * 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].
475475 */
476476 fun handle (messageProcessorSpec : MessageProcessorSpec <* >,
477477 endpointConfigurer : GenericEndpointSpec <ServiceActivatingHandler >.() -> Unit = {}) {
@@ -482,7 +482,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
482482 /* *
483483 * Populate a [ServiceActivatingHandler] for the selected protocol specific
484484 * [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].
486486 */
487487 fun <H : MessageHandler > handle (messageHandlerSpec : MessageHandlerSpec <* , H >,
488488 endpointConfigurer : GenericEndpointSpec <H >.() -> Unit = {}) {
@@ -501,7 +501,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
501501 /* *
502502 * Populate a [ServiceActivatingHandler] for the provided
503503 * [MessageHandler] lambda.
504- * In addition accept options for the integration endpoint using [GenericEndpointSpec].
504+ * In addition, accept options for the integration endpoint using [GenericEndpointSpec].
505505 */
506506 fun handle (messageHandler : (Message <* >) -> Unit ,
507507 endpointConfigurer : GenericEndpointSpec <MessageHandler >.() -> Unit ) {
@@ -512,7 +512,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
512512 /* *
513513 * Populate a [ServiceActivatingHandler] for the provided
514514 * [MessageHandler] implementation.
515- * In addition accept options for the integration endpoint using [GenericEndpointSpec].
515+ * In addition, accept options for the integration endpoint using [GenericEndpointSpec].
516516 */
517517 fun <H : MessageHandler > handle (messageHandler : H , endpointConfigurer : GenericEndpointSpec <H >.() -> Unit = {}) {
518518 this .delegate.handle(messageHandler, endpointConfigurer)
@@ -545,7 +545,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
545545 * Populate a [MessageTransformingHandler] for
546546 * a [org.springframework.integration.transformer.HeaderEnricher]
547547 * 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].
549549 */
550550 fun enrichHeaders (headers : MapBuilder <* , String , Any >,
551551 endpointConfigurer : GenericEndpointSpec <MessageTransformingHandler >.() -> Unit = {}) {
@@ -603,7 +603,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
603603 /* *
604604 * Populate the [MethodInvokingSplitter] to evaluate the provided
605605 * `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].
607607 */
608608 fun split (service : Any , methodName : String? ,
609609 splitterConfigurer : KotlinSplitterEndpointSpec <MethodInvokingSplitter >.() -> Unit ) {
@@ -622,7 +622,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
622622 /* *
623623 * Populate the [MethodInvokingSplitter] to evaluate the provided
624624 * `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].
626626 */
627627 fun split (beanName : String , methodName : String? ,
628628 splitterConfigurer : KotlinSplitterEndpointSpec <MethodInvokingSplitter >.() -> Unit ) {
@@ -632,9 +632,8 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
632632
633633 /* *
634634 * 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].
638637 */
639638 fun split (messageProcessorSpec : MessageProcessorSpec <* >,
640639 splitterConfigurer : KotlinSplitterEndpointSpec <MethodInvokingSplitter >.() -> Unit = {}) {
@@ -681,7 +680,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
681680 /* *
682681 * Populate the [MessageTransformingHandler] for the [ClaimCheckInTransformer]
683682 * 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].
685684 */
686685 fun claimCheckIn (messageStore : MessageStore ,
687686 endpointConfigurer : GenericEndpointSpec <MessageTransformingHandler >.() -> Unit = {}) {
@@ -700,7 +699,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
700699 /* *
701700 * Populate the [MessageTransformingHandler] for the [ClaimCheckOutTransformer]
702701 * 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].
704703 */
705704 fun claimCheckOut (messageStore : MessageStore , removeMessage : Boolean ,
706705 endpointConfigurer : GenericEndpointSpec <MessageTransformingHandler >.() -> Unit ) {
@@ -712,7 +711,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
712711 * Populate the
713712 * [org.springframework.integration.aggregator.ResequencingMessageHandler] with
714713 * 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].
716715 */
717716 fun resequence (resequencer : ResequencerSpec .() -> Unit = {}) {
718717 this .delegate.resequence(resequencer)
@@ -728,7 +727,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
728727
729728 /* *
730729 * 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].
732731 */
733732 fun aggregate (aggregator : AggregatorSpec .() -> Unit = {}) {
734733 this .delegate.aggregate(aggregator)
@@ -781,8 +780,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
781780 }
782781
783782 /* *
784- * Populate the [MethodInvokingRouter] for the
785- * [MessageProcessor]
783+ * Populate the [MethodInvokingRouter] for the [MessageProcessor]
786784 * from the provided [MessageProcessorSpec] with default options.
787785 */
788786 fun route (messageProcessorSpec : MessageProcessorSpec <* >,
@@ -810,7 +808,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
810808 /* *
811809 * Populate the provided [AbstractMessageRouter] implementation to the
812810 * 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].
814812 */
815813 fun <R : AbstractMessageRouter ?> route (router : R , endpointConfigurer : GenericEndpointSpec <R >.() -> Unit = {}) {
816814 this .delegate.route(router, endpointConfigurer)
@@ -929,7 +927,7 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
929927 * the `org.springframework.integration.handler.LoggingHandler`
930928 * as a default logging category and SpEL expression to evaluate
931929 * 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
933931 * as one-way handler without any replies to continue.
934932 */
935933 fun log (level : LoggingHandler .Level , logExpression : Expression ) {
0 commit comments