Package org.glassfish.jersey.server

Examples of org.glassfish.jersey.server.ResourceConfig$State


    }

    @Test
    public void testCreateHttpsServer() throws Exception {
        server = JdkHttpServerFactory.createHttpServer(
                UriBuilder.fromUri("https://localhost/").port(getPort()).build(), new ResourceConfig(TestResource.class));

        assertThat(server, instanceOf(HttpsServer.class));
    }
View Full Code Here


        }
    }

    @Override
    protected DeploymentContext configureDeployment() {
        return DeploymentContext.builder(new ResourceConfig(TestResource.class))
                .contextPath("context1/context2")
                .build();
    }
View Full Code Here

        sslContext.setKeyStoreBytes(ByteStreams.toByteArray(keyStore))// contains server keypair
        sslContext.setKeyStorePass("asdfgh");
        sslContext.setTrustStoreBytes(ByteStreams.toByteArray(trustStore)); // contains client certificate
        sslContext.setTrustStorePass("asdfgh");

        ResourceConfig rc = new ResourceConfig();
        rc.register(new LoggingFilter(LOGGER, true));
        rc.registerClasses(RootResource.class, SecurityFilter.class, AuthenticationExceptionMapper.class);

        try {
            webServer = GrizzlyHttpServerFactory.createHttpServer(
                    getBaseURI(),
                    rc,
View Full Code Here

    }

    private static class MyJerseyTest extends JerseyTest {
        @Override
        protected Application configure() {
            return new ResourceConfig(MyResource.class);
        }
View Full Code Here

        super(new SimpleTestContainerFactory());
    }

    @Override
    protected ResourceConfig configure() {
        return new ResourceConfig(Resource.class);
    }
View Full Code Here

    @Override
    protected DeploymentContext configureDeployment() {
        forceSet(TestProperties.CONTAINER_PORT, "0");

        return DeploymentContext.builder(new ResourceConfig(TestResource.class)).build();
    }
View Full Code Here

        }
    }

    @Override
    protected DeploymentContext configureDeployment() {
        return ServletDeploymentContext.builder(new ResourceConfig())
                .initParam(ServerProperties.PROVIDER_PACKAGES, this.getClass().getPackage().getName())
                .build();
    }
View Full Code Here

    @Override
    protected DeploymentContext configureDeployment() {
        forceSet(TestProperties.CONTAINER_PORT, "0");

        return ServletDeploymentContext.forServlet(new ServletContainer(new ResourceConfig(TestResource.class))).build();
    }
View Full Code Here

    @Override
    protected DeploymentContext configureDeployment() {
        forceSet(TestProperties.CONTAINER_PORT, "0");

        return DeploymentContext.builder(new ResourceConfig(TestResource.class)).build();
    }
View Full Code Here

        super(new JettyTestContainerFactory());
    }

    @Override
    protected ResourceConfig configure() {
        return new ResourceConfig(Resource.class);
    }
View Full Code Here

TOP

Related Classes of org.glassfish.jersey.server.ResourceConfig$State

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.