Package org.glassfish.jersey.server.internal.routing

Examples of org.glassfish.jersey.server.internal.routing.RoutingContext


        Iterable<ContainerRequestFilter> sortedRequestFilters;

        if (responseFilters == null) {
            // post-matching (response filter stage is pushed in pre-matching phase, so that if pre-matching filter
            // throws exception, response filters get still invoked)
            RoutingContext rc = locator.getService(RoutingContext.class);
            sortedRequestFilters = Providers.sortRankedProviders(new RankedComparator<ContainerRequestFilter>(), requestFilters,
                    rc.getBoundRequestFilters());
        } else {
            // pre-matching
            respondingContextFactory.get().push(new ResponseFilterStage(responseFilters, locator));
            sortedRequestFilters = Providers.sortRankedProviders(new RankedComparator<ContainerRequestFilter>(), requestFilters);
        }
View Full Code Here


        @Override
        @SuppressWarnings("unchecked")
        public Continuation<ContainerResponse> apply(ContainerResponse responseContext) {

            RoutingContext rc = locator.getService(RoutingContext.class);

            Iterable<ContainerResponseFilter> sortedResponseFilters = Providers.sortRankedProviders(
                    new RankedComparator<ContainerResponseFilter>(RankedComparator.Order.DESCENDING), filters, rc.getBoundResponseFilters()
            );

            for (ContainerResponseFilter filter : sortedResponseFilters) {
                try {
                    filter.filter(responseContext.getRequestContext(), responseContext);
View Full Code Here

TOP

Related Classes of org.glassfish.jersey.server.internal.routing.RoutingContext

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.