org.springframework.integration.message
Class MethodParameterMessageMapper
java.lang.Object
org.springframework.integration.message.MethodParameterMessageMapper
- All Implemented Interfaces:
- InboundMessageMapper<java.lang.Object[]>, OutboundMessageMapper<java.lang.Object[]>
public class MethodParameterMessageMapper
- extends java.lang.Object
- implements InboundMessageMapper<java.lang.Object[]>, OutboundMessageMapper<java.lang.Object[]>
Prepares arguments for handler methods. The method parameters are matched
against the Message payload as well as its headers. If a method parameter
is annotated with @Header
, the annotation's value will be
used as a header name. If such an annotation contains no value, then the
parameter name will be used as long as the information is available in the
class file (requires compilation with debug settings for parameter names).
If the @Header
annotation is not present, then the parameter
will typically match the Message payload. However, if a Map or Properties
object is expected, and the paylaod is not itself assignable to that type,
then the MessageHeaders' values will be passed in the case of a Map-typed
parameter, or the MessageHeaders' String-based values will be passed in the
case of a Properties-typed parameter.
- Author:
- Mark Fisher
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MethodParameterMessageMapper
public MethodParameterMessageMapper(java.lang.reflect.Method method)
toMessage
public Message<?> toMessage(java.lang.Object[] parameters)
- Specified by:
toMessage
in interface InboundMessageMapper<java.lang.Object[]>
fromMessage
public java.lang.Object[] fromMessage(Message<?> message)
- Specified by:
fromMessage
in interface OutboundMessageMapper<java.lang.Object[]>