public abstract class IntegrationFlowAdapter extends Object implements IntegrationFlow, ManageableSmartLifecycle
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"));
}
}
DEFAULT_PHASE| Constructor and Description |
|---|
IntegrationFlowAdapter() |
public final void configure(IntegrationFlowDefinition<?> flow)
IntegrationFlowIntegrationFlowDefinition.configure in interface IntegrationFlowflow - the IntegrationFlowDefinition to configurepublic MessageChannel getInputChannel()
IntegrationFlowMessageChannel component
which is essential a flow input channel.getInputChannel in interface IntegrationFlowpublic void start()
start in interface Lifecyclestart in interface ManageableLifecyclepublic void stop(Runnable callback)
stop in interface SmartLifecyclepublic void stop()
stop in interface Lifecyclestop in interface ManageableLifecyclepublic boolean isRunning()
isRunning in interface LifecycleisRunning in interface ManageableLifecyclepublic boolean isAutoStartup()
isAutoStartup in interface SmartLifecyclepublic int getPhase()
getPhase in interface PhasedgetPhase in interface SmartLifecycleprotected IntegrationFlowDefinition<?> from(String messageChannelName)
protected IntegrationFlowDefinition<?> from(MessageChannel messageChannel)
protected IntegrationFlowDefinition<?> from(String messageChannelName, boolean fixedSubscriber)
protected IntegrationFlowDefinition<?> from(MessageSourceSpec<?,? extends MessageSource<?>> messageSourceSpec, java.util.function.Consumer<SourcePollingChannelAdapterSpec> endpointConfigurer)
protected IntegrationFlowDefinition<?> from(MessageSource<?> messageSource, java.util.function.Consumer<SourcePollingChannelAdapterSpec> endpointConfigurer)
protected IntegrationFlowDefinition<?> from(MessageProducerSupport messageProducer)
protected IntegrationFlowDefinition<?> from(MessageSource<?> messageSource)
protected IntegrationFlowDefinition<?> from(MessagingGatewaySupport inboundGateway)
protected IntegrationFlowDefinition<?> from(MessageChannelSpec<?,?> messageChannelSpec)
protected IntegrationFlowDefinition<?> from(MessageProducerSpec<?,?> messageProducerSpec)
protected IntegrationFlowDefinition<?> from(MessageSourceSpec<?,? extends MessageSource<?>> messageSourceSpec)
protected IntegrationFlowDefinition<?> from(MessagingGatewaySpec<?,?> inboundGatewaySpec)
protected <T> IntegrationFlowBuilder fromSupplier(java.util.function.Supplier<T> messageSource)
protected <T> IntegrationFlowBuilder fromSupplier(java.util.function.Supplier<T> messageSource, java.util.function.Consumer<SourcePollingChannelAdapterSpec> endpointConfigurer)
protected IntegrationFlowBuilder from(Class<?> serviceInterface)
protected IntegrationFlowBuilder from(Class<?> serviceInterface, @Nullable java.util.function.Consumer<GatewayProxySpec> endpointConfigurer)
serviceInterface - the service interface class.endpointConfigurer - the Consumer to configure proxy bean for gateway.IntegrationFlowBuilder.protected IntegrationFlowBuilder from(org.reactivestreams.Publisher<? extends Message<?>> publisher)
protected abstract IntegrationFlowDefinition<?> buildFlow()