Class SplitterSpec
java.lang.Object
org.springframework.integration.dsl.IntegrationComponentSpec<SplitterSpec, reactor.util.function.Tuple2<ConsumerEndpointFactoryBean, AbstractMessageSplitter>>
org.springframework.integration.dsl.EndpointSpec<SplitterSpec, ConsumerEndpointFactoryBean, AbstractMessageSplitter>
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
adviceChainFields inherited from class org.springframework.integration.dsl.EndpointSpec
componentsToRegister, endpointFactoryBean, handlerFields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
logger, PARSER, targetFields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTEFields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
Constructors -
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 aFunctioninput argument type.expression(String expression) Provide an expression to use anExpressionEvaluatingSplitterfor the target handler.expression(Expression expression) Provide an expression to use anExpressionEvaluatingSplitterfor the target handler.<P> SplitterSpecProvide aFunctionas a direct delegate forMethodInvokingSplitter.Provide a service method name to call.Provide a service to use aMethodInvokingSplitterfor 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, transactionalMethods inherited from class org.springframework.integration.dsl.EndpointSpec
assertHandler, getComponentsToRegister, id, obtainInputChannelFromFlow, obtainInputChannelFromFlow, poller, pollerMethods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, afterPropertiesSet, destroy, getId, getObject, getObjectType, getPhase, isAutoStartup, isRunning, start, stop, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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 isnullindicating that no tokenizing should occur. If delimiters are provided, they will be applied to any String payload. Only applied if providedsplitteris instance ofDefaultMessageSplitter.- Parameters:
delimiters- The delimiters.- Returns:
- the endpoint spec.
- See Also:
-
expression
Provide an expression to use anExpressionEvaluatingSplitterfor the target handler.- Parameters:
expression- the SpEL expression to use.- Returns:
- the spec
-
expression
Provide an expression to use anExpressionEvaluatingSplitterfor the target handler.- Parameters:
expression- the SpEL expression to use.- Returns:
- the spec
-
ref
Provide a service to use aMethodInvokingSplitterfor the target handler. This option can be set to anAbstractMessageSplitterimplementation, aMessageHandlerSpecproviding 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 aFunctionas a direct delegate forMethodInvokingSplitter.- Type Parameters:
P- the input type.- Parameters:
function- theFunctioninstance to use.- Returns:
- the spec
-
expectedType
Set aFunctioninput argument type. Can be aMessage. Ignored for all other options, butfunction(Function).- Parameters:
expectedType- theFunctioninput 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:
doGetin classConsumerEndpointSpec<SplitterSpec, AbstractMessageSplitter>
-