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


Java JAXRSServerFactoryBean.setTransportId方法代碼示例

本文整理匯總了Java中org.apache.cxf.jaxrs.JAXRSServerFactoryBean.setTransportId方法的典型用法代碼示例。如果您正苦於以下問題:Java JAXRSServerFactoryBean.setTransportId方法的具體用法?Java JAXRSServerFactoryBean.setTransportId怎麽用?Java JAXRSServerFactoryBean.setTransportId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.cxf.jaxrs.JAXRSServerFactoryBean的用法示例。


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

示例1: serverEndPoint

import org.apache.cxf.jaxrs.JAXRSServerFactoryBean; //導入方法依賴的package包/類
@Bean
public Server serverEndPoint(final SpringBus bus)
{
	final JacksonJaxbJsonProvider jacksonJaxbJsonProvider = new JacksonJaxbJsonProvider();

	final JMSConfigFeature jmsConfigFeature = createJMSConfigFeature();

	final JAXRSServerFactoryBean svrFactory = new JAXRSServerFactoryBean();
	svrFactory.setBus(bus);
	svrFactory.setResourceClasses(AgentSync.class);

	svrFactory.getFeatures().add(jmsConfigFeature);
	svrFactory.getFeatures().add(loggingFeature);

	svrFactory.setProvider(jacksonJaxbJsonProvider);
	svrFactory.setAddress("/");
	svrFactory.setTransportId("http://cxf.apache.org/transports/jms");

	final Server server = svrFactory.create();
	return server;
}
 
開發者ID:metasfresh,項目名稱:metasfresh-procurement-webui,代碼行數:22,代碼來源:SyncConfiguration.java

示例2: createServerEndPoints

import org.apache.cxf.jaxrs.JAXRSServerFactoryBean; //導入方法依賴的package包/類
private void createServerEndPoints(
		final CreateEndpointRequest<?> request,
		final boolean stopAutomaticEndpointsfirst)
{
	if (stopAutomaticEndpointsfirst)
	{
		destroyServerEndPoints();
	}

	final JacksonJaxbJsonProvider jacksonJaxbJsonProvider = new JacksonJaxbJsonProvider();

	final JAXRSServerFactoryBean svrFactory = new JAXRSServerFactoryBean();
	// svrFactory.setBus(bus);

	final List<Class<?>> endpointClasses = ImmutableList.<Class<?>> copyOf(request.getEndpointClasses()).reverse();
	svrFactory.setResourceClasses(endpointClasses);
	// svrFactory.setBus(bus); see the commented out "spring" section below

	svrFactory.setProvider(jacksonJaxbJsonProvider);
	svrFactory.getFeatures().add(createJMSConfigFeature(
			request.getRequestQueue(),
			request.getResponseQueue()));

	if (loggingFeature != null)
	{
		svrFactory.getFeatures().add(loggingFeature);
	}
	else
	{
		logger.warn("Skip adding {} because is null", LoggingFeature.class);
	}

	svrFactory.setAddress("/");
	svrFactory.setTransportId("http://cxf.apache.org/transports/jms");

	automaticEndpointsServer = svrFactory.create();

	logger.info("Created server {} for {}", automaticEndpointsServer, request);
}
 
開發者ID:metasfresh,項目名稱:metasfresh,代碼行數:40,代碼來源:JaxRsBL.java

示例3: createServer

import org.apache.cxf.jaxrs.JAXRSServerFactoryBean; //導入方法依賴的package包/類
private Server createServer(final List<Class<?>> providers)
{
	final JacksonJaxbJsonProvider jacksonJaxbJsonProvider = new JacksonJaxbJsonProvider();

	final JAXRSServerFactoryBean svrFactory = new JAXRSServerFactoryBean();
	svrFactory.setResourceClasses(providers);
	svrFactory.setProvider(jacksonJaxbJsonProvider);
	svrFactory.getFeatures().add(setupJMSConfiguration());
	svrFactory.setAddress("/");
	svrFactory.setTransportId("http://cxf.apache.org/transports/jms");

	final Server server = svrFactory.create();
	return server;
}
 
開發者ID:metasfresh,項目名稱:metasfresh,代碼行數:15,代碼來源:JaxRsProgramaticTests.java

示例4: createServer

import org.apache.cxf.jaxrs.JAXRSServerFactoryBean; //導入方法依賴的package包/類
private Server createServer()
{
	final JacksonJaxbJsonProvider jacksonJaxbJsonProvider = new JacksonJaxbJsonProvider();

	final JAXRSServerFactoryBean svrFactory = new JAXRSServerFactoryBean();
	svrFactory.setResourceClasses(TestService.class);
	svrFactory.setProvider(jacksonJaxbJsonProvider);
	svrFactory.getFeatures().add(createJMSConfiguration());
	svrFactory.setAddress("/");
	svrFactory.setTransportId("http://cxf.apache.org/transports/jms");

	final Server server = svrFactory.create();
	return server;
}
 
開發者ID:metasfresh,項目名稱:metasfresh,代碼行數:15,代碼來源:JaxRsOneWayTests.java


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