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


Java Bus.setProperty方法代码示例

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


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

示例1: testAysncClientWithPolicy

import org.apache.cxf.Bus; //导入方法依赖的package包/类
@Test
@RunAsClient
public void testAysncClientWithPolicy () throws Exception 
{
   Bus bus = BusFactory.newInstance().createBus();
   AsyncEnabledInfoInterceptor asyncInfo = new AsyncEnabledInfoInterceptor();
   try
   {
      bus.setProperty("use.async.http.conduit", "ASYNC_ONLY");
      bus.getOutInterceptors().add(asyncInfo);
      BusFactory.setThreadDefaultBus(bus);
      Endpoint proxy = initPort();
      assertEquals("Echo:1000", proxy.echo(1000));
      assertFalse("Async client is expected disabled", asyncInfo.isAsyncEnabled());
      assertEquals("Echo:1000", proxy.echoAsync(1000).get());
      assertTrue("Async client is expected enabled", asyncInfo.isAsyncEnabled());
   }
   finally
   {
      bus.shutdown(true);
   }
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:23,代码来源:AsyncClientTestCase.java

示例2: loadBus

import org.apache.cxf.Bus; //导入方法依赖的package包/类
@Override
protected void loadBus(ServletConfig sc)
{
	Thread currentThread = Thread.currentThread();
	ClassLoader oldLoader = currentThread.getContextClassLoader();
	try
	{
		currentThread.setContextClassLoader(getClass().getClassLoader());
		Bus bus = new ExtensionManagerBus();
		setBus(bus);
		List<Extension> exts = interceptorTracker.getExtensions();
		List<Interceptor<? extends Message>> inInterceptors = bus.getInInterceptors();
		for( Extension extension : exts )
		{
			Collection<Parameter> inParams = extension.getParameters("inBean");
			for( Parameter inParam : inParams )
			{
				inInterceptors.add(interceptorTracker.getBeanByParameter(extension, inParam));
			}
			Collection<Parameter> outParams = extension.getParameters("outBean");
			for( Parameter outParam : outParams )
			{
				bus.getOutInterceptors().add(interceptorTracker.getBeanByParameter(extension, outParam));
			}
		}
		inInterceptors.add(new WebServiceContextIntercept());
		bus.setProperty("org.apache.cxf.logging.FaultListener", new SoapFaultListener());
	}
	finally
	{
		currentThread.setContextClassLoader(oldLoader);
	}
}
 
开发者ID:equella,项目名称:Equella,代码行数:34,代码来源:CXFHandler.java

示例3: busRegistered

import org.apache.cxf.Bus; //导入方法依赖的package包/类
public void busRegistered( Bus bus )
{
    LOG.info( "Adding LoggingFeature interceptor on bus: " + bus.getId() );

    //********Set BUS Message Size to 500 KB ************************
    bus.setProperty( "bus.io.CachedOutputStream.Threshold", "500000" );
    System.setProperty( "org.apache.cxf.io.CachedOutputStream.Threshold", "500000" );
    LOG.info( "Setting CXF CachedOutputStream.Threshold size to: 500Kb " );
    //***************************************************************
    bus.setProperty( AsyncHTTPConduit.USE_ASYNC, Boolean.TRUE );
    //***************************************************************

    // initialise the feature on the bus, which will add the interceptors

    //***** RECEIVE    **********************************
    bus.getInInterceptors().add( new AccessControlInterceptor( identityManager ) );

    //***** PRE_STREAM **********************************
    bus.getOutInterceptors().add( new ClientOutInterceptor( securityManager, peerManager ) );

    //***** POST_LOGICAL **********************************
    bus.getOutInterceptors().add( new ClientHeaderInterceptor( peerManager ) );

    //***** RECEIVE    **********************************
    bus.getInInterceptors().add( new ServerInInterceptor( securityManager, peerManager ) );

    //***** PRE_STREAM **********************************
    bus.getOutInterceptors().add( new ServerOutInterceptor( securityManager, peerManager ) );

    //***** RECEIVE    **********************************
    bus.getInInterceptors().add( new ClientInInterceptor( securityManager, peerManager ) );


    LOG.info( "Successfully added LoggingFeature interceptor on bus: " + bus.getId() );
}
 
开发者ID:subutai-io,项目名称:base,代码行数:36,代码来源:ServerBusListener.java


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