INT-851 Added method name to the "name" property of the MessageHistory.Event for a gateway.
This commit is contained in:
@@ -45,7 +45,7 @@ public class MessageHistory implements Iterable<MessageHistory.Event>, Serializa
|
||||
|
||||
|
||||
public static enum ComponentType {
|
||||
channel, endpoint;
|
||||
channel, endpoint, gateway;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ import org.springframework.integration.annotation.Headers;
|
||||
import org.springframework.integration.annotation.Payload;
|
||||
import org.springframework.integration.core.Message;
|
||||
import org.springframework.integration.core.MessagingException;
|
||||
import org.springframework.integration.core.MessageHistory.ComponentType;
|
||||
import org.springframework.integration.message.InboundMessageMapper;
|
||||
import org.springframework.integration.message.MessageBuilder;
|
||||
import org.springframework.integration.message.MessageHandlingException;
|
||||
@@ -154,7 +155,11 @@ public class ArgumentArrayMessageMapper implements InboundMessageMapper<Object[]
|
||||
throw new IllegalArgumentException(prefix + " parameters provided for method [" + method +
|
||||
"], expected " + this.parameterList.size() + " but received " + arguments.length + ".");
|
||||
}
|
||||
return this.mapArgumentsToMessage(arguments);
|
||||
Message<?> message = this.mapArgumentsToMessage(arguments);
|
||||
if (message != null) {
|
||||
message.getHeaders().getHistory().add(ComponentType.gateway, this.method.getName());
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
private Object[] mapMessageToArguments(Message<?> message) {
|
||||
|
||||
Reference in New Issue
Block a user