Examples of PackagesResourceConfig


Examples of com.sun.jersey.api.core.PackagesResourceConfig

    }
    return authFilter;
  }

  public PackagesResourceConfig makeJerseyConfig() {
    PackagesResourceConfig rc
      = new PackagesResourceConfig("org.apache.hive.hcatalog.templeton");
    HashMap<String, Object> props = new HashMap<String, Object>();
    props.put("com.sun.jersey.api.json.POJOMappingFeature", "true");
    props.put("com.sun.jersey.config.property.WadlGeneratorConfig",
      "org.apache.hive.hcatalog.templeton.WadlConfig");
    rc.setPropertiesAndFeatures(props);

    return rc;
  }
View Full Code Here

Examples of com.sun.jersey.api.core.PackagesResourceConfig

    public static final URI BASE_URI = getBaseURI();

    protected static HttpServer startServer() throws IOException {
        System.out.println("Starting grizzly...");
        ResourceConfig rc = new PackagesResourceConfig("com.sun.jersey.samples.helloworld.resources");
        return GrizzlyServerFactory.createHttpServer(BASE_URI, rc);
    }
View Full Code Here

Examples of com.sun.jersey.api.core.PackagesResourceConfig

    public static final URI BASE_URI = getBaseURI();

    protected static HttpServer startServer() throws IOException {

        ResourceConfig rc = new PackagesResourceConfig(PropertiesProvider.class.getPackage().getName());

        System.out.println("Starting grizzly...");
        return GrizzlyServerFactory.createHttpServer(BASE_URI, rc);
    }
View Full Code Here

Examples of com.sun.jersey.api.core.PackagesResourceConfig

    }

    public static final URI BASE_URI = getBaseURI();
   
    protected static HttpServer startServer() throws IOException {
        ResourceConfig resourceConfig = new PackagesResourceConfig("$package");

        System.out.println("Starting grizzly2...");
        return GrizzlyServerFactory.createHttpServer(BASE_URI, resourceConfig);
    }
View Full Code Here

Examples of com.sun.jersey.api.core.PackagesResourceConfig

            // use the packages resource config
            String packages = webConfig.getInitParameter(
                    PackagesResourceConfig.PROPERTY_PACKAGES);
            if (packages != null) {
                props.put(PackagesResourceConfig.PROPERTY_PACKAGES, packages);
                return new PackagesResourceConfig(props);
            }

            ResourceConfig defaultConfig = webConfig.getDefaultResourceConfig(props);
            if (defaultConfig != null)
                return defaultConfig;
View Full Code Here

Examples of com.sun.jersey.api.core.PackagesResourceConfig

            // use the packages resource config
            String packages = webConfig.getInitParameter(
                    PackagesResourceConfig.PROPERTY_PACKAGES);
            if (packages != null) {
                props.put(PackagesResourceConfig.PROPERTY_PACKAGES, packages);
                return new PackagesResourceConfig(props);
            }

            ResourceConfig defaultConfig = webConfig.getDefaultResourceConfig(props);
            if (defaultConfig != null)
                return defaultConfig;
View Full Code Here

Examples of com.sun.jersey.api.core.PackagesResourceConfig

    }

    private ApplicationDescription createApplicationDescription( String[] paths, WadlGenerator wadlGenerator ) throws MojoExecutionException {
        final Map<String, Object> map = new HashMap<String, Object>();
        map.put( PackagesResourceConfig.PROPERTY_PACKAGES, paths );
        final ResourceConfig rc = new PackagesResourceConfig( map );
        final Set<AbstractResource> s = new HashSet<AbstractResource>();
        for (Class<?> c : rc.getRootResourceClasses()) {
            getLog().debug( "Adding class " + c.getName() );
            s.add( IntrospectionModeller.createResource(c) );
        }
        return new WadlBuilder( wadlGenerator ).generate( null, s );
    }
View Full Code Here

Examples of com.sun.jersey.api.core.PackagesResourceConfig

    public static final URI BASE_URI = getBaseURI();
  
    public static HttpServer startServer() throws IOException{

        ResourceConfig rc = new PackagesResourceConfig("com.sun.jersey.samples.jsonp");
        return GrizzlyServerFactory.createHttpServer(BASE_URI, rc);
    }
View Full Code Here

Examples of com.sun.jersey.api.core.PackagesResourceConfig

    public static final URI BASE_URI = getBaseURI();
       
    public static HttpServer startServer() throws IOException {

        ResourceConfig rc = new PackagesResourceConfig(JAXBResource.class.getPackage().getName());
        return GrizzlyServerFactory.createHttpServer(BASE_URI, rc);
    }
View Full Code Here

Examples of com.sun.jersey.api.core.PackagesResourceConfig

    @Override
    protected ResourceConfig getDefaultResourceConfig(Map<String, Object> props,
                                                      WebConfig webConfig) throws ServletException {
        props.put(PackagesResourceConfig.PROPERTY_PACKAGES, packages);
        return new PackagesResourceConfig(props) {
            @Override
            public Set<Class<?>> getProviderClasses() {
                Set<Class<?>> providers = super.getProviderClasses();
                // remove conflicting provider if present
                providers.remove(FreemarkerTemplateProvider.class);
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.