From a5c99f6ba8f10c5276d6665e08abf270bb028f73 Mon Sep 17 00:00:00 2001 From: Mark Fisher Date: Thu, 15 May 2008 20:49:57 +0000 Subject: [PATCH] Added comments to AnnotationMethodMessageMapper. --- .../annotation/AnnotationMethodMessageMapper.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/spring-integration-core/src/main/java/org/springframework/integration/handler/annotation/AnnotationMethodMessageMapper.java b/spring-integration-core/src/main/java/org/springframework/integration/handler/annotation/AnnotationMethodMessageMapper.java index b6ef780546..14138d940b 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/handler/annotation/AnnotationMethodMessageMapper.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/handler/annotation/AnnotationMethodMessageMapper.java @@ -35,6 +35,20 @@ import org.springframework.util.Assert; import org.springframework.util.StringUtils; /** + * A {@link MessageMapper} implementation for annotated handler methods. + * Method parameters are matched against the Message payload as well as its + * header attributes and properties. If a method parameter is annotated with + * {@link HeaderAttribute @HeaderAttribute} or {@link HeaderProperty @HeaderProperty}, + * the annotation's value will be used as an attribute/property key. 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 neither annotation is 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 MessageHeader attributes will be passed in the case of + * a Map-typed parameter, or the MessageHeader properties will be passed in the + * case of a Properties-typed parameter. + * * @author Mark Fisher */ public class AnnotationMethodMessageMapper implements MessageMapper {