Package org.glassfish.jersey.filter

Examples of org.glassfish.jersey.filter.LoggingFilter


    }

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


    }

    @Override
    protected void configureClient(ClientConfig config) {
        // TODO: fails with true on request - should be fixed by resolving JERSEY-2273
        config.register(new LoggingFilter(LOGGER, false));
        config.connectorProvider(new JettyConnectorProvider());
    }
View Full Code Here

    }

    @Override
    protected Application configure() {
        ResourceConfig config = new ResourceConfig(CookieResource.class);
        config.register(new LoggingFilter(LOGGER, true));
        return config;
    }
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

    }

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

    }

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

    @Test
    public void testPostChunked() {
        ClientConfig config = new ClientConfig();
        config.property(ClientProperties.CHUNKED_ENCODING_SIZE, 1024);
        config.connectorProvider(new JettyConnectorProvider());
        config.register(new LoggingFilter(LOGGER, true));

        Client client = ClientBuilder.newClient(config);
        WebTarget r = client.target(getBaseUri());

        byte[] content = new byte[1024 * 1024];
 
View Full Code Here

        assertThat(webTarget.getConfiguration().isRegistered(LoggingFilter.class), is(true));
    }

    @Test
    public void testRegisterObjectPriority() throws Exception {
        final RxWebTarget<RxFutureInvoker> webTarget = rxTarget.register(new LoggingFilter(), 42);

        for (final Map.Entry<Class<?>, Integer> entry : webTarget.getConfiguration().getContracts(LoggingFilter.class).entrySet()) {
            assertThat(entry.getKey().isAssignableFrom(LoggingFilter.class), is(true));
            assertThat(entry.getValue(), is(42));
        }
View Full Code Here

        }
    }

    @Test
    public void testRegisterObjectContracts() throws Exception {
        final RxWebTarget<RxFutureInvoker> webTarget = rxTarget.register(new LoggingFilter(), ClientRequestFilter.class, ClientResponseFilter.class);

        final Map<Class<?>, Integer> contracts = webTarget.getConfiguration().getContracts(LoggingFilter.class);

        assertThat(contracts.size(), is(2));
        assertThat(contracts.keySet(), hasItems(ClientRequestFilter.class, ClientResponseFilter.class));
View Full Code Here

    public void testRegisterObjectContractsPriorities() throws Exception {
        final Map<Class<?>, Integer> contracts = new HashMap<>();
        contracts.put(ClientRequestFilter.class, 42);
        contracts.put(ClientResponseFilter.class, 23);

        final RxWebTarget<RxFutureInvoker> webTarget = rxTarget.register(new LoggingFilter(), contracts);

        assertThat(webTarget.getConfiguration().getContracts(LoggingFilter.class), is(contracts));
    }
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.