当前位置: 首页>>代码示例>>Java>>正文


Java Exchange.getInMessage方法代码示例

本文整理汇总了Java中org.apache.cxf.message.Exchange.getInMessage方法的典型用法代码示例。如果您正苦于以下问题:Java Exchange.getInMessage方法的具体用法?Java Exchange.getInMessage怎么用?Java Exchange.getInMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.cxf.message.Exchange的用法示例。


在下文中一共展示了Exchange.getInMessage方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getEncoding

import org.apache.cxf.message.Exchange; //导入方法依赖的package包/类
private String getEncoding(Message message)
{
	Exchange ex = message.getExchange();
	String encoding = (String)message.get(Message.ENCODING);
	if (encoding == null && ex.getInMessage() != null)
	{
		encoding = (String) ex.getInMessage().get(Message.ENCODING);
		message.put(Message.ENCODING, encoding);
	}

	if (encoding == null)
	{
		encoding = "UTF-8";
		message.put(Message.ENCODING, encoding);
	}
	return encoding;
}
 
开发者ID:mprins,项目名称:muleebmsadapter,代码行数:18,代码来源:OracleEbMSXMLPrefixFixingOutInterceptor.java

示例2: getEncoding

import org.apache.cxf.message.Exchange; //导入方法依赖的package包/类
protected String getEncoding(Message message)
{
	Exchange ex = message.getExchange();
	String encoding = (String)message.get(Message.ENCODING);
	if (encoding == null && ex.getInMessage() != null)
	{
		encoding = (String) ex.getInMessage().get(Message.ENCODING);
		message.put(Message.ENCODING, encoding);
	}

	if (encoding == null)
	{
		encoding = "UTF-8";
		message.put(Message.ENCODING, encoding);
	}
	return encoding;
}
 
开发者ID:mprins,项目名称:muleebmsadapter,代码行数:18,代码来源:XMLSecSignatureOutInterceptor.java

示例3: closeConduit

import org.apache.cxf.message.Exchange; //导入方法依赖的package包/类
public static void closeConduit(Exchange exchange) throws IOException {
    ConduitSelector conduitSelector = null;
    synchronized (exchange) {
        conduitSelector = exchange.get(ConduitSelector.class);
        if (conduitSelector != null) {
            exchange.remove(ConduitSelector.class.getName());
        }
    }

    Conduit selectedConduit = null;
    Message message = exchange.getInMessage() == null ? exchange
            .getOutMessage() : exchange.getInMessage();

    if (conduitSelector != null && message != null) {
        selectedConduit = conduitSelector.selectConduit(message);
        selectedConduit.close(message);
    }

    //TODO the line below was removed, check the impact on the protobuffer importer/exporter
    //selectedConduit.close(message);
}
 
开发者ID:ow2-chameleon,项目名称:fuchsia,代码行数:22,代码来源:ExchangeUtils.java

示例4: isAsyncInvocationSupported

import org.apache.cxf.message.Exchange; //导入方法依赖的package包/类
protected boolean isAsyncInvocationSupported(Exchange cxfExchange) {
    Message cxfMessage = cxfExchange.getInMessage();
    Object addressingProperties = cxfMessage.get(CxfConstants.WSA_HEADERS_INBOUND);
    if (addressingProperties != null 
           && !ContextUtils.isGenericAddress(getReplyTo(addressingProperties))) {
        //it's decoupled endpoint, so already switch thread and
        //use executors, which means underlying transport won't 
        //be block, so we shouldn't rely on continuation in 
        //this case, as the SuspendedInvocationException can't be 
        //caught by underlying transport. So we should use the SyncInvocation this time
        return false;
    }
    // we assume it should support AsyncInvocation out of box
    return true;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:16,代码来源:CxfConsumer.java

示例5: getClassLoader

import org.apache.cxf.message.Exchange; //导入方法依赖的package包/类
private ClassLoader getClassLoader(final Exchange exchange) {
    final Message inMessage = exchange.getInMessage();
    if (inMessage == null) {
        return null;
    }
    final OpenEJBPerRequestPojoResourceProvider requestPojoResourceProvider = inMessage.get(OpenEJBPerRequestPojoResourceProvider.class);
    if (requestPojoResourceProvider != null) {
        return requestPojoResourceProvider.getClassLoader();
    }
    return null;
}
 
开发者ID:apache,项目名称:tomee,代码行数:12,代码来源:PojoInvoker.java

示例6: complete

import org.apache.cxf.message.Exchange; //导入方法依赖的package包/类
/**
 * Called on completion of the MEP for which the Conduit was required.
 * 
 * @param exchange
 *            represents the completed MEP
 */
public void complete(Exchange exchange) {
	InvocationKey key = new InvocationKey(exchange);
	InvocationContext invocation = getInvocation(key);
	boolean failover = false;
	Conduit old = (Conduit) exchange.getOutMessage().remove(Conduit.class.getName());
	if (requiresFailover(exchange)) {
		onFailure(invocation.getContext());
		LOG.debug("Failover {}", invocation.getContext());
		Endpoint failoverTarget = getFailoverTarget(exchange, invocation);
		if (failoverTarget != null) {
			setEndpoint(failoverTarget);
			if (old != null) {
				old.close();
				conduits.remove(old);
			}
			failover = performFailover(exchange, invocation);
		}
	} else {
		if (invocation != null) {
			onSuccess(invocation.getContext());
		}
	}
	if (!failover) {
		LOG.debug("Failover not required");
		synchronized (this) {
			inProgress.remove(key);
		}
		if (MessageUtils.isTrue(exchange.get("KeepConduitAlive"))) {
			return;
		}

		try {
			if (exchange.getInMessage() != null) {
				Conduit c = (Conduit) exchange.getOutMessage().get(Conduit.class);
				if (c == null) {
					getSelectedConduit(exchange.getInMessage()).close(exchange.getInMessage());
				} else {
					c.close(exchange.getInMessage());
				}
			}
		} catch (IOException e) {
		}
	}
}
 
开发者ID:jaceko,项目名称:cxf-circuit-switcher,代码行数:51,代码来源:CircuitSwitcherTargetSelector.java


注:本文中的org.apache.cxf.message.Exchange.getInMessage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。