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)
The callback-based function to declare the chain of EIP-methods to
configure an integration flow with the provided
IntegrationFlowDefinition. |
protected IntegrationFlowBuilder |
from(java.lang.Class<?> serviceInterface) |
protected IntegrationFlowBuilder |
from(java.lang.Class<?> serviceInterface,
java.lang.String beanName) |
protected IntegrationFlowDefinition<?> |
from(org.springframework.messaging.MessageChannel messageChannel) |
protected IntegrationFlowDefinition<?> |
from(MessageChannelSpec<?,?> messageChannelSpec) |
protected IntegrationFlowDefinition<?> |
from(MessageProducerSpec<?,?> messageProducerSpec) |
protected IntegrationFlowDefinition<?> |
from(MessageProducerSupport messageProducer) |
protected IntegrationFlowDefinition<?> |
from(MessageSource<?> messageSource) |
protected IntegrationFlowDefinition<?> |
from(MessageSource<?> messageSource,
java.util.function.Consumer<SourcePollingChannelAdapterSpec> endpointConfigurer) |
protected IntegrationFlowDefinition<?> |
from(MessageSourceSpec<?,? extends MessageSource<?>> messageSourceSpec) |
protected IntegrationFlowDefinition<?> |
from(MessageSourceSpec<?,? extends MessageSource<?>> messageSourceSpec,
java.util.function.Consumer<SourcePollingChannelAdapterSpec> endpointConfigurer) |
protected IntegrationFlowDefinition<?> |
from(MessagingGatewaySpec<?,?> inboundGatewaySpec) |
protected IntegrationFlowDefinition<?> |
from(MessagingGatewaySupport inboundGateway) |
protected IntegrationFlowBuilder |
from(java.lang.Object service,
java.lang.String methodName) |
protected IntegrationFlowBuilder |
from(java.lang.Object service,
java.lang.String methodName,
java.util.function.Consumer<SourcePollingChannelAdapterSpec> endpointConfigurer) |
protected IntegrationFlowBuilder |
from(org.reactivestreams.Publisher<org.springframework.messaging.Message<?>> publisher) |
protected IntegrationFlowDefinition<?> |
from(java.lang.String messageChannelName) |
protected IntegrationFlowDefinition<?> |
from(java.lang.String messageChannelName,
boolean fixedSubscriber) |
protected <T> IntegrationFlowBuilder |
from(java.util.function.Supplier<T> messageSource) |
protected <T> IntegrationFlowBuilder |
from(java.util.function.Supplier<T> messageSource,
java.util.function.Consumer<SourcePollingChannelAdapterSpec> endpointConfigurer) |
org.springframework.messaging.MessageChannel |
getInputChannel()
Return the first
MessageChannel component
which is essential a flow input channel. |
int |
getPhase() |
boolean |
isAutoStartup() |
boolean |
isRunning() |
void |
start() |
void |
stop() |
void |
stop(java.lang.Runnable callback) |
public final void configure(IntegrationFlowDefinition<?> flow)
IntegrationFlowIntegrationFlowDefinition.configure in interface IntegrationFlowflow - the IntegrationFlowDefinition to configurepublic org.springframework.messaging.MessageChannel getInputChannel()
IntegrationFlowMessageChannel component
which is essential a flow input channel.getInputChannel 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.PhasedgetPhase in interface org.springframework.context.SmartLifecycleprotected 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 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 IntegrationFlowBuilder from(java.lang.Object service, java.lang.String methodName)
protected IntegrationFlowBuilder from(java.lang.Object service, java.lang.String methodName, java.util.function.Consumer<SourcePollingChannelAdapterSpec> endpointConfigurer)
protected <T> IntegrationFlowBuilder from(java.util.function.Supplier<T> messageSource)
protected <T> IntegrationFlowBuilder from(java.util.function.Supplier<T> messageSource, java.util.function.Consumer<SourcePollingChannelAdapterSpec> endpointConfigurer)
protected IntegrationFlowBuilder from(java.lang.Class<?> serviceInterface)
protected IntegrationFlowBuilder from(java.lang.Class<?> serviceInterface, java.lang.String beanName)
protected IntegrationFlowBuilder from(org.reactivestreams.Publisher<org.springframework.messaging.Message<?>> publisher)
protected abstract IntegrationFlowDefinition<?> buildFlow()