Class SplitterSpec
java.lang.Object
org.springframework.integration.dsl.IntegrationComponentSpec<S,reactor.util.function.Tuple2<F,H>>
org.springframework.integration.dsl.EndpointSpec<S,ConsumerEndpointFactoryBean,H>
org.springframework.integration.dsl.ConsumerEndpointSpec<SplitterSpec,AbstractMessageSplitter>
org.springframework.integration.dsl.SplitterSpec
- All Implemented Interfaces:
DisposableBean
,FactoryBean<reactor.util.function.Tuple2<ConsumerEndpointFactoryBean,
,AbstractMessageSplitter>> InitializingBean
,Lifecycle
,Phased
,SmartLifecycle
,ComponentsRegistration
A
ConsumerEndpointSpec
for an AbstractMessageSplitter
.- Since:
- 6.2
- Author:
- Artem Bilan
-
Field Summary
Fields inherited from class org.springframework.integration.dsl.ConsumerEndpointSpec
adviceChain
Fields inherited from class org.springframework.integration.dsl.EndpointSpec
componentsToRegister, endpointFactoryBean, handler
Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
logger, PARSER, target
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionapplySequence
(boolean applySequence) Set the applySequence flag to the specified value.delimiters
(String delimiters) Set delimiters to tokenize String values.discardChannel
(String discardChannelName) Specify a channel bean name where rejected Messages should be sent.discardChannel
(MessageChannel discardChannel) Specify a channel where rejected Messages should be sent.discardFlow
(IntegrationFlow discardFlow) Configure a subflow to run for discarded messages instead of adiscardChannel(MessageChannel)
.reactor.util.function.Tuple2<ConsumerEndpointFactoryBean,
AbstractMessageSplitter> doGet()
expectedType
(Class<?> expectedType) Set aFunction
input argument type.expression
(String expression) Provide an expression to use anExpressionEvaluatingSplitter
for the target handler.expression
(Expression expression) Provide an expression to use anExpressionEvaluatingSplitter
for the target handler.<P> SplitterSpec
Provide aFunction
as a direct delegate forMethodInvokingSplitter
.Provide a service method name to call.Provide a service to use aMethodInvokingSplitter
for the target handler.Provide a bean name to use aMethodInvokingSplitter
(based onBeanNameMessageProcessor
) for the target handler.Methods inherited from class org.springframework.integration.dsl.ConsumerEndpointSpec
advice, async, autoStartup, customizeMonoReply, handleMessageAdvice, notPropagatedHeaders, order, phase, poller, reactive, reactive, requiresReply, role, sendTimeout, taskScheduler, transactional, transactional, transactional, transactional, transactional
Methods inherited from class org.springframework.integration.dsl.EndpointSpec
assertHandler, getComponentsToRegister, id, obtainInputChannelFromFlow, obtainInputChannelFromFlow, poller, poller
Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, afterPropertiesSet, destroy, getId, getObject, getObjectType, getPhase, isAutoStartup, isRunning, start, stop, stop
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.beans.factory.FactoryBean
isSingleton
-
Constructor Details
-
SplitterSpec
protected SplitterSpec()
-
-
Method Details
-
delimiters
Set delimiters to tokenize String values. The default isnull
indicating that no tokenizing should occur. If delimiters are provided, they will be applied to any String payload. Only applied if providedsplitter
is instance ofDefaultMessageSplitter
.- Parameters:
delimiters
- The delimiters.- Returns:
- the endpoint spec.
- See Also:
-
expression
Provide an expression to use anExpressionEvaluatingSplitter
for the target handler.- Parameters:
expression
- the SpEL expression to use.- Returns:
- the spec
-
expression
Provide an expression to use anExpressionEvaluatingSplitter
for the target handler.- Parameters:
expression
- the SpEL expression to use.- Returns:
- the spec
-
ref
Provide a service to use aMethodInvokingSplitter
for the target handler. This option can be set to anAbstractMessageSplitter
implementation, aMessageHandlerSpec
providing anAbstractMessageSplitter
, orMessageProcessorSpec
.- Parameters:
ref
- the service to call as a splitter POJO.- Returns:
- the spec
-
refName
Provide a bean name to use aMethodInvokingSplitter
(based onBeanNameMessageProcessor
) for the target handler.- Parameters:
refName
- the bean name for service to call as a splitter POJO.- Returns:
- the spec
-
method
Provide a service method name to call. Optional. Use only together withref(Object)
orrefName(String)
.- Parameters:
method
- the service method name to call.- Returns:
- the spec
-
function
Provide aFunction
as a direct delegate forMethodInvokingSplitter
.- Type Parameters:
P
- the input type.- Parameters:
function
- theFunction
instance to use.- Returns:
- the spec
-
expectedType
Set aFunction
input argument type. Can be aMessage
. Ignored for all other options, butfunction(Function)
.- Parameters:
expectedType
- theFunction
input argument type.- Returns:
- the spec.
-
applySequence
Set the applySequence flag to the specified value. Defaults totrue
.- Parameters:
applySequence
- the applySequence.- Returns:
- the endpoint spec.
- See Also:
-
discardChannel
Specify a channel where rejected Messages should be sent. If the discard channel is null (the default), rejected Messages will be dropped. A "Rejected Message" means that split function has returned an empty result (but not null): no items to iterate for sending.- Parameters:
discardChannel
- The discard channel.- Returns:
- the endpoint spec.
- See Also:
-
discardFlow
Configure a subflow to run for discarded messages instead of adiscardChannel(MessageChannel)
.- Parameters:
discardFlow
- the discard flow.- Returns:
- the endpoint spec.
-
discardChannel
Specify a channel bean name where rejected Messages should be sent. If the discard channel is null (the default), rejected Messages will be dropped. A "Rejected Message" means that split function has returned an empty result (but not null): no items to iterate for sending.- Parameters:
discardChannelName
- The discard channel bean name.- Returns:
- the endpoint spec.
- See Also:
-
doGet
- Overrides:
doGet
in classConsumerEndpointSpec<SplitterSpec,
AbstractMessageSplitter>
-