
org.springframework.integration.dsl.IntegrationFlow Maven / Gradle / Ivy
/*
* Copyright 2014-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.integration.dsl;
/**
* The main Integration DSL abstraction.
*
* The {@link StandardIntegrationFlow} implementation (produced by {@link IntegrationFlowBuilder})
* represents a container for the integration components, which will be registered
* in the application context. Typically is used as {@code @Bean} definition:
*
* @Bean
* public IntegrationFlow fileReadingFlow() {
* return IntegrationFlows
* .from(s -> s.file(tmpDir.getRoot()), e -> e.poller(Pollers.fixedDelay(100)))
* .transform(Transformers.fileToString())
* .channel(MessageChannels.queue("fileReadingResultChannel"))
* .get();
* }
*
*
* Also this interface can be implemented directly to encapsulate the integration logic
* in the target service:
*
* @Component
* public class MyFlow implements IntegrationFlow {
*
* @Override
* public void configure(IntegrationFlowDefinition<?> f) {
* f.<String, String>transform(String::toUpperCase);
* }
*
* }
*
*
* @author Artem Bilan
*
* @see IntegrationFlowBuilder
* @see StandardIntegrationFlow
* @see IntegrationFlowAdapter
*/
public interface IntegrationFlow {
void configure(IntegrationFlowDefinition> flow);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy