Package org.glassfish.jersey.filter

Examples of org.glassfish.jersey.filter.LoggingFilter


    private static final Logger LOGGER = Logger.getLogger(AuthFilterTest.class.getName());

    @Override
    protected Application configure() {
        ResourceConfig config = new ResourceConfig(AuthTest.AuthResource.class);
        config.register(new LoggingFilter(LOGGER, true));
        return config;
    }
View Full Code Here


        sslContextFactory.setKeyStorePassword("asdfgh");
        sslContextFactory.setTrustStoreResource(Resource.newResource(trustStore)); // contains client certificate
        sslContextFactory.setTrustStorePassword("asdfgh");

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

        try {
            webServer = JettyHttpContainerFactory.createServer(
                    getBaseURI(),
View Full Code Here

        assertThat(webTarget.getConfiguration().getContracts(LoggingFilter.class), is(contracts));
    }

    @Test
    public void testRegisterObject() throws Exception {
        final RxWebTarget<RxFutureInvoker> webTarget = rxTarget.register(new LoggingFilter());
        assertThat(webTarget.getConfiguration().isRegistered(LoggingFilter.class), is(true));
    }
View Full Code Here

        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(),
View Full Code Here

        Client client = ClientBuilder.newClient(cc);
        // client basic auth demonstration
        client.register(HttpAuthenticationFeature.basic("user", "password"));

        WebTarget target = client.target(Server.BASE_URI);
        target.register(new LoggingFilter());

        final Response response = target.path("/").request().get(Response.class);

        assertEquals(200, response.getStatus());
    }
View Full Code Here

        Client client = ClientBuilder.newClient(cc);

        System.out.println("Client: GET " + Server.BASE_URI);

        WebTarget target = client.target(Server.BASE_URI);
        target.register(new LoggingFilter());

        Response response;

        response = target.path("/").request().get(Response.class);
View Full Code Here

        Client client = ClientBuilder.newClient(cc);

        System.out.println("Client: GET " + Server.BASE_URI);

        WebTarget target = client.target(Server.BASE_URI);
        target.register(new LoggingFilter());

        boolean caught = false;

        try {
            target.path("/").request().get(String.class);
View Full Code Here

    }

    @Override
    protected Application configure() {
        ResourceConfig config = new ResourceConfig(RedirectResource.class);
        config.register(new LoggingFilter(LOGGER, true));
        return config;
    }
View Full Code Here

            clientConfig = new ClientConfig();
        }

        //check if logging is required
        if (isEnabled(TestProperties.LOG_TRAFFIC)) {
            clientConfig.register(new LoggingFilter(LOGGER, isEnabled(TestProperties.DUMP_ENTITY)));
        }

        configureClient(clientConfig);

        return ClientBuilder.newClient(clientConfig);
View Full Code Here

    }

    @Override
    protected Application configure() {
        ResourceConfig config = new ResourceConfig(HelloWorldResource.class);
        config.register(new LoggingFilter(LOGGER, true));
        return config;
    }
View Full Code Here

TOP

Related Classes of org.glassfish.jersey.filter.LoggingFilter

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.