Here are the examples of the java api org.springframework.core.AttributeAccessor taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
17
Source : RawRecordHeaderErrorMessageStrategy.java
with Apache License 2.0
from osswangxining
with Apache License 2.0
from osswangxining
@Override
public ErrorMessage buildErrorMessage(Throwable payload, AttributeAccessor attributes) {
Object inputMessage = attributes.getAttribute(ErrorMessageUtils.INPUT_MESSAGE_CONTEXT_KEY);
Map<String, Object> headers = Collections.singletonMap(CommonUtils.ROCKETMQ_RAW_DATA, attributes.getAttribute(CommonUtils.ROCKETMQ_RAW_DATA));
return inputMessage instanceof Message ? new org.springframework.integration.message.EnhancedErrorMessage(payload, headers, (Message<?>) inputMessage) : new ErrorMessage(payload, headers);
}