本文整理了Java中org.springframework.integration.support.AbstractIntegrationMessageBuilder.filterAndCopyHeadersIfAbsent()
方法的一些代码示例,展示了AbstractIntegrationMessageBuilder.filterAndCopyHeadersIfAbsent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AbstractIntegrationMessageBuilder.filterAndCopyHeadersIfAbsent()
方法的具体详情如下:
包路径:org.springframework.integration.support.AbstractIntegrationMessageBuilder
类名称:AbstractIntegrationMessageBuilder
方法名:filterAndCopyHeadersIfAbsent
[英]Remove headers from the provided map matching to the provided pattens and only after that copy the result into the target message headers.
[中]从提供的映射中删除与提供的模式匹配的标题,然后将结果复制到目标消息标题中。
代码示例来源:origin: spring-projects/spring-integration
@Override
public final Message<?> transform(Message<?> message) {
Object result = this.messageProcessor.processMessage(message);
if (result == null) {
return null;
}
if (result instanceof Message<?>) {
return (Message<?>) result;
}
MessageHeaders requestHeaders = message.getHeaders();
return getMessageBuilderFactory()
.withPayload(result)
.filterAndCopyHeadersIfAbsent(requestHeaders,
this.selectiveHeaderPropagation ? this.notPropagatedHeaders : null)
.build();
}
代码示例来源:origin: spring-projects/spring-integration
protected Message<?> createOutputMessage(Object output, MessageHeaders requestHeaders) {
AbstractIntegrationMessageBuilder<?> builder = null;
if (output instanceof Message<?>) {
if (this.noHeadersPropagation || !shouldCopyRequestHeaders()) {
return (Message<?>) output;
}
builder = this.getMessageBuilderFactory().fromMessage((Message<?>) output);
}
else if (output instanceof AbstractIntegrationMessageBuilder) {
builder = (AbstractIntegrationMessageBuilder<?>) output;
}
else {
builder = this.getMessageBuilderFactory().withPayload(output);
}
if (!this.noHeadersPropagation && shouldCopyRequestHeaders()) {
builder.filterAndCopyHeadersIfAbsent(requestHeaders,
this.selectiveHeaderPropagation ? this.notPropagatedHeaders : null);
}
return builder.build();
}
代码示例来源:origin: org.springframework.integration/spring-integration-core
@Override
public final Message<?> transform(Message<?> message) {
Object result = this.messageProcessor.processMessage(message);
if (result == null) {
return null;
}
if (result instanceof Message<?>) {
return (Message<?>) result;
}
MessageHeaders requestHeaders = message.getHeaders();
return getMessageBuilderFactory()
.withPayload(result)
.filterAndCopyHeadersIfAbsent(requestHeaders,
this.selectiveHeaderPropagation ? this.notPropagatedHeaders : null)
.build();
}
代码示例来源:origin: org.springframework.integration/spring-integration-core
protected Message<?> createOutputMessage(Object output, MessageHeaders requestHeaders) {
AbstractIntegrationMessageBuilder<?> builder = null;
if (output instanceof Message<?>) {
if (this.noHeadersPropagation || !shouldCopyRequestHeaders()) {
return (Message<?>) output;
}
builder = this.getMessageBuilderFactory().fromMessage((Message<?>) output);
}
else if (output instanceof AbstractIntegrationMessageBuilder) {
builder = (AbstractIntegrationMessageBuilder<?>) output;
}
else {
builder = this.getMessageBuilderFactory().withPayload(output);
}
if (!this.noHeadersPropagation && shouldCopyRequestHeaders()) {
builder.filterAndCopyHeadersIfAbsent(requestHeaders,
this.selectiveHeaderPropagation ? this.notPropagatedHeaders : null);
}
return builder.build();
}
内容来源于网络,如有侵权,请联系作者删除!