B - the IntegrationFlowDefinition implementation type.public abstract class IntegrationFlowDefinition<B extends IntegrationFlowDefinition<B>> extends BaseIntegrationFlowDefinition<B>
BaseIntegrationFlowDefinition extension for syntax sugar with generics for some
type-based EIP-methods when an expected payload type is assumed from upstream.
For more explicit type conversion the methods with a Class argument are recommended for use.BaseIntegrationFlowDefinition.ReplyProducerCleanerintegrationComponents, PARSER_this, addComponent, addComponent, addComponents, aggregate, aggregate, barrier, barrier, bridge, bridge, channel, channel, channel, channel, checkReuse, claimCheckIn, claimCheckIn, claimCheckOut, claimCheckOut, claimCheckOut, controlBus, controlBus, convert, convert, currentComponent, currentInterceptableChannel, currentMessageChannel, delay, delay, enrich, enrichHeaders, enrichHeaders, enrichHeaders, enrichHeaders, enrichHeaders, extractProxyTarget, filter, filter, filter, filter, filter, filter, filter, filter, filter, fixedSubscriberChannel, fixedSubscriberChannel, fluxTransform, gateway, gateway, gateway, gateway, gateway, gateway, get, getCurrentComponent, getCurrentMessageChannel, getIntegrationComponents, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, headerFilter, headerFilter, headerFilter, intercept, isImplicitChannel, isOutputChannelRequired, log, log, log, log, log, log, log, log, log, log, log, log, log, logAndReply, logAndReply, logAndReply, logAndReply, logAndReply, logAndReply, logAndReply, logAndReply, logAndReply, logAndReply, logAndReply, logAndReply, logAndReply, nullChannel, obtainInputChannelFromFlow, publishSubscribeChannel, publishSubscribeChannel, publishSubscribeChannel, register, registerOutputChannelIfCan, resequence, resequence, route, route, route, route, route, route, route, route, route, route, route, route, route, route, routeByException, routeToRecipients, scatterGather, scatterGather, scatterGather, scatterGather, scatterGather, scatterGather, setImplicitChannel, split, split, split, split, split, split, split, split, split, split, split, split, split, split, split, split, split, toReactivePublisher, transform, transform, transform, transform, transform, transform, transform, transform, transform, trigger, trigger, trigger, trigger, wireTap, wireTap, wireTap, wireTap, wireTap, wireTap, wireTappublic <S,T> B transform(GenericTransformer<S,T> genericTransformer)
MessageTransformingHandler instance for the provided
GenericTransformer. Use BaseIntegrationFlowDefinition.transform(Class, GenericTransformer) if
you need to access the entire message.S - the source type - 'transform from'.T - the target type - 'transform to'.genericTransformer - the GenericTransformer to populate.IntegrationFlowDefinition.MethodInvokingTransformer,
LambdaMessageProcessorpublic <S,T> B transform(GenericTransformer<S,T> genericTransformer, java.util.function.Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)
MessageTransformingHandler instance for the provided
GenericTransformer. In addition accept options for the integration endpoint
using GenericEndpointSpec. Use
BaseIntegrationFlowDefinition.transform(Class, GenericTransformer, Consumer) if you need to access the
entire message.S - the source type - 'transform from'.T - the target type - 'transform to'.genericTransformer - the GenericTransformer to populate.endpointConfigurer - the Consumer to provide integration endpoint
options.IntegrationFlowDefinition.MethodInvokingTransformer,
LambdaMessageProcessor,
GenericEndpointSpecpublic <P> B filter(GenericSelector<P> genericSelector)
MessageFilter
with MethodInvokingSelector
for the provided GenericSelector.
Typically used with a Java 8 Lambda expression:
.filter("World"::equals)
Use BaseIntegrationFlowDefinition.filter(Class, GenericSelector) if you need to access the entire
message.P - the source payload type.genericSelector - the GenericSelector to use.IntegrationFlowDefinition.public <P> B filter(GenericSelector<P> genericSelector, java.util.function.Consumer<FilterEndpointSpec> endpointConfigurer)
MessageFilter
with MethodInvokingSelector
for the provided GenericSelector.
In addition accept options for the integration endpoint using FilterEndpointSpec.
Typically used with a Java 8 Lambda expression:
.filter("World"::equals, e -> e.autoStartup(false))
Use BaseIntegrationFlowDefinition.filter(Class, GenericSelector, Consumer) if you need to access the entire
message.P - the source payload type.genericSelector - the GenericSelector to use.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.FilterEndpointSpecpublic <P> B handle(GenericHandler<P> handler)
ServiceActivatingHandler for the
MethodInvokingMessageProcessor
to invoke the provided GenericHandler at runtime.
Typically used with a Java 8 Lambda expression:
.<Integer>handle((p, h) -> p / 2)
Use BaseIntegrationFlowDefinition.handle(Class, GenericHandler) if you need to access the entire
message.P - the payload type to expect.handler - the handler to invoke.IntegrationFlowDefinition.LambdaMessageProcessorpublic <P> B handle(GenericHandler<P> handler, java.util.function.Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer)
ServiceActivatingHandler for the
MethodInvokingMessageProcessor
to invoke the provided GenericHandler at runtime.
In addition accept options for the integration endpoint using GenericEndpointSpec.
Typically used with a Java 8 Lambda expression:
.<Integer>handle((p, h) -> p / 2, e -> e.autoStartup(false))
Use BaseIntegrationFlowDefinition.handle(Class, GenericHandler, Consumer) if you need to access the entire
message.P - the payload type to expect.handler - the handler to invoke.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.LambdaMessageProcessor,
GenericEndpointSpecpublic <P> B split(java.util.function.Function<P,?> splitter, java.util.function.Consumer<SplitterEndpointSpec<MethodInvokingSplitter>> endpointConfigurer)
MethodInvokingSplitter to evaluate the provided
Function at runtime.
In addition accept options for the integration endpoint using GenericEndpointSpec.
Typically used with a Java 8 Lambda expression:
.<String>split(p ->
jdbcTemplate.execute("SELECT * from FOO",
(PreparedStatement ps) ->
new ResultSetIterator<Foo>(ps.executeQuery(),
(rs, rowNum) ->
new Foo(rs.getInt(1), rs.getString(2))))
, e -> e.applySequence(false))
P - the payload type.splitter - the splitter Function.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.LambdaMessageProcessor,
SplitterEndpointSpecpublic <S,T> B route(java.util.function.Function<S,T> router)
MethodInvokingRouter for provided Function
with default options.
Typically used with a Java 8 Lambda expression:
.route(p -> p.equals("foo") || p.equals("bar") ? new String[] {"foo", "bar"} : null)
Use BaseIntegrationFlowDefinition.route(Class, Function) if you need to access the entire message.S - the source payload type.T - the target result type.router - the Function to use.IntegrationFlowDefinition.public <S,T> B route(java.util.function.Function<S,T> router, java.util.function.Consumer<RouterSpec<T,MethodInvokingRouter>> routerConfigurer)
MethodInvokingRouter for provided Function
with provided options from RouterSpec.
In addition accept options for the integration endpoint using GenericEndpointSpec.
Typically used with a Java 8 Lambda expression:
.<Integer, Boolean>route(p -> p % 2 == 0,
m -> m.channelMapping("true", "evenChannel")
.subFlowMapping("false", f ->
f.<Integer>handle((p, h) -> p * 3))
.applySequence(false))
Use BaseIntegrationFlowDefinition.route(Class, Function, Consumer) if you need to access the entire message.S - the source payload type.T - the target result type.router - the Function to use.routerConfigurer - the Consumer to provide MethodInvokingRouter options.IntegrationFlowDefinition.