Package org.apache.cxf.jaxrs

Examples of org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create()


            setExtensions(bean, servletConfig);
            setDocLocation(bean, servletConfig);
            setSchemasLocations(bean, servletConfig);
           
            bean.setBus(getBus());
            bean.create();
        }
    }
   
    protected Application createApplicationInstance(String appClassName, ServletConfig servletConfig)
        throws ServletException {
View Full Code Here


        factory.setInInterceptors(getInInterceptors());
        factory.setOutInterceptors(getOutInterceptors());
        factory.setOutFaultInterceptors(getOutFaultInterceptors());
        factory.setFeatures(getFeatures());
        finalizeFactorySetup(factory);
        return factory.create();
    }
   
    @Override
    public void setApplicationContext(ApplicationContext ac) throws BeansException {
        applicationContext = ac;
View Full Code Here

        factory.setResourceProvider(type, new SingletonResourceProvider(impl));
        List<Object> providers = new ArrayList<Object>();
      providers.add(new AegisElementProvider());
      factory.setProviders(providers);
       
      return factory.create();
    }
   
}
View Full Code Here

            }, address,intents);
            EndpointDescription endpdDesc = null;
           
           
            Thread.currentThread().setContextClassLoader(JAXRSServerFactoryBean.class.getClassLoader());
            Server server = factory.create();
            registerStopHook(bus, httpService, server, contextRoot, Constants.RS_HTTP_SERVICE_CONTEXT);

            endpdDesc = new EndpointDescription(endpointProps);
            exportRegistration.setServer(server);
           
View Full Code Here

                Constants.RS_CONFIG_TYPE
            }, address,intents);
            EndpointDescription endpdDesc = null;

            Thread.currentThread().setContextClassLoader(JAXRSServerFactoryBean.class.getClassLoader());
            Server server = factory.create();
            exportRegistration.setServer(server);
            endpdDesc = new EndpointDescription(endpointProps);

            // add the information on the new Endpoint to the export registration
            exportRegistration.setEndpointdescription(endpdDesc);
View Full Code Here

        bean.setResourceClasses(resourceClasses);
        bean.setProviders(providers);
        for (Map.Entry<Class, ResourceProvider> entry : resourceProviders.entrySet()) {
            bean.setResourceProvider(entry.getKey(), entry.getValue());
        }
        bean.create();
    }

    protected void setSchemasLocations(JAXRSServerFactoryBean bean, ServletConfig servletConfig) {
        String schemas = servletConfig.getInitParameter(SCHEMAS_PARAM);
        if (schemas == null) {
View Full Code Here

        }
       
        String ignoreParam = servletConfig.getInitParameter(IGNORE_APP_PATH_PARAM);
        JAXRSServerFactoryBean bean = ResourceUtils.createApplication(app, MessageUtils.isTrue(ignoreParam));
       
        bean.create();
    }
   
    private Class<?> loadClass(String cName) throws ServletException {
        return loadClass(cName, "Resource");
    }
View Full Code Here

            factory.setServiceBean(serviceBean);
        } else {
            factory.setServiceClass(clazz);
        }

        server = factory.create();
        destination = (AbstractHTTPDestination) server.getDestination();
    }

    public void undeploy() {
        server.stop();
View Full Code Here

        sf.setOutFaultInterceptors(outFaultInts);
        sf.setResourceProvider(BookStore.class,
                               new SingletonResourceProvider(new BookStore(), true));
        sf.setAddress("http://localhost:9080/");

        sf.create();       
    }

    public static void main(String[] args) {
        try {
            BookServer s = new BookServer();
View Full Code Here

            sf.setProviders(providers);
            sf.setAddress("http://localhost:9080/");
            Map<String, Object> properties = new HashMap<String, Object>();
            properties.put("org.apache.cxf.serviceloader-context", "true");
            sf.setProperties(properties);
            sf.create();

        }

        public static void main(String[] args) {
            try {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.