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
-
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 TypeMethodDescriptionexpectedType
(Class<P> expectedType) Set aGenericTransformer
input argument type.expression
(String expression) Provide an expression to use anExpressionEvaluatingTransformer
for the target handler.expression
(Expression expression) Provide an expression to use anExpressionEvaluatingTransformer
for the target handler.Provide a service method name to call.processor
(MessageProcessorSpec<?> processor) Provide aMessageProcessorSpec
as a factory forMethodInvokingTransformer
delegate.Provide a service to use aMethodInvokingTransformer
for 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 aGenericTransformer
as 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, transactional
Methods inherited from class org.springframework.integration.dsl.EndpointSpec
assertHandler, 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
-
TransformerEndpointSpec
protected TransformerEndpointSpec()
-
-
Method Details
-
expression
Provide an expression to use anExpressionEvaluatingTransformer
for the target handler.- Parameters:
expression
- the SpEL expression to use.- Returns:
- the TransformerSpec
-
expression
Provide an expression to use anExpressionEvaluatingTransformer
for the target handler.- Parameters:
expression
- the SpEL expression to use.- Returns:
- the TransformerSpec
-
ref
Provide a service to use aMethodInvokingTransformer
for 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 aGenericTransformer
as a direct delegate forMessageTransformingHandler
.- Type Parameters:
P
- the input type.T
- the output type.- Parameters:
transformer
- theGenericTransformer
instance to use.- Returns:
- the TransformerSpec
-
expectedType
Set aGenericTransformer
input argument type. Can be aMessage
. Ignored for all other transformers, buttransformer(GenericTransformer)
.- Type Parameters:
P
- the type ot expect.- Parameters:
expectedType
- theGenericTransformer
input argument type.- Returns:
- the spec.
-
processor
Provide aMessageProcessorSpec
as a factory forMethodInvokingTransformer
delegate.- Parameters:
processor
- theMessageProcessorSpec
to use.- Returns:
- the TransformerSpec
-
getComponentsToRegister
- Specified by:
getComponentsToRegister
in interfaceComponentsRegistration
- Overrides:
getComponentsToRegister
in classEndpointSpec<TransformerEndpointSpec,
ConsumerEndpointFactoryBean, MessageTransformingHandler>
-