Examples of PackagesResourceConfig


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

   
    public static void main(String[] args) throws IOException {
       
        final String baseUri = "http://localhost:9998/sparklines/";

        ResourceConfig rc = new PackagesResourceConfig("com.sun.jersey.samples.sparklines");

        System.out.println("Starting grizzly...");
        HttpServer httpServer = GrizzlyServerFactory.createHttpServer(baseUri, rc);
        System.out.println(String.format("Jersey app started with WADL available at %sapplication.wadl\n" +
                "Try out %sdiscrete?d=88,84,82,92,82,86,66,82,44,64,66,88,96,80,24,26,14,0,0,26,8,6,6,24,52,66,36,6,10,14,30\n" +
View Full Code Here

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

    // enable jsp's
    context.addServlet(JspServlet.class, "/jsp/*.jsp");

    // enable Jersey REST endpoints
    final PackagesResourceConfig rcf = new PackagesResourceConfig(
        DynamicPropertyFactory
            .getInstance()
            .getStringProperty("jersey.resources.package",
                "not-found-in-configuration").get());
   
View Full Code Here

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

   
    // listen on any interface
    this.host = DynamicPropertyFactory.getInstance().getStringProperty("netty.http.host", "not-found-in-configuration").get();
    this.port = DynamicPropertyFactory.getInstance().getIntProperty("netty.http.port", Integer.MIN_VALUE).get();

    PackagesResourceConfig rcf = new PackagesResourceConfig(
        DynamicPropertyFactory.getInstance().getStringProperty("jersey.resources.package",
            "not-found-in-configuration").get());

    nettyServer = NettyServer
        .builder()
View Full Code Here

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

     * @throws java.io.IOException if there is an error starting the Grizzly
     *         HTTP container.
     */
    protected static HttpServer startServer() throws IOException {

        ResourceConfig rc = new PackagesResourceConfig("com.sun.jersey.samples.storageservice.resources");

        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();
    public static final int defaultPort = 9998;

    protected static HttpServer startServer() throws IOException {

        ResourceConfig rc = new PackagesResourceConfig("com.sun.jersey.samples.console");

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

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

      Server server = new Server(port);
      ServletContextHandler context = new ServletContextHandler(ServletContextHandler.NO_SESSIONS);
      context.setContextPath("/");
      server.setHandler(context);

      context.addServlet(new ServletHolder(new ServletContainer(new PackagesResourceConfig("org.apache.tika.server"))), "/*");

      server.start();

      logger.info("Started");

View Full Code Here

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

        }
        return authFilter;
    }

    public PackagesResourceConfig makeJerseyConfig() {
        PackagesResourceConfig rc
            = new PackagesResourceConfig("org.apache.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.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 LowLevelAppDescriptor transform(WebAppDescriptor wad) {
        // TODO need to check contraints on wad
        if (wad.getInitParams().get(PackagesResourceConfig.PROPERTY_PACKAGES) != null) {
            final Map<String, Object> init = new HashMap<String, Object>(wad.getInitParams());
            PackagesResourceConfig packagesResourceConfig = new PackagesResourceConfig(init);
            populateResourceConfigFeatures(packagesResourceConfig, wad.getInitParams());
            return new LowLevelAppDescriptor.Builder(packagesResourceConfig).build();
        } else if (wad.getInitParams().get(ClassNamesResourceConfig.PROPERTY_CLASSNAMES) != null) {
            String classes = wad.getInitParams().get(ClassNamesResourceConfig.PROPERTY_CLASSNAMES);
            ClassNamesResourceConfig classNamesResourceConfig = new ClassNamesResourceConfig(classes);
View Full Code Here

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

         */
        public Builder(String... packages) throws IllegalArgumentException {
            if (packages == null)
                throw new IllegalArgumentException("The packages must not be null");
           
            this.rc = new PackagesResourceConfig(packages);
        }
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.