Package javax.ws.rs.container

Examples of javax.ws.rs.container.ContainerResponseFilter


        assertTrue(child == child2);
    }

    private ContainerResponseFilter getResponseFilter(ServiceLocator locator) {
        ContainerResponseFilter responseFilter = locator.getService(ContainerResponseFilter.class, new CustomAnnotationImpl());
        assertEquals(Child.class, responseFilter.getClass());
        return responseFilter;
    }
View Full Code Here


    @Test
    public void testSingleResponseFilter() throws Exception {
        final AtomicInteger called = new AtomicInteger(0);

        final List<ContainerResponseFilter> responseFilterList = Lists.newArrayList();
        responseFilterList.add(new ContainerResponseFilter() {
            @Override
            public void filter(final ContainerRequestContext requestContext, final ContainerResponseContext responseContext) throws IOException {
                called.incrementAndGet();
            }
        });
View Full Code Here

    }

    @Test
    public void testNoInterceptor() {
        ResourceConfig rc = new ResourceConfig(EncodingFilter.class);
        ContainerResponseFilter filter = new ApplicationHandler(rc).getServiceLocator().getService(ContainerResponseFilter.class);
        assertNotNull(filter);
        assertTrue(filter instanceof EncodingFilter);
        assertEquals(1, ((EncodingFilter) filter).getSupportedEncodings().size());
    }
View Full Code Here

TOP

Related Classes of javax.ws.rs.container.ContainerResponseFilter

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.