Class TransformerEndpointSpec
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<TransformerEndpointSpec,MessageTransformingHandler>
org.springframework.integration.dsl.TransformerEndpointSpec
- All Implemented Interfaces:
DisposableBean,FactoryBean<reactor.util.function.Tuple2<ConsumerEndpointFactoryBean,,MessageTransformingHandler>> InitializingBean,Lifecycle,Phased,SmartLifecycle,ComponentsRegistration
public class TransformerEndpointSpec
extends ConsumerEndpointSpec<TransformerEndpointSpec,MessageTransformingHandler>
A
ConsumerEndpointSpec for a MessageTransformingHandler options.
One of the expression(String), ref(Object), refName(String),
processor(MessageProcessorSpec) or transformer(GenericTransformer) must be provided.- Since:
- 6.2
- Author:
- Artem Bilan, Ngoc Nhan
-
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 TypeMethodDescriptionexpectedType(Class<P> expectedType) Set aGenericTransformerinput argument type.expression(String expression) Provide an expression to use anExpressionEvaluatingTransformerfor the target handler.expression(Expression expression) Provide an expression to use anExpressionEvaluatingTransformerfor the target handler.Provide a service method name to call.processor(MessageProcessorSpec<?> processor) Provide aMessageProcessorSpecas a factory forMethodInvokingTransformerdelegate.Provide a service to use aMethodInvokingTransformerfor the target handler.Provide a bean name to use aMethodInvokingTransformer(based onBeanNameMessageProcessor) for the target handler.<P,T> TransformerEndpointSpec transformer(GenericTransformer<P, T> transformer) Provide aGenericTransformeras a direct delegate forMessageTransformingHandler.Methods inherited from class org.springframework.integration.dsl.ConsumerEndpointSpec
advice, async, autoStartup, customizeMonoReply, doGet, 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, 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
-
TransformerEndpointSpec
protected TransformerEndpointSpec()
-
-
Method Details
-
expression
Provide an expression to use anExpressionEvaluatingTransformerfor the target handler.- Parameters:
expression- the SpEL expression to use.- Returns:
- the TransformerSpec
-
expression
Provide an expression to use anExpressionEvaluatingTransformerfor the target handler.- Parameters:
expression- the SpEL expression to use.- Returns:
- the TransformerSpec
-
ref
Provide a service to use aMethodInvokingTransformerfor the target handler.- Parameters:
ref- the service to call as a transformer POJO.- Returns:
- the TransformerSpec
-
refName
Provide a bean name to use aMethodInvokingTransformer(based onBeanNameMessageProcessor) for the target handler.- Parameters:
refName- the bean name for service to call as a transformer POJO.- Returns:
- the TransformerSpec
-
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 TransformerSpec
-
transformer
Provide aGenericTransformeras a direct delegate forMessageTransformingHandler.- Type Parameters:
P- the input type.T- the output type.- Parameters:
transformer- theGenericTransformerinstance to use.- Returns:
- the TransformerSpec
-
expectedType
Set aGenericTransformerinput argument type. Can be aMessage. Ignored for all other transformers, buttransformer(GenericTransformer).- Type Parameters:
P- the type ot expect.- Parameters:
expectedType- theGenericTransformerinput argument type.- Returns:
- the spec.
-
processor
Provide aMessageProcessorSpecas a factory forMethodInvokingTransformerdelegate.- Parameters:
processor- theMessageProcessorSpecto use.- Returns:
- the TransformerSpec
-
getComponentsToRegister
- Specified by:
getComponentsToRegisterin interfaceComponentsRegistration- Overrides:
getComponentsToRegisterin classEndpointSpec<TransformerEndpointSpec,ConsumerEndpointFactoryBean, MessageTransformingHandler>
-