@@ -50,6 +50,7 @@ import org.springframework.integration.transformer.ClaimCheckOutTransformer
5050import org.springframework.integration.transformer.HeaderFilter
5151import org.springframework.integration.transformer.MessageTransformingHandler
5252import org.springframework.integration.transformer.MethodInvokingTransformer
53+ import org.springframework.integration.transformer.Transformer
5354import org.springframework.messaging.Message
5455import org.springframework.messaging.MessageChannel
5556import org.springframework.messaging.MessageHandler
@@ -287,8 +288,20 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
287288 this .delegate.controlBus(endpointConfigurer)
288289 }
289290
291+
292+ /* *
293+ * Populate the [Transformer] EI Pattern specific [MessageHandler] implementation
294+ * for the provided `Transformer` instance.
295+ * @since 5.3.1
296+ */
297+ fun transform (transformer : Transformer ,
298+ endpointConfigurer : GenericEndpointSpec <MessageTransformingHandler >.() -> Unit = {}) {
299+
300+ this .delegate.transform(transformer, Consumer { endpointConfigurer(it) })
301+ }
302+
290303 /* *
291- * Populate the ` Transformer` EI Pattern specific [MessageHandler] implementation
304+ * Populate the [ Transformer] EI Pattern specific [MessageHandler] implementation
292305 * for the SpEL [Expression].
293306 */
294307 fun transform (expression : String ,
@@ -298,15 +311,15 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
298311 }
299312
300313 /* *
301- * Populate the ` MessageTransformingHandler` for the [MethodInvokingTransformer]
314+ * Populate the [ MessageTransformingHandler] for the [MethodInvokingTransformer]
302315 * to invoke the service method at runtime.
303316 */
304317 fun transform (service : Any , methodName : String? = null) {
305318 this .delegate.transform(service, methodName)
306319 }
307320
308321 /* *
309- * Populate the ` MessageTransformingHandler` for the [MethodInvokingTransformer]
322+ * Populate the [ MessageTransformingHandler] for the [MethodInvokingTransformer]
310323 * to invoke the service method at runtime.
311324 */
312325 fun transform (service : Any , methodName : String? ,
@@ -358,9 +371,23 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
358371 */
359372 fun filter (messageProcessorSpec : MessageProcessorSpec <* >,
360373 filterConfigurer : KotlinFilterEndpointSpec .() -> Unit = {}) {
374+
361375 this .delegate.filter(messageProcessorSpec) { filterConfigurer(KotlinFilterEndpointSpec (it)) }
362376 }
363377
378+
379+ /* *
380+ * Populate a [MessageFilter] with the provided [MessageSelector].
381+ * In addition accept options for the integration endpoint using [KotlinFilterEndpointSpec].
382+ * @since 5.3.1
383+ */
384+ fun filter (messageSelector : MessageSelector ,
385+ filterConfigurer : KotlinFilterEndpointSpec .() -> Unit = {}) {
386+
387+ this .delegate.filter(Message ::class .java, messageSelector,
388+ Consumer { filterConfigurer(KotlinFilterEndpointSpec (it)) })
389+ }
390+
364391 /* *
365392 * Populate a [ServiceActivatingHandler] for the selected protocol specific
366393 * [MessageHandler] implementation from `Namespace Factory`:
0 commit comments