@Override
    public Collection<RequestPayload> getMatchingPayloads(HttpRequest request) {

        final Collection<WarpGroup> groups = warpContext().getAllGroups();

        final Collection<RequestPayload> payloads = new LinkedList<RequestPayload>();

        groupIteration:
        for (WarpGroup group : groups) {

            Deque<RequestObserver> observers = new LinkedList<RequestObserver>();
            if (group.getObserver() != null) {
                observers.add(group.getObserver());
            }
            Collection<RequestObserverChainManager> observerChainManagers = warpContext().getObserverChainManagers();

            for (RequestObserverChainManager chainManager : observerChainManagers) {
                chainManager.manageObserverChain(observers, HttpRequestFilter.class);
            }

            for (RequestObserver observer : observers) {
                if (!isHttpFilter(observer)) {
                    log.warning(
                        "One of the defined observers (" + observer.toString() + ") of class " + observer.getClass()
                            + " doesn't match expected type (" + HttpRequestFilter.class
                            + ") - continuing without processing this request group");
                    continue groupIteration;
                }

                @SuppressWarnings("unchecked")
                RequestFilter<HttpRequest> filter = (RequestFilter<HttpRequest>) observer;

                if (!filter.matches(request)) {
                    continue groupIteration;
                }
            }

            payloads.add(group.generateRequestPayload(request));
        }

        return payloads;
    }
@ Override public Collection < RequestPayload > getMatchingPayloads ( HttpRequest request ) { final Collection < WarpGroup > groups = warpContext ( ) . getAllGroups ( ) ; final Collection < RequestPayload > payloads = new LinkedList < RequestPayload > ( ) ; groupIteration : for ( WarpGroup group : groups ) { Deque < RequestObserver > observers = new LinkedList < RequestObserver > ( ) ; if ( group . getObserver ( ) != null ) { observers . add ( group . getObserver ( ) ) ; } Collection < RequestObserverChainManager > observerChainManagers = warpContext ( ) . getObserverChainManagers ( ) ; for ( RequestObserverChainManager chainManager : observerChainManagers ) { chainManager . manageObserverChain ( observers , HttpRequestFilter . class ) ; } for ( RequestObserver observer : observers ) { if ( ! isHttpFilter ( observer ) ) { log . warning ( "One of the defined observers (" + observer . toString ( ) + ") of class " + observer . getClass ( ) + " doesn't match expected type (" + HttpRequestFilter . class + ") - continuing without processing this request group" ) ; continue groupIteration ; } @ SuppressWarnings ( "unchecked" ) RequestFilter < HttpRequest > filter = ( RequestFilter < HttpRequest > ) observer ; if ( ! filter . matches ( request ) ) { continue groupIteration ; } } payloads . add ( group . generateRequestPayload ( request ) ) ; } return payloads ; }
/*
(non-Javadoc)

@see
org.jboss.arquillian.warp.impl.client.enrichment.HttpRequestEnrichmentService#getMatchingPayloads(org.jboss.netty.handler
.codec.http.HttpRequest)