本文整理了Java中org.apache.synapse.MessageContext.isFaultResponse()
方法的一些代码示例,展示了MessageContext.isFaultResponse()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MessageContext.isFaultResponse()
方法的具体详情如下:
包路径:org.apache.synapse.MessageContext
类名称:MessageContext
方法名:isFaultResponse
[英]Is this message a response to a fault message?
[中]此消息是对故障消息的响应吗?
代码示例来源:origin: wso2/wso2-synapse
/**
* {@inheritDoc}
*/
public boolean isFaultResponse() {
return mc.isFaultResponse();
}
代码示例来源:origin: wso2/wso2-synapse
/**
* {@inheritDoc}
*/
public boolean isFaultResponse() {
return mc.isFaultResponse();
}
代码示例来源:origin: org.apache.synapse/synapse-extensions
public boolean isFaultResponse() {
return mc.isFaultResponse();
}
代码示例来源:origin: org.apache.synapse/synapse-core
/**
* Detects a fault
*
* @param context MessageContext context
* @return <code>true</code> if this is a fault
*/
private static boolean isFault(MessageContext context) {
boolean isFault = context.isFaultResponse();
if (!isFault) {
isFault = context.getProperty(SynapseConstants.ERROR_CODE) != null;
if (!isFault) {
SOAPEnvelope envelope = context.getEnvelope();
if (envelope != null) {
isFault = envelope.hasFault();
}
}
}
return isFault;
}
}
代码示例来源:origin: org.apache.synapse/synapse-core
/**
* Reporting a fault for any component when a response for a request is received.
* Any component means that this statistics log (check point) is valid for sequence, endpoint,
* and proxy.
*
* @param synCtx synCtx Current Message through synapse
* @param errorLog the received error information
*/
public static void reportFaultForAll(MessageContext synCtx, ErrorLog errorLog) {
StatisticsRecord statisticsRecord = null;
if (synCtx.getProperty(SynapseConstants.STATISTICS_STACK) instanceof StatisticsRecord) {
statisticsRecord = (StatisticsRecord) synCtx.getProperty(
SynapseConstants.STATISTICS_STACK);
}
if (statisticsRecord != null) {
if (log.isDebugEnabled()) {
log.debug("Reporting a fault : " + statisticsRecord);
}
StatisticsLog statisticsLog = new StatisticsLog(SynapseConstants.SYNAPSE_ASPECTS,
ComponentType.ANY);
statisticsLog.setResponse(synCtx.isResponse() || synCtx.isFaultResponse());
statisticsLog.setFault(true);
statisticsLog.setErrorLog(errorLog);
statisticsRecord.collect(statisticsLog);
}
}
代码示例来源:origin: org.apache.synapse/synapse-core
/**
* Factory method to create <code>StatisticsLog</code> instances
*
* @param identifiable component
* @param componentType component type
* @param synCtx MessageContext instance
* @return a StatisticsLog
*/
private static StatisticsLog createStatisticsLog(Identifiable identifiable,
ComponentType componentType,
MessageContext synCtx) {
if (isValid(identifiable)) {
String auditID = identifiable.getId();
StatisticsLog statisticsLog = new StatisticsLog(auditID, componentType);
statisticsLog.setResponse(synCtx.isResponse() || synCtx.isFaultResponse());
if (isFault(synCtx)) {
statisticsLog.setFault(true);
statisticsLog.setErrorLog(ErrorLogFactory.createErrorLog(synCtx));
}
if (log.isDebugEnabled()) {
log.debug("Created statistics log : " + statisticsLog);
}
return statisticsLog;
}
return null;
}
代码示例来源:origin: org.apache.synapse/synapse-core
statisticsLog.setResponse(synCtx.isResponse() || synCtx.isFaultResponse());
代码示例来源:origin: wso2/wso2-synapse
synMsg.setFaultResponse(synCtx.isFaultResponse());
synMsg.setTracingState(synCtx.getTracingState());
synMsg.setMessageFlowTracingState(synCtx.getMessageFlowTracingState());
内容来源于网络,如有侵权,请联系作者删除!