當前位置: 首頁>>代碼示例>>Java>>正文


Java AbstractPhaseInterceptor類代碼示例

本文整理匯總了Java中org.apache.cxf.phase.AbstractPhaseInterceptor的典型用法代碼示例。如果您正苦於以下問題:Java AbstractPhaseInterceptor類的具體用法?Java AbstractPhaseInterceptor怎麽用?Java AbstractPhaseInterceptor使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


AbstractPhaseInterceptor類屬於org.apache.cxf.phase包,在下文中一共展示了AbstractPhaseInterceptor類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setPluginService

import org.apache.cxf.phase.AbstractPhaseInterceptor; //導入依賴的package包/類
@Inject
public void setPluginService(PluginService pluginService)
{
	endpointTracker = new PluginTracker<Object>(pluginService, "com.tle.web.remoting.soap", "endpoint", "path").setBeanKey("bean");
	interceptorTracker = new PluginTracker<AbstractPhaseInterceptor<? extends Message>>(pluginService, "com.tle.web.remoting.soap",
		"interceptor", null);
	endpointIntTracker = new PluginTracker<Object>(pluginService, "com.tle.web.remoting.soap", "endpoint-interface", null)
		.setBeanKey("bean");
}
 
開發者ID:equella,項目名稱:Equella,代碼行數:10,代碼來源:CXFHandler.java

示例2: handleMessage

import org.apache.cxf.phase.AbstractPhaseInterceptor; //導入依賴的package包/類
public void handleMessage(Message message) throws Fault {
    String method = (String)message.get(Message.HTTP_REQUEST_METHOD);
    String query = (String)message.get(Message.QUERY_STRING);

    if (!"GET".equals(method) || StringUtils.isEmpty(query)) {
        return;
    }

    String baseUri = (String)message.get(Message.REQUEST_URL);
    String ctx = (String)message.get(Message.PATH_INFO);

    Map<String, String> map = UrlUtils.parseQueryString(query);
    if (isRecognizedQuery(map, baseUri, ctx, message.getExchange().getEndpoint().getEndpointInfo())) {
        Document doc = getDocument(message, baseUri, map, ctx);

        Endpoint e = message.getExchange().get(Endpoint.class);
        Message mout = new MessageImpl();
        mout.setExchange(message.getExchange());
        mout = e.getBinding().createMessage(mout);
        mout.setInterceptorChain(OutgoingChainInterceptor.getOutInterceptorChain(message.getExchange()));
        message.getExchange().setOutMessage(mout);

        mout.put(DOCUMENT_HOLDER, doc);

        Iterator<Interceptor<? extends Message>> iterator = mout.getInterceptorChain().iterator();
        while (iterator.hasNext()) {
            Interceptor<? extends Message> inInterceptor = iterator.next();
            if (inInterceptor instanceof AbstractPhaseInterceptor) {
                AbstractPhaseInterceptor<?> interceptor = (AbstractPhaseInterceptor<?>)inInterceptor;
                if (interceptor.getPhase().equals(Phase.PREPARE_SEND)
                    || interceptor.getPhase().equals(Phase.PRE_STREAM)) {
                    // just make sure we keep the right interceptors
                    continue;
                }
            }
            mout.getInterceptorChain().remove(inInterceptor);
        }

        // notice this is being added after the purge above, don't swap the order!
        mout.getInterceptorChain().add(RawMessageWSDLGetOutInterceptor.INSTANCE);

        // skip the service executor and goto the end of the chain.
        message.getInterceptorChain().doInterceptStartingAt(
                message,
                OutgoingChainInterceptor.class.getName());
    }
}
 
開發者ID:HydAu,項目名稱:Camel,代碼行數:48,代碼來源:RawMessageWSDLGetInterceptor.java


注:本文中的org.apache.cxf.phase.AbstractPhaseInterceptor類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。