@Override
    public void filter(HttpRequestMessage zuulReq) {
        if (zuulReq.getContext().isCancelled()) {
            PerfMark.event(getClass().getName(), "filterCancelled");
            zuulReq.disposeBufferedBody();
            logger.debug("Request was cancelled, UUID {}", zuulReq.getContext().getUUID());
            return;
        }

        String endpointName = getEndPointName(zuulReq.getContext());
        try (TaskCloseable ignored = PerfMark.traceTask(this, s -> s.getClass().getSimpleName() + ".filter")) {
            Preconditions.checkNotNull(zuulReq, "input message");
            addPerfMarkTags(zuulReq);

            ZuulFilter<HttpRequestMessage, HttpResponseMessage> endpoint = getEndpoint(endpointName, zuulReq);
            logger.debug(
                    "Got endpoint {}, UUID {}",
                    endpoint.filterName(),
                    zuulReq.getContext().getUUID());
            setEndpoint(zuulReq, endpoint);
            HttpResponseMessage zuulResp = filter(endpoint, zuulReq);

            if ((zuulResp != null) && !(endpoint instanceof ProxyEndpoint)) {
                // EdgeProxyEndpoint calls invokeNextStage internally
                logger.debug(
                        "Endpoint calling invokeNextStage, UUID {}",
                        zuulReq.getContext().getUUID());
                invokeNextStage(zuulResp);
            }
        } catch (Exception ex) {
            handleException(zuulReq, endpointName, ex);
        }
    }
This class is supposed to be thread safe and hence should not have any non final member variables
Created by saroskar on 5/18/17.
zuul-core/src/main/java/com/netflix/zuul/netty/filter/ZuulEndPointRunner.java