use of org.apache.cxf.jaxrs.rx2.server.ReactiveIOInvoker in project cxf by apache.
the class RxJava2ObservableServer method run.
protected void run() {
Bus bus = BusFactory.getDefaultBus();
// Make sure default JSONProvider is not loaded
bus.setProperty("skip.default.json.provider.registration", true);
JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
sf.setInvoker(new ReactiveIOInvoker());
sf.setProvider(new JacksonJsonProvider());
sf.getOutInterceptors().add(new LoggingOutInterceptor());
sf.setResourceClasses(RxJava2ObservableService.class);
sf.setResourceProvider(RxJava2ObservableService.class, new SingletonResourceProvider(new RxJava2ObservableService(), true));
sf.setAddress("http://localhost:" + PORT + "/");
server = sf.create();
}
Aggregations