本文整理了Java中org.switchyard.Message.copy()
方法的一些代码示例,展示了Message.copy()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.copy()
方法的具体详情如下:
包路径:org.switchyard.Message
类名称:Message
方法名:copy
[英]Return copy of message. The copy will contain clean context and point to same payload object. In other words contents of message is not cloned nor copied.
[中]返回消息副本。副本将包含干净的上下文,并指向相同的有效负载对象。换句话说,消息的内容不会被克隆或复制。
代码示例来源:origin: jboss-switchyard/components
/**
* {@inheritDoc}
*/
@Override
public Message copy() {
return getMessage().copy();
}
代码示例来源:origin: org.switchyard.components/switchyard-component-bean
/**
* {@inheritDoc}
*/
@Override
public Message copy() {
return getMessage().copy();
}
代码示例来源:origin: jboss-switchyard/core
@Override
public void handleMessage(final Exchange exchange) throws HandlerException {
_messages.offer(exchange);
if (_forwardInToOut) {
exchange.send(exchange.getMessage().copy());
} else if (_forwardInToFault) {
exchange.sendFault(exchange.createMessage());
}
}
代码示例来源:origin: org.switchyard/switchyard-test
@Override
public void handleMessage(final Exchange exchange) throws HandlerException {
_messages.offer(exchange);
if (_behavior == null || exchange.getContract().getProviderOperation().getExchangePattern().equals(ExchangePattern.IN_ONLY)) {
return;
}
switch (_behavior) {
case FORWARD_IN_TO_OUT :
exchange.send(exchange.getMessage().copy());
break;
case FORWARD_IN_TO_FAULT :
exchange.sendFault(exchange.getMessage().copy());
break;
case REPLY_WITH_OUT :
exchange.send(exchange.createMessage().setContent(_replyContent));
break;
case REPLY_WITH_FAULT :
exchange.sendFault(exchange.createMessage().setContent(_replyContent));
break;
}
}
代码示例来源:origin: jboss-switchyard/core
@Override
public void handleMessage(final Exchange exchange) throws HandlerException {
_messages.offer(exchange);
if (_behavior == null || exchange.getContract().getProviderOperation().getExchangePattern().equals(ExchangePattern.IN_ONLY)) {
return;
}
switch (_behavior) {
case FORWARD_IN_TO_OUT :
exchange.send(exchange.getMessage().copy());
break;
case FORWARD_IN_TO_FAULT :
exchange.sendFault(exchange.getMessage().copy());
break;
case REPLY_WITH_OUT :
exchange.send(exchange.createMessage().setContent(_replyContent));
break;
case REPLY_WITH_FAULT :
exchange.sendFault(exchange.createMessage().setContent(_replyContent));
break;
}
}
代码示例来源:origin: org.switchyard.components/switchyard-component-sca
Message invokeMsg = exchange.getMessage().copy();
exchange.getContext().mergeInto(invokeMsg.getContext());
replyHandler.waitForOut();
if (ex.getMessage() != null) {
Message replyMsg = ex.getMessage().copy();
ex.getContext().mergeInto(replyMsg.getContext());
if (ExchangeState.FAULT.equals(ex.getState())) {
代码示例来源:origin: jboss-switchyard/components
Message invokeMsg = exchange.getMessage().copy();
exchange.getContext().mergeInto(invokeMsg.getContext());
replyHandler.waitForOut();
if (ex.getMessage() != null) {
Message replyMsg = ex.getMessage().copy();
ex.getContext().mergeInto(replyMsg.getContext());
if (ExchangeState.FAULT.equals(ex.getState())) {
内容来源于网络,如有侵权,请联系作者删除!