Class IntegrationFlowAdapter
java.lang.Object
org.springframework.integration.dsl.IntegrationFlowAdapter
- All Implemented Interfaces:
- Aware,- BeanNameAware,- Lifecycle,- Phased,- SmartLifecycle,- ComponentSourceAware,- IntegrationFlow,- ManageableLifecycle,- ManageableSmartLifecycle
public abstract class IntegrationFlowAdapter
extends Object
implements IntegrationFlow, ManageableSmartLifecycle, ComponentSourceAware
The base 
Adapter class for the IntegrationFlow abstraction.
 Requires the implementation for the buildFlow() method to produce
 IntegrationFlowDefinition using one of from(java.lang.String) support methods.
 Typically, is used for target service implementation:
  @Component
  public class MyFlowAdapter extends IntegrationFlowAdapter {
     @Autowired
     private ConnectionFactory rabbitConnectionFactory;
     @Override
     protected IntegrationFlowDefinition<?> buildFlow() {
          return from(Amqp.inboundAdapter(this.rabbitConnectionFactory, "myQueue"))
                   .<String, String>transform(String::toLowerCase)
                   .channel(c -> c.queue("myFlowAdapterOutput"));
     }
 }
 - Since:
- 5.0
- Author:
- Artem Bilan
- 
Field SummaryFields inherited from interface org.springframework.context.SmartLifecycleDEFAULT_PHASE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected abstract IntegrationFlowDefinition<?> final voidconfigure(IntegrationFlowDefinition<?> flow) The callback-based function to declare the chain of EIP-methods to configure an integration flow with the providedIntegrationFlowDefinition.protected IntegrationFlowBuilderprotected IntegrationFlowBuilderfrom(Class<?> serviceInterface, Consumer<GatewayProxySpec> endpointConfigurer) Start a flow from a proxy for the service interface.protected IntegrationFlowDefinition<?> protected IntegrationFlowDefinition<?> protected IntegrationFlowBuilderprotected IntegrationFlowDefinition<?> from(MessageSource<?> messageSource) protected IntegrationFlowDefinition<?> from(MessageSource<?> messageSource, Consumer<SourcePollingChannelAdapterSpec> endpointConfigurer) protected IntegrationFlowDefinition<?> from(MessageChannelSpec<?, ?> messageChannelSpec) protected IntegrationFlowDefinition<?> from(MessageProducerSpec<?, ?> messageProducerSpec) protected IntegrationFlowDefinition<?> from(MessageSourceSpec<?, ? extends MessageSource<?>> messageSourceSpec) protected IntegrationFlowDefinition<?> from(MessageSourceSpec<?, ? extends MessageSource<?>> messageSourceSpec, Consumer<SourcePollingChannelAdapterSpec> endpointConfigurer) protected IntegrationFlowDefinition<?> from(MessagingGatewaySpec<?, ?> inboundGatewaySpec) protected IntegrationFlowDefinition<?> from(MessageProducerSupport messageProducer) protected IntegrationFlowDefinition<?> from(MessagingGatewaySupport inboundGateway) protected IntegrationFlowDefinition<?> from(MessageChannel messageChannel) protected <T> IntegrationFlowBuilderfromSupplier(Supplier<T> messageSource) protected <T> IntegrationFlowBuilderfromSupplier(Supplier<T> messageSource, Consumer<SourcePollingChannelAdapterSpec> endpointConfigurer) Return the bean name populated by theBeanNameAware.setBeanName(String).Return a human-readable description of this bean.Return the configuration sourceObjectfor this bean (maybenull).Return the firstMessageChannelcomponent which is essentially a flow input channel.Return a map of integration components managed by this flow (if any).intgetPhase()booleanbooleanvoidsetBeanName(String name) voidsetComponentDescription(String description) Set a human-readable description of this bean.voidsetComponentSource(Object source) Set a configuration sourceObjectfor this bean definition.voidstart()voidstop()void
- 
Constructor Details- 
IntegrationFlowAdapterpublic IntegrationFlowAdapter()
 
- 
- 
Method Details- 
setBeanName- Specified by:
- setBeanNamein interface- BeanNameAware
 
- 
getBeanNameDescription copied from interface:ComponentSourceAwareReturn the bean name populated by theBeanNameAware.setBeanName(String).- Specified by:
- getBeanNamein interface- ComponentSourceAware
- Returns:
- the bean name.
 
- 
setComponentSourceDescription copied from interface:ComponentSourceAwareSet a configuration sourceObjectfor this bean definition. For normalBeanDefinitionthis is supplied by application context automatically. Could be useful when bean is registered at runtime viaSingletonBeanRegistry.registerSingleton(String, Object)- Specified by:
- setComponentSourcein interface- ComponentSourceAware
- Parameters:
- source- the configuration source
 
- 
getComponentSourceDescription copied from interface:ComponentSourceAwareReturn the configuration sourceObjectfor this bean (maybenull). Usually (if not set explicitly) aBeanMetadataElement.getSource().- Specified by:
- getComponentSourcein interface- ComponentSourceAware
- Returns:
- the configuration source for the bean (if any).
 
- 
setComponentDescriptionDescription copied from interface:ComponentSourceAwareSet a human-readable description of this bean. For normal bean definition aBeanDefinition.getDescription()is used.- Specified by:
- setComponentDescriptionin interface- ComponentSourceAware
- Parameters:
- description- the bean description
 
- 
getComponentDescriptionDescription copied from interface:ComponentSourceAwareReturn a human-readable description of this bean. Usually (if not set explicitly) aBeanDefinition.getDescription().- Specified by:
- getComponentDescriptionin interface- ComponentSourceAware
- Returns:
- the bean description (if any).
 
- 
configureDescription copied from interface:IntegrationFlowThe callback-based function to declare the chain of EIP-methods to configure an integration flow with the providedIntegrationFlowDefinition.- Specified by:
- configurein interface- IntegrationFlow
- Parameters:
- flow- the- IntegrationFlowDefinitionto configure
 
- 
getInputChannelDescription copied from interface:IntegrationFlowReturn the firstMessageChannelcomponent which is essentially a flow input channel.- Specified by:
- getInputChannelin interface- IntegrationFlow
- Returns:
- the channel.
 
- 
getIntegrationComponentsDescription copied from interface:IntegrationFlowReturn a map of integration components managed by this flow (if any).- Specified by:
- getIntegrationComponentsin interface- IntegrationFlow
- Returns:
- the map of integration components managed by this flow.
 
- 
startpublic void start()- Specified by:
- startin interface- Lifecycle
- Specified by:
- startin interface- ManageableLifecycle
 
- 
stop- Specified by:
- stopin interface- SmartLifecycle
 
- 
stoppublic void stop()- Specified by:
- stopin interface- Lifecycle
- Specified by:
- stopin interface- ManageableLifecycle
 
- 
isRunningpublic boolean isRunning()- Specified by:
- isRunningin interface- Lifecycle
- Specified by:
- isRunningin interface- ManageableLifecycle
 
- 
isAutoStartuppublic boolean isAutoStartup()- Specified by:
- isAutoStartupin interface- SmartLifecycle
 
- 
getPhasepublic int getPhase()- Specified by:
- getPhasein interface- Phased
- Specified by:
- getPhasein interface- SmartLifecycle
 
- 
from
- 
from
- 
from
- 
fromprotected IntegrationFlowDefinition<?> from(MessageSourceSpec<?, ? extends MessageSource<?>> messageSourceSpec, Consumer<SourcePollingChannelAdapterSpec> endpointConfigurer) 
- 
fromprotected IntegrationFlowDefinition<?> from(MessageSource<?> messageSource, Consumer<SourcePollingChannelAdapterSpec> endpointConfigurer) 
- 
from
- 
from
- 
from
- 
from
- 
from
- 
fromprotected IntegrationFlowDefinition<?> from(MessageSourceSpec<?, ? extends MessageSource<?>> messageSourceSpec) 
- 
from
- 
fromSupplier
- 
fromSupplierprotected <T> IntegrationFlowBuilder fromSupplier(Supplier<T> messageSource, Consumer<SourcePollingChannelAdapterSpec> endpointConfigurer) 
- 
from
- 
fromprotected IntegrationFlowBuilder from(Class<?> serviceInterface, @Nullable Consumer<GatewayProxySpec> endpointConfigurer) Start a flow from a proxy for the service interface.- Parameters:
- serviceInterface- the service interface class.
- endpointConfigurer- the- Consumerto configure proxy bean for gateway.
- Returns:
- new IntegrationFlowBuilder.
- Since:
- 5.2
 
- 
fromprotected IntegrationFlowBuilder from(org.reactivestreams.Publisher<? extends Message<?>> publisher) 
- 
buildFlow
 
-