本文整理汇总了Java中org.apache.cxf.bus.spring.SpringBus类的典型用法代码示例。如果您正苦于以下问题:Java SpringBus类的具体用法?Java SpringBus怎么用?Java SpringBus使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SpringBus类属于org.apache.cxf.bus.spring包,在下文中一共展示了SpringBus类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: serverEndPoint
import org.apache.cxf.bus.spring.SpringBus; //导入依赖的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: instrumentationManager
import org.apache.cxf.bus.spring.SpringBus; //导入依赖的package包/类
@Bean
public InstrumentationManager instrumentationManager(SpringBus cxf) {
InstrumentationManagerImpl impl = new InstrumentationManagerImpl();
impl.setEnabled(true);
impl.setBus(cxf);
impl.setUsePlatformMBeanServer(true);
return impl;
}
示例3: springBus
import org.apache.cxf.bus.spring.SpringBus; //导入依赖的package包/类
/**
* Help by: http://stackoverflow.com/a/31988136
*
* logFeature.initialize(springBus) is not needed, because during the init of bus it will call f.initialize(this)
* in {@link org.apache.cxf.bus.extension.ExtensionManagerBus#initializeFeatures()} anyway
*/
@Bean(name = Bus.DEFAULT_BUS_ID, destroyMethod = "shutdown")
public SpringBus springBus() {
SpringBus bus = new SpringBus();
bus.getFeatures().add(new LoggingFeature()); // Log incoming/outgoing messages
return bus;
}
示例4: counterRepository
import org.apache.cxf.bus.spring.SpringBus; //导入依赖的package包/类
@Bean
public CounterRepository counterRepository(SpringBus cxf) {
CounterRepository repository = new CounterRepository();
repository.setBus(cxf);
return repository;
}
示例5: configureCxfBus
import org.apache.cxf.bus.spring.SpringBus; //导入依赖的package包/类
@Bean(name = "cxf", destroyMethod = "shutdown")
public SpringBus configureCxfBus() {
final SpringBus bus = new SpringBus();
List<Feature> features = new ArrayList<>();
features.add(loggingFeature());
bus.setFeatures(features);
bus.setId("cxf");
CamelTransportFactory camelTransportFactory = new CamelTransportFactory();
camelTransportFactory.setCamelContext(camelContext);
camelTransportFactory.setBus(bus);
// bus.getExtension(CamelTransportFactory.class).setCamelContext(camelContext);
return bus;
}
示例6: jaxRsServer
import org.apache.cxf.bus.spring.SpringBus; //导入依赖的package包/类
@Bean
public Server jaxRsServer(){
List<ResourceProvider> resourceProviders = new LinkedList<ResourceProvider>();
for (String beanName : ctx.getBeanDefinitionNames()) {
if (ctx.findAnnotationOnBean(beanName, Path.class) != null) {
SpringResourceFactory resourceFactory = new SpringResourceFactory(beanName);
resourceFactory.setApplicationContext(ctx);
resourceProviders.add(resourceFactory);
}
}
JAXRSServerFactoryBean factory = new JAXRSServerFactoryBean();
factory.setBus(ctx.getBean(SpringBus.class));
JacksonJsonProvider jacksonJsonProvider = new JacksonJsonProvider();
ObjectMapper objectMapper = new ObjectMapper();
//set up ISO 8601 date/time stamp format:
final DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:sss'Z'");
df.setTimeZone(TimeZone.getTimeZone("UTC"));
objectMapper.setDateFormat(df);
jacksonJsonProvider.setMapper(objectMapper);
factory.setProviders(Arrays.asList(jacksonJsonProvider, new DefaultExceptionMapper()));
factory.setResourceProviders(resourceProviders);
return factory.create();
}
示例7: springBus
import org.apache.cxf.bus.spring.SpringBus; //导入依赖的package包/类
@Bean(name = SpringBus.DEFAULT_BUS_ID)
public SpringBus springBus() {
return new SpringBus();
}
示例8: springBus
import org.apache.cxf.bus.spring.SpringBus; //导入依赖的package包/类
@Bean(name = "cxf")
public SpringBus springBus() {
return new SpringBus();
}
示例9: cxf
import org.apache.cxf.bus.spring.SpringBus; //导入依赖的package包/类
/**
* Creates the cxf bus. Note that "cxf is the bean's default name. If you give it a different name, you need to make it know to e.g. the CXFServlet.
*
* @return
*/
@Bean(name = "cxf")
public SpringBus cxf()
{
return new SpringBus();
}
示例10: springBus
import org.apache.cxf.bus.spring.SpringBus; //导入依赖的package包/类
@Bean(name = Bus.DEFAULT_BUS_ID)
public SpringBus springBus() {
return new SpringBus();
}
示例11: cxfBus
import org.apache.cxf.bus.spring.SpringBus; //导入依赖的package包/类
@Bean
public SpringBus cxfBus()
{
return new SpringBus();
}
示例12: cxf
import org.apache.cxf.bus.spring.SpringBus; //导入依赖的package包/类
@Bean(destroyMethod = "shutdown")
public SpringBus cxf() {
System.out.println( "CxfConfig: cxf bean" );
return new SpringBus();
}
示例13: cxf
import org.apache.cxf.bus.spring.SpringBus; //导入依赖的package包/类
@Bean( destroyMethod = "shutdown" )
public SpringBus cxf() {
return new SpringBus();
}
示例14: cxf
import org.apache.cxf.bus.spring.SpringBus; //导入依赖的package包/类
@Bean(destroyMethod = "shutdown", name = "cxf")
public SpringBus cxf() {
return new SpringBus();
}
示例15: cxf
import org.apache.cxf.bus.spring.SpringBus; //导入依赖的package包/类
@Bean( destroyMethod = "shutdown" )
public SpringBus cxf() {
return new SpringBus();
}