public abstract class IntegrationFlowAdapter extends java.lang.Object implements IntegrationFlow, org.springframework.context.SmartLifecycle
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"));
}
}
| Constructor and Description |
|---|
IntegrationFlowAdapter() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract IntegrationFlowDefinition<?> |
buildFlow() |
void |
configure(IntegrationFlowDefinition<?> flow) |
protected IntegrationFlowDefinition<?> |
from(IntegrationFlows.ChannelsFunction channels) |
protected IntegrationFlowDefinition<?> |
from(IntegrationFlows.MessageProducersFunction producers) |
protected IntegrationFlowDefinition<?> |
from(IntegrationFlows.MessageSourcesFunction sources) |
protected IntegrationFlowDefinition<?> |
from(IntegrationFlows.MessageSourcesFunction sources,
Consumer<SourcePollingChannelAdapterSpec> endpointConfigurer) |
protected IntegrationFlowDefinition<?> |
from(IntegrationFlows.MessagingGatewaysFunction gateways) |
protected IntegrationFlowDefinition<?> |
from(org.springframework.messaging.MessageChannel messageChannel) |
protected IntegrationFlowDefinition<?> |
from(MessageChannelSpec<?,?> messageChannelSpec) |
protected IntegrationFlowDefinition<?> |
from(MessageProducerSpec<?,?> messageProducerSpec) |
protected IntegrationFlowDefinition<?> |
from(org.springframework.integration.endpoint.MessageProducerSupport messageProducer) |
protected IntegrationFlowDefinition<?> |
from(org.springframework.integration.core.MessageSource<?> messageSource) |
protected IntegrationFlowDefinition<?> |
from(org.springframework.integration.core.MessageSource<?> messageSource,
Consumer<SourcePollingChannelAdapterSpec> endpointConfigurer) |
protected IntegrationFlowDefinition<?> |
from(MessageSourceSpec<?,? extends org.springframework.integration.core.MessageSource<?>> messageSourceSpec) |
protected IntegrationFlowDefinition<?> |
from(MessageSourceSpec<?,? extends org.springframework.integration.core.MessageSource<?>> messageSourceSpec,
Consumer<SourcePollingChannelAdapterSpec> endpointConfigurer) |
protected IntegrationFlowDefinition<?> |
from(MessagingGatewaySpec<?,?> inboundGatewaySpec) |
protected IntegrationFlowDefinition<?> |
from(org.springframework.integration.gateway.MessagingGatewaySupport inboundGateway) |
protected IntegrationFlowBuilder |
from(java.lang.Object service,
java.lang.String methodName) |
protected IntegrationFlowBuilder |
from(java.lang.Object service,
java.lang.String methodName,
Consumer<SourcePollingChannelAdapterSpec> endpointConfigurer) |
protected IntegrationFlowDefinition<?> |
from(java.lang.String messageChannelName) |
protected IntegrationFlowDefinition<?> |
from(java.lang.String messageChannelName,
boolean fixedSubscriber) |
int |
getPhase() |
boolean |
isAutoStartup() |
boolean |
isRunning() |
void |
start() |
void |
stop() |
void |
stop(java.lang.Runnable callback) |
public final void configure(IntegrationFlowDefinition<?> flow)
configure in interface IntegrationFlowpublic void start()
start in interface org.springframework.context.Lifecyclepublic void stop(java.lang.Runnable callback)
stop in interface org.springframework.context.SmartLifecyclepublic void stop()
stop in interface org.springframework.context.Lifecyclepublic boolean isRunning()
isRunning in interface org.springframework.context.Lifecyclepublic boolean isAutoStartup()
isAutoStartup in interface org.springframework.context.SmartLifecyclepublic int getPhase()
getPhase in interface org.springframework.context.Phasedprotected IntegrationFlowDefinition<?> from(java.lang.String messageChannelName)
protected IntegrationFlowDefinition<?> from(org.springframework.messaging.MessageChannel messageChannel)
protected IntegrationFlowDefinition<?> from(java.lang.String messageChannelName, boolean fixedSubscriber)
protected IntegrationFlowDefinition<?> from(MessageSourceSpec<?,? extends org.springframework.integration.core.MessageSource<?>> messageSourceSpec, Consumer<SourcePollingChannelAdapterSpec> endpointConfigurer)
protected IntegrationFlowDefinition<?> from(org.springframework.integration.core.MessageSource<?> messageSource, Consumer<SourcePollingChannelAdapterSpec> endpointConfigurer)
protected IntegrationFlowDefinition<?> from(IntegrationFlows.MessageSourcesFunction sources, Consumer<SourcePollingChannelAdapterSpec> endpointConfigurer)
protected IntegrationFlowDefinition<?> from(IntegrationFlows.ChannelsFunction channels)
protected IntegrationFlowDefinition<?> from(org.springframework.integration.endpoint.MessageProducerSupport messageProducer)
protected IntegrationFlowDefinition<?> from(org.springframework.integration.core.MessageSource<?> messageSource)
protected IntegrationFlowDefinition<?> from(IntegrationFlows.MessageSourcesFunction sources)
protected IntegrationFlowDefinition<?> from(org.springframework.integration.gateway.MessagingGatewaySupport inboundGateway)
protected IntegrationFlowDefinition<?> from(MessageChannelSpec<?,?> messageChannelSpec)
protected IntegrationFlowDefinition<?> from(IntegrationFlows.MessageProducersFunction producers)
protected IntegrationFlowDefinition<?> from(MessageProducerSpec<?,?> messageProducerSpec)
protected IntegrationFlowDefinition<?> from(MessageSourceSpec<?,? extends org.springframework.integration.core.MessageSource<?>> messageSourceSpec)
protected IntegrationFlowDefinition<?> from(MessagingGatewaySpec<?,?> inboundGatewaySpec)
protected IntegrationFlowDefinition<?> from(IntegrationFlows.MessagingGatewaysFunction gateways)
protected IntegrationFlowBuilder from(java.lang.Object service, java.lang.String methodName)
protected IntegrationFlowBuilder from(java.lang.Object service, java.lang.String methodName, Consumer<SourcePollingChannelAdapterSpec> endpointConfigurer)
protected abstract IntegrationFlowDefinition<?> buildFlow()