本文整理匯總了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;
}
示例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);
}
示例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;
}
示例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;
}