From ea611a308246234bcfa5927a29ddd80c90bea36c Mon Sep 17 00:00:00 2001 From: Mark Fisher Date: Fri, 27 Aug 2010 21:32:56 +0000 Subject: [PATCH] GatewayMethodInboundMessageMapper is now limited to package visibility --- .../GatewayMethodInboundMessageMapper.java | 38 +------------------ 1 file changed, 2 insertions(+), 36 deletions(-) diff --git a/spring-integration-core/src/main/java/org/springframework/integration/gateway/GatewayMethodInboundMessageMapper.java b/spring-integration-core/src/main/java/org/springframework/integration/gateway/GatewayMethodInboundMessageMapper.java index 356d2170fc..cd34413c09 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/gateway/GatewayMethodInboundMessageMapper.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/gateway/GatewayMethodInboundMessageMapper.java @@ -45,47 +45,13 @@ import org.springframework.util.CollectionUtils; import org.springframework.util.StringUtils; /** - * A Message Mapper implementation that supports mapping from a Message - * to an argument array when invoking handler methods, and mapping to a + * A Message Mapper implementation that supports mapping to a * Message from an argument array when invoking gateway methods. *

- * When mapping from a Message, the method parameters are matched - * against the Message, its payload as well as its headers. A message or - * payload parameter must not be annotated, and there can be at most one of - * these. In certain special cases, more than one non-annotated parameter can - * be used (more on this later), but there should always be at most one - * parameter that is expecting the message or its payload. - *

- * If a method parameter is annotated with {@link Header @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). - *

- * In addition a Map or Properties parameter can receive multiple message - * headers. In the case of a Map argument, all headers will be passed, but in - * the case of a Properties argument, only the headers with String-typed values - * will be passed. These parameters can be labeled explicitly with the - * {@link Headers @Headers} annotation, or matched implicitly by using a non- - * ambiguous method signature. There can be as many parameters annotated with - * {@code @Header} as necessary, but typically there should be only one parameter - * expecting multiple headers (with or without the {@code @Headers} annotation). - *

- * If a Map or Properties object is expected, and the payload is not itself - * assignable to that type or capable of being converted 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. In these cases multiple unannotated - * parameters are legal. If, however, the actual payload type is a Map or - * Properties instance, then this ambiguity cannot be resolved. For that - * reason, it is highly recommended to use the explicit - * {@code Headers @Headers} annotation whenever possible. - *

* Some examples of legal method signatures:
* public void dealWith(Object payload);
* public void dealWith(Message message);
* public void dealWith(@Header String myHeader, Object payload);
- * public void dealWith(@Header String myHeader, @Header String anotherHeader); *
* public void dealWith(@Headers Map headers, Object payload);
* public void dealWith(@Headers Properties headers, Map payload);
@@ -101,7 +67,7 @@ import org.springframework.util.StringUtils; * @author Oleg Zhurakousky * @since 2.0 */ -public class GatewayMethodInboundMessageMapper implements InboundMessageMapper, BeanFactoryAware { +class GatewayMethodInboundMessageMapper implements InboundMessageMapper, BeanFactoryAware { private static final SpelExpressionParser PARSER = new SpelExpressionParser();