Package org.glassfish.jersey.filter

Examples of org.glassfish.jersey.filter.LoggingFilter


    }

    @Test
    public void testHelloWorld() throws Exception {
        WebTarget t = target();
        t.register(new LoggingFilter());
        Response r = t.path("helloworld").request().get();
        assertEquals(200, r.getStatus());
        assertEquals("Hello World!", r.readEntity(String.class));
    }
View Full Code Here


     * @throws InterruptedException in case the waiting for all requests to complete was interrupted.
     */
    @Test
    public void testAsyncServlet() throws InterruptedException {
        final WebTarget resourceTarget = target("async");
        resourceTarget.register(new LoggingFilter());
        final String expectedResponse = AsyncServletResource.HELLO_ASYNC_WORLD;

        final int MAX_MESSAGES = 50;
        final int LATCH_WAIT_TIMEOUT = 10 * getAsyncTimeoutMultiplier();
        final boolean debugMode = false;
View Full Code Here

     * @throws InterruptedException in case the waiting for all requests to complete was interrupted.
     */
    @Test
    public void testAsyncRequestCanceling() throws InterruptedException {
        final WebTarget resourceTarget = target("async/canceled");
        resourceTarget.register(new LoggingFilter());

        final int MAX_MESSAGES = 10;
        final int LATCH_WAIT_TIMEOUT = 10 * getAsyncTimeoutMultiplier();
        final boolean debugMode = false;
        final boolean sequentialGet = false;
View Full Code Here

    }

    @Test
    public void testTimeout() throws Exception {
        final WebTarget resourceTarget = target("timeout");
        resourceTarget.register(new LoggingFilter());
        final Future<Response> responseFuture = resourceTarget.path("suspend").request().async().get();

        // Set timeout.
        assertThat(resourceTarget.path("timeout").request().post(Entity.text("500")).getStatus(), equalTo(204));
View Full Code Here

    }

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

                .register(new LoggingFilter(LOGGER, true));
    }

    @Override
    protected void configureClient(ClientConfig config) {
        config.register(new LoggingFilter(LOGGER, true));
        config.connectorProvider(new GrizzlyConnectorProvider());
    }
View Full Code Here

     * @throws InterruptedException in case the waiting for all requests to complete was interrupted.
     */
    @Test
    public void testAsyncServlet() throws InterruptedException {
        final WebTarget resourceTarget = target("async");
        resourceTarget.register(new LoggingFilter());
        final String expectedResponse = AsyncServletResource.HELLO_ASYNC_WORLD;

        final int MAX_MESSAGES = 50;
        final int LATCH_WAIT_TIMEOUT = 10;
        final boolean debugMode = false;
View Full Code Here

     * @throws InterruptedException in case the waiting for all requests to complete was interrupted.
     */
    @Test
    public void testAsyncRequestCanceling() throws InterruptedException {
        final WebTarget resourceTarget = target("async/canceled");
        resourceTarget.register(new LoggingFilter());

        final int MAX_MESSAGES = 10;
        final int LATCH_WAIT_TIMEOUT = 10;
        final boolean debugMode = false;
        final boolean sequentialGet = false;
View Full Code Here

    }

    public static ResourceConfig create() {
        final ResourceConfig resourceConfig = new ResourceConfig()
                .registerClasses(BlockingPostChatResource.class, FireAndForgetChatResource.class, SimpleLongRunningResource.class)
                .registerInstances(new LoggingFilter(Logger.getLogger(App.class.getName()), true));

        return resourceConfig;
    }
View Full Code Here

    }


    @Override
    protected void configureClient(ClientConfig config) {
        config.register(new LoggingFilter(Logger.getLogger(SecurityDigestAuthenticationITCase.class.getName()), false));
    }
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.