Class LambdaMessageProcessor
java.lang.Object
org.springframework.integration.handler.LambdaMessageProcessor
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanFactoryAware
,MessageProcessor<java.lang.Object>
public class LambdaMessageProcessor extends java.lang.Object implements MessageProcessor<java.lang.Object>, org.springframework.beans.factory.BeanFactoryAware
The
MessageProcessor
implementation for method invocation on the single method classes
- functional interface implementations.- Since:
- 5.0
-
Constructor Summary
Constructors Constructor Description LambdaMessageProcessor(java.lang.Object target, java.lang.Class<?> expectedType)
Create a processor to evaluate a provided lambda at runtime against a request message. -
Method Summary
Modifier and Type Method Description java.lang.Object
processMessage(org.springframework.messaging.Message<?> message)
Process the Message and return a value (or null).void
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
-
Constructor Details
-
LambdaMessageProcessor
public LambdaMessageProcessor(java.lang.Object target, @Nullable java.lang.Class<?> expectedType)Create a processor to evaluate a provided lambda at runtime against a request message.- Parameters:
target
- the lambda object.expectedType
- an optional expected type for method argument conversion.
-
-
Method Details
-
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException- Specified by:
setBeanFactory
in interfaceorg.springframework.beans.factory.BeanFactoryAware
- Throws:
org.springframework.beans.BeansException
-
processMessage
public java.lang.Object processMessage(org.springframework.messaging.Message<?> message)Description copied from interface:MessageProcessor
Process the Message and return a value (or null).- Specified by:
processMessage
in interfaceMessageProcessor<java.lang.Object>
- Parameters:
message
- The message to process.- Returns:
- The result.
-