Example usage for org.springframework.integration.support ErrorMessageUtils getAttributeAccessor

List of usage examples for org.springframework.integration.support ErrorMessageUtils getAttributeAccessor

Introduction

In this page you can find the example usage for org.springframework.integration.support ErrorMessageUtils getAttributeAccessor.

Prototype

public static AttributeAccessor getAttributeAccessor(@Nullable Message<?> inputMessage,
        @Nullable Message<?> failedMessage) 

Source Link

Document

Return a AttributeAccessor for the provided arguments.

Usage

From source file:org.springframework.integration.core.ErrorMessagePublisher.java

/**
 * Publish an error message for the supplied message and throwable. If the throwable
 * is already a {@link MessagingException} containing the message in its
 * {@code failedMessage} property, use {@link #publish(MessagingException)} instead.
 * @param inputMessage the message that started the subflow.
 * @param failedMessage the message.//  w  ww . j a v  a  2s  . co m
 * @param throwable the throwable.
 */
public void publish(@Nullable Message<?> inputMessage, Message<?> failedMessage, Throwable throwable) {
    publish(throwable, ErrorMessageUtils.getAttributeAccessor(inputMessage, failedMessage));
}

From source file:org.springframework.integration.support.ErrorMessagePublisher.java

/**
 * Publish an error message for the supplied message and throwable. If the throwable
 * is already a {@link MessagingException} containing the message in its
 * {@code failedMessage} property, use {@link #publish(MessagingException)} instead.
 * @param inputMessage the message that started the subflow.
 * @param failedMessage the message.//ww w  .  j a v  a  2 s  .  co  m
 * @param throwable the throwable.
 */
public void publish(Message<?> inputMessage, Message<?> failedMessage, Throwable throwable) {
    publish(throwable, ErrorMessageUtils.getAttributeAccessor(inputMessage, failedMessage));
}