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


Java Phase類代碼示例

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


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

示例1: SpringAuthenticationInjectorInterceptor

import org.apache.cxf.phase.Phase; //導入依賴的package包/類
public SpringAuthenticationInjectorInterceptor(UserProfileService userDetailsService,
		SecurityEnforcer securityEnforcer, SecurityHelper securityHelper, ActivationComputer activationComputer) {
    super();
    this.userDetailsService = userDetailsService;
    this.securityEnforcer = securityEnforcer;
    this.securityHelper = securityHelper;
    this.activationComputer = activationComputer;
    id = getClass().getName();
    phase = Phase.PRE_PROTOCOL;
    getAfter().add(WSS4JInInterceptor.class.getName());
}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:12,代碼來源:SpringAuthenticationInjectorInterceptor.java

示例2: testCustomerService

import org.apache.cxf.phase.Phase; //導入依賴的package包/類
@Test
public void testCustomerService() throws Exception {
    ClassPathXmlApplicationContext serverContext = null;
    ClassPathXmlApplicationContext clientContext = null;
    try {
        serverContext = new ClassPathXmlApplicationContext(
            new String[] {"spring-config/server-applicationContext.xml"});
        Object server = serverContext.getBean("org.apache.camel.itest.customerrelations.CustomerServiceV1");
        assertNotNull("We should get server here", server);

        // add an interceptor to verify headers
        EndpointImpl.class.cast(server).getServer().getEndpoint().getInInterceptors()
            .add(new HeaderChecker(Phase.READ));

        clientContext =  new ClassPathXmlApplicationContext(
            new String[] {"spring-config/client-applicationContext.xml"});
        CustomerServiceV1 customerService = clientContext.getBean("org.apache.camel.itest.customerrelations.CustomerServiceV1", CustomerServiceV1.class);

        // CXF 2.1.2 only apply the SOAPAction for the request message (in SoapPreProtocolOutInterceptor)
        // After went through the SOAP 1.1 specification, I got that the SOAPAction is only for the request message
        // So I comment out this HeaderChecker Interceptor setting up code
        /*JaxWsClientProxy.class.cast(Proxy.getInvocationHandler(customerService))
            .getClient().getInInterceptors().add(new HeaderChecker(Phase.READ));*/

        Customer customer = customerService.getCustomer("12345");
        assertNotNull("We should get Customer here", customer);
    } finally {
        // we're done so let's properly close the application contexts
        IOHelper.close(clientContext, serverContext);
    }
}
 
開發者ID:HydAu,項目名稱:Camel,代碼行數:32,代碼來源:CustomerServicesTest.java

示例3: ValidationInterceptor

import org.apache.cxf.phase.Phase; //導入依賴的package包/類
public ValidationInterceptor() {
    super(Phase.PRE_INVOKE);
    ValidatorFactory defaultFactory = Validation.buildDefaultValidatorFactory();
    validator = defaultFactory.getValidator();
    if (validator == null) {
        log.warn("Bean Validation provider could not be found, no validation will be performed");
    } else {
        log.debug("Validation In-Interceptor initialized successfully");
    }
}
 
開發者ID:wso2,項目名稱:carbon-device-mgt,代碼行數:11,代碼來源:ValidationInterceptor.java

示例4: customizeEndpoint

import org.apache.cxf.phase.Phase; //導入依賴的package包/類
@Override
public void customizeEndpoint(Endpoint endpoint) {
    EndpointImpl e = (EndpointImpl) endpoint;

    e.getServer().getEndpoint().getInInterceptors().add(new TimingBeforeInterceptor(Phase.RECEIVE));
    e.getServer().getEndpoint().getOutInterceptors().add(new TimingAfterInterceptor(Phase.SEND, metricRegistry));
}
 
開發者ID:kantega,項目名稱:respiro,代碼行數:8,代碼來源:CxfMetricsPlugin.java

示例5: HandlerChainSortInterceptor

import org.apache.cxf.phase.Phase; //導入依賴的package包/類
public HandlerChainSortInterceptor(Binding b)
{
   super(Phase.PRE_PROTOCOL);
   binding = b;
   //initially sort and reset the handler chain; if the chain is not modified later, the sort process
   //in handleMessage() deals with an already ordered list and is very efficient (~ O(n) according to
   //Collections.sort(..) javadoc.
   @SuppressWarnings("rawtypes")
   List<Handler> hc = binding.getHandlerChain();
   if (hc.size() > 1) { //no need to sort etc if the chain is empty or has one handler only
      Collections.sort(hc, comparator);
      binding.setHandlerChain(hc);
   }
}
 
開發者ID:jbossws,項目名稱:jbossws-cxf,代碼行數:15,代碼來源:HandlerChainSortInterceptor.java

示例6: NsCtxSelectorStoreInterceptor

import org.apache.cxf.phase.Phase; //導入依賴的package包/類
public NsCtxSelectorStoreInterceptor()
{
   super(Phase.PRE_LOGICAL);
   addBefore(OneWayProcessorInterceptor.class.getName());
   ClassLoader cl = ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
   factory = (NamespaceContextSelectorWrapperFactory) ServiceLoader.loadService(
         NamespaceContextSelectorWrapperFactory.class.getName(), null, cl);
}
 
開發者ID:jbossws,項目名稱:jbossws-cxf,代碼行數:9,代碼來源:NsCtxSelectorStoreInterceptor.java

示例7: JaspiSeverInInterceptor

import org.apache.cxf.phase.Phase; //導入依賴的package包/類
public JaspiSeverInInterceptor(JaspiServerAuthenticator authManager)
{
   super(Phase.PRE_PROTOCOL);
   addAfter(SAAJInInterceptor.class.getName());
   addBefore("org.jboss.wsf.stack.cxf.security.authentication.JaspiSubjectCreatingInterceptor");
   this.authManager = authManager;
}
 
開發者ID:jbossws,項目名稱:jbossws-cxf,代碼行數:8,代碼來源:JaspiSeverInInterceptor.java

示例8: EbMSSecSignatureInInterceptor

import org.apache.cxf.phase.Phase; //導入依賴的package包/類
public EbMSSecSignatureInInterceptor()
{
	super(Phase.POST_STREAM);
	addAfter(StaxInInterceptor.class.getName());
	//FIXME move to mule init bean??? 
	org.apache.xml.security.Init.init();
}
 
開發者ID:mprins,項目名稱:muleebmsadapter,代碼行數:8,代碼來源:EbMSSecSignatureInInterceptor.java

示例9: XMLSecSignatureInInterceptor

import org.apache.cxf.phase.Phase; //導入依賴的package包/類
public XMLSecSignatureInInterceptor()
{
	super(Phase.POST_STREAM);
	addAfter(StaxInInterceptor.class.getName());
	//FIXME move to mule init bean??? 
	org.apache.xml.security.Init.init();
}
 
開發者ID:mprins,項目名稱:muleebmsadapter,代碼行數:8,代碼來源:XMLSecSignatureInInterceptor.java

示例10: XMLSecSignatureOutInterceptor

import org.apache.cxf.phase.Phase; //導入依賴的package包/類
public XMLSecSignatureOutInterceptor()
{
	this(Phase.WRITE);
	addBefore(SoapOutInterceptor.class.getName());
	//super(Phase.PRE_STREAM);
	//addAfter(StaxOutInterceptor.class.getName());
	//FIXME move to mule init bean??? 
	org.apache.xml.security.Init.init();
}
 
開發者ID:mprins,項目名稱:muleebmsadapter,代碼行數:10,代碼來源:XMLSecSignatureOutInterceptor.java

示例11: XMLSecSignatureOutEndingInterceptor

import org.apache.cxf.phase.Phase; //導入依賴的package包/類
public XMLSecSignatureOutEndingInterceptor()
{
	this(XMLSecSignatureOutEndingInterceptor.class.getName(),Phase.WRITE_ENDING);
	addAfter(SoapOutInterceptor.SoapOutEndingInterceptor.class.getName());
	//super(XMLsecSignatureOutEndingInterceptor.class.getName(),Phase.PRE_STREAM_ENDING);
	//addBefore(StaxOutInterceptor.StaxOutEndingInterceptor.class.getName());
}
 
開發者ID:mprins,項目名稱:muleebmsadapter,代碼行數:8,代碼來源:XMLSecSignatureOutInterceptor.java

示例12: EbMSSecSignatureOutInterceptor

import org.apache.cxf.phase.Phase; //導入依賴的package包/類
public EbMSSecSignatureOutInterceptor()
{
	this(Phase.WRITE);
	addBefore(SoapOutInterceptor.class.getName());
	//super(Phase.PRE_STREAM);
	//addAfter(StaxOutInterceptor.class.getName());
	//FIXME move to mule init bean??? 
	org.apache.xml.security.Init.init();
}
 
開發者ID:mprins,項目名稱:muleebmsadapter,代碼行數:10,代碼來源:EbMSSecSignatureOutInterceptor.java

示例13: XMLDSignatureOutInterceptor

import org.apache.cxf.phase.Phase; //導入依賴的package包/類
public XMLDSignatureOutInterceptor()
{
	super(Phase.WRITE);
	addBefore(SoapOutInterceptor.class.getName());
	//super(Phase.PRE_STREAM);
	//addAfter(StaxOutInterceptor.class.getName());
}
 
開發者ID:mprins,項目名稱:muleebmsadapter,代碼行數:8,代碼來源:XMLDSignatureOutInterceptor.java

示例14: XMLDSignatureOutEndingInterceptor

import org.apache.cxf.phase.Phase; //導入依賴的package包/類
public XMLDSignatureOutEndingInterceptor()
{
	super(XMLDSignatureOutEndingInterceptor.class.getName(),Phase.WRITE_ENDING);
	addAfter(SoapOutInterceptor.SoapOutEndingInterceptor.class.getName());
	//super(XMLDSignatureOutEndingInterceptor.class.getName(),Phase.PRE_STREAM_ENDING);
	//addBefore(StaxOutInterceptor.StaxOutEndingInterceptor.class.getName());
}
 
開發者ID:mprins,項目名稱:muleebmsadapter,代碼行數:8,代碼來源:XMLDSignatureOutInterceptor.java

示例15: SpringAuthenticationInjectorInterceptor

import org.apache.cxf.phase.Phase; //導入依賴的package包/類
public SpringAuthenticationInjectorInterceptor(UserProfileService userDetailsService,
		SecurityEnforcer securityEnforcer, SecurityHelper securityHelper, ActivationComputer activationComputer,
		TaskManager taskManager) {
    super();
    this.userDetailsService = userDetailsService;
    this.securityEnforcer = securityEnforcer;
    this.securityHelper = securityHelper;
    this.activationComputer = activationComputer;
    this.taskManager = taskManager;
    id = getClass().getName();
    phase = Phase.PRE_PROTOCOL;
    getAfter().add(WSS4JInInterceptor.class.getName());
}
 
開發者ID:Evolveum,項目名稱:midpoint,代碼行數:14,代碼來源:SpringAuthenticationInjectorInterceptor.java


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