Package org.apache.cxf.jaxrs

Examples of org.apache.cxf.jaxrs.JAXRSBindingFactory


    sf.setResourceProvider(MetadataResource.class,
        new SingletonResourceProvider(new MetadataResource()));
    sf.setAddress(endPoint + "/");
    BindingFactoryManager manager = sf.getBus().getExtension(
        BindingFactoryManager.class);
    JAXRSBindingFactory factory = new JAXRSBindingFactory();
    factory.setBus(sf.getBus());
    manager.registerBindingFactory(JAXRSBindingFactory.JAXRS_BINDING_ID,
        factory);
    server = sf.create();
  }
View Full Code Here


    providers.add(new CSVMessageBodyWriter());
    providers.add(new JSONMessageBodyWriter());
    sf.setProviders(providers);
    sf.setAddress(endPoint + "/");
    BindingFactoryManager manager = sf.getBus().getExtension(BindingFactoryManager.class);
    JAXRSBindingFactory factory = new JAXRSBindingFactory();
    factory.setBus(sf.getBus());
    manager.registerBindingFactory(JAXRSBindingFactory.JAXRS_BINDING_ID, factory);
    server = sf.create();
  }
View Full Code Here

    sf.setResourceProvider(UnpackerResource.class,
        new SingletonResourceProvider(new UnpackerResource()));
    sf.setAddress(endPoint + "/");
    BindingFactoryManager manager = sf.getBus().getExtension(
        BindingFactoryManager.class);
    JAXRSBindingFactory factory = new JAXRSBindingFactory();
    factory.setBus(sf.getBus());
    manager.registerBindingFactory(JAXRSBindingFactory.JAXRS_BINDING_ID,
        factory);
    server = sf.create();
  }
View Full Code Here

    BindingFactoryManager manager = sf.getBus().getExtension(
        BindingFactoryManager.class
    );

    JAXRSBindingFactory factory = new JAXRSBindingFactory();
    factory.setBus(sf.getBus());

    manager.registerBindingFactory(
        JAXRSBindingFactory.JAXRS_BINDING_ID,
        factory
    );
View Full Code Here

      providers.add(new SingletonResourceProvider(new TikaVersion()));
      sf.setProviders(providers);
      sf.setAddress("http://" + host + ":" + port + "/");
      BindingFactoryManager manager = sf.getBus().getExtension(
        BindingFactoryManager.class);
      JAXRSBindingFactory factory = new JAXRSBindingFactory();
      factory.setBus(sf.getBus());
      manager.registerBindingFactory(JAXRSBindingFactory.JAXRS_BINDING_ID,
        factory);
      sf.create();
      logger.info("Started");
    } catch (Exception ex) {
View Full Code Here

    sf.setResourceProvider(TikaResource.class,
        new SingletonResourceProvider(new TikaResource()));
    sf.setAddress(endPoint + "/");
    BindingFactoryManager manager = sf.getBus().getExtension(
        BindingFactoryManager.class);
    JAXRSBindingFactory factory = new JAXRSBindingFactory();
    factory.setBus(sf.getBus());
    manager.registerBindingFactory(JAXRSBindingFactory.JAXRS_BINDING_ID,
        factory);
    server = sf.create();
  }
View Full Code Here

    sf.setResourceProvider(TikaResource.class,
        new SingletonResourceProvider(new TikaResource()));
    sf.setAddress(endPoint + "/");
    BindingFactoryManager manager = sf.getBus().getExtension(
        BindingFactoryManager.class);
    JAXRSBindingFactory factory = new JAXRSBindingFactory();
    factory.setBus(sf.getBus());
    manager.registerBindingFactory(JAXRSBindingFactory.JAXRS_BINDING_ID,
        factory);
    server = sf.create();
  }
View Full Code Here

      providers.add(new SingletonResourceProvider(new TikaVersion()));
      sf.setProviders(providers);
      sf.setAddress("http://localhost:" + TikaServerCli.DEFAULT_PORT + "/");
      BindingFactoryManager manager = sf.getBus().getExtension(
        BindingFactoryManager.class);
      JAXRSBindingFactory factory = new JAXRSBindingFactory();
      factory.setBus(sf.getBus());
      manager.registerBindingFactory(JAXRSBindingFactory.JAXRS_BINDING_ID,
        factory);
      Server server = sf.create();
      logger.info("Started");
    } catch (Exception ex) {
View Full Code Here

            // force init of bindings
            if (!CxfUtil.hasService(JAXRSBindingFactory.JAXRS_BINDING_ID)) {
                // cxf does it but with the pattern "if not here install it". It is slow so installing it without testing for presence here.
                final BindingFactoryManager bfm = bus.getExtension(BindingFactoryManager.class);
                try {
                    bfm.registerBindingFactory(JAXRSBindingFactory.JAXRS_BINDING_ID, new JAXRSBindingFactory(bus));
                } catch (final Throwable b) {
                    // no-op
                }
            }
        } finally {
View Full Code Here

            // force init of bindings
            if (!CxfUtil.hasService(JAXRSBindingFactory.JAXRS_BINDING_ID)) {
                // cxf does it but with the pattern "if not here install it". It is slow so installing it without testing for presence here.
                final BindingFactoryManager bfm = bus.getExtension(BindingFactoryManager.class);
                try {
                    bfm.registerBindingFactory(JAXRSBindingFactory.JAXRS_BINDING_ID, new JAXRSBindingFactory(bus));
                } catch (Throwable b) {
                    // no-op
                }
            }
        } finally {
View Full Code Here

TOP

Related Classes of org.apache.cxf.jaxrs.JAXRSBindingFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.