Java 类org.apache.catalina.connector.ResponseFacade 实例源码

项目:tomcat7    文件:ApplicationDispatcher.java   
/**
 * Unwrap the response if we have wrapped it.
 */
private void unwrapResponse(State state) {

    if (state.wrapResponse == null)
        return;

    if (state.outerRequest.isAsyncStarted()) {
        if (!state.outerRequest.getAsyncContext().hasOriginalRequestAndResponse()) {
            return;
        }
    }

    ServletResponse previous = null;
    ServletResponse current = state.outerResponse;
    while (current != null) {

        // If we run into the container response we are done
        if ((current instanceof Response)
            || (current instanceof ResponseFacade))
            break;

        // Remove the current response if it is our wrapper
        if (current == state.wrapResponse) {
            ServletResponse next =
              ((ServletResponseWrapper) current).getResponse();
            if (previous == null)
                state.outerResponse = next;
            else
                ((ServletResponseWrapper) previous).setResponse(next);
            break;
        }

        // Advance to the next response in the chain
        previous = current;
        current = ((ServletResponseWrapper) current).getResponse();

    }

}
项目:lams    文件:ApplicationDispatcher.java   
/**
 * Unwrap the response if we have wrapped it.
 */
private void unwrapResponse(State state) {

    if (state.wrapResponse == null)
        return;

    ServletResponse previous = null;
    ServletResponse current = state.outerResponse;
    while (current != null) {

        // If we run into the container response we are done
        if ((current instanceof Response)
            || (current instanceof ResponseFacade))
            break;

        // Remove the current response if it is our wrapper
        if (current == state.wrapResponse) {
            ServletResponse next =
              ((ServletResponseWrapper) current).getResponse();
            if (previous == null)
                state.outerResponse = next;
            else
                ((ServletResponseWrapper) previous).setResponse(next);
            break;
        }

        // Advance to the next response in the chain
        previous = current;
        current = ((ServletResponseWrapper) current).getResponse();

    }

}
项目:jerrydog    文件:ApplicationDispatcher.java   
/**
 * Unwrap the response if we have wrapped it.
 */
private void unwrapResponse() {

    if (wrapResponse == null)
        return;

    ServletResponse previous = null;
    ServletResponse current = outerResponse;
    while (current != null) {

        // If we run into the container response we are done
        if ((current instanceof Response) 
            || (current instanceof ResponseFacade))
            break;

        // Remove the current response if it is our wrapper
        if (current == wrapResponse) {
            ServletResponse next =
              ((ServletResponseWrapper) current).getResponse();
            if (previous == null)
                outerResponse = next;
            else
                ((ServletResponseWrapper) previous).setResponse(next);
            break;
        }

        // Advance to the next response in the chain
        previous = current;
        current = ((ServletResponseWrapper) current).getResponse();

    }

}
项目:apache-tomcat-7.0.73-with-comment    文件:ApplicationDispatcher.java   
/**
 * Unwrap the response if we have wrapped it.
 */
private void unwrapResponse(State state) {

    if (state.wrapResponse == null)
        return;

    if (state.outerRequest.isAsyncStarted()) {
        if (!state.outerRequest.getAsyncContext().hasOriginalRequestAndResponse()) {
            return;
        }
    }

    ServletResponse previous = null;
    ServletResponse current = state.outerResponse;
    while (current != null) {

        // If we run into the container response we are done
        if ((current instanceof Response)
            || (current instanceof ResponseFacade))
            break;

        // Remove the current response if it is our wrapper
        if (current == state.wrapResponse) {
            ServletResponse next =
              ((ServletResponseWrapper) current).getResponse();
            if (previous == null)
                state.outerResponse = next;
            else
                ((ServletResponseWrapper) previous).setResponse(next);
            break;
        }

        // Advance to the next response in the chain
        previous = current;
        current = ((ServletResponseWrapper) current).getResponse();

    }

}
项目:lazycat    文件:ApplicationDispatcher.java   
/**
 * Unwrap the response if we have wrapped it.
 */
private void unwrapResponse(State state) {

    if (state.wrapResponse == null)
        return;

    if (state.outerRequest.isAsyncStarted()) {
        if (!state.outerRequest.getAsyncContext().hasOriginalRequestAndResponse()) {
            return;
        }
    }

    ServletResponse previous = null;
    ServletResponse current = state.outerResponse;
    while (current != null) {

        // If we run into the container response we are done
        if ((current instanceof Response) || (current instanceof ResponseFacade))
            break;

        // Remove the current response if it is our wrapper
        if (current == state.wrapResponse) {
            ServletResponse next = ((ServletResponseWrapper) current).getResponse();
            if (previous == null)
                state.outerResponse = next;
            else
                ((ServletResponseWrapper) previous).setResponse(next);
            break;
        }

        // Advance to the next response in the chain
        previous = current;
        current = ((ServletResponseWrapper) current).getResponse();

    }

}
项目:class-guard    文件:ApplicationDispatcher.java   
/**
 * Unwrap the response if we have wrapped it.
 */
private void unwrapResponse(State state) {

    if (state.wrapResponse == null)
        return;

    if (state.outerRequest.isAsyncStarted()) {
        if (!state.outerRequest.getAsyncContext().hasOriginalRequestAndResponse()) {
            return;
        }
    }

    ServletResponse previous = null;
    ServletResponse current = state.outerResponse;
    while (current != null) {

        // If we run into the container response we are done
        if ((current instanceof Response)
            || (current instanceof ResponseFacade))
            break;

        // Remove the current response if it is our wrapper
        if (current == state.wrapResponse) {
            ServletResponse next =
              ((ServletResponseWrapper) current).getResponse();
            if (previous == null)
                state.outerResponse = next;
            else
                ((ServletResponseWrapper) previous).setResponse(next);
            break;
        }

        // Advance to the next response in the chain
        previous = current;
        current = ((ServletResponseWrapper) current).getResponse();

    }

}
项目:apache-tomcat-7.0.57    文件:ApplicationDispatcher.java   
/**
 * Unwrap the response if we have wrapped it.
 */
private void unwrapResponse(State state) {

    if (state.wrapResponse == null)
        return;

    if (state.outerRequest.isAsyncStarted()) {
        if (!state.outerRequest.getAsyncContext().hasOriginalRequestAndResponse()) {
            return;
        }
    }

    ServletResponse previous = null;
    ServletResponse current = state.outerResponse;
    while (current != null) {

        // If we run into the container response we are done
        if ((current instanceof Response)
            || (current instanceof ResponseFacade))
            break;

        // Remove the current response if it is our wrapper
        if (current == state.wrapResponse) {
            ServletResponse next =
              ((ServletResponseWrapper) current).getResponse();
            if (previous == null)
                state.outerResponse = next;
            else
                ((ServletResponseWrapper) previous).setResponse(next);
            break;
        }

        // Advance to the next response in the chain
        previous = current;
        current = ((ServletResponseWrapper) current).getResponse();

    }

}
项目:apache-tomcat-7.0.57    文件:ApplicationDispatcher.java   
/**
 * Unwrap the response if we have wrapped it.
 */
private void unwrapResponse(State state) {

    if (state.wrapResponse == null)
        return;

    if (state.outerRequest.isAsyncStarted()) {
        if (!state.outerRequest.getAsyncContext().hasOriginalRequestAndResponse()) {
            return;
        }
    }

    ServletResponse previous = null;
    ServletResponse current = state.outerResponse;
    while (current != null) {

        // If we run into the container response we are done
        if ((current instanceof Response)
            || (current instanceof ResponseFacade))
            break;

        // Remove the current response if it is our wrapper
        if (current == state.wrapResponse) {
            ServletResponse next =
              ((ServletResponseWrapper) current).getResponse();
            if (previous == null)
                state.outerResponse = next;
            else
                ((ServletResponseWrapper) previous).setResponse(next);
            break;
        }

        // Advance to the next response in the chain
        previous = current;
        current = ((ServletResponseWrapper) current).getResponse();

    }

}
项目:HowTomcatWorks    文件:ApplicationDispatcher.java   
/**
 * Unwrap the response if we have wrapped it.
 */
private void unwrapResponse() {

    if (wrapResponse == null)
        return;

    ServletResponse previous = null;
    ServletResponse current = outerResponse;
    while (current != null) {

        // If we run into the container response we are done
        if ((current instanceof Response) 
            || (current instanceof ResponseFacade))
            break;

        // Remove the current response if it is our wrapper
        if (current == wrapResponse) {
            ServletResponse next =
              ((ServletResponseWrapper) current).getResponse();
            if (previous == null)
                outerResponse = next;
            else
                ((ServletResponseWrapper) previous).setResponse(next);
            break;
        }

        // Advance to the next response in the chain
        previous = current;
        current = ((ServletResponseWrapper) current).getResponse();

    }

}
项目:WBSAirback    文件:ApplicationDispatcher.java   
/**
 * Unwrap the response if we have wrapped it.
 */
private void unwrapResponse(State state) {

    if (state.wrapResponse == null)
        return;

    ServletResponse previous = null;
    ServletResponse current = state.outerResponse;
    while (current != null) {

        // If we run into the container response we are done
        if ((current instanceof Response)
            || (current instanceof ResponseFacade))
            break;

        // Remove the current response if it is our wrapper
        if (current == state.wrapResponse) {
            ServletResponse next =
              ((ServletResponseWrapper) current).getResponse();
            if (previous == null)
                state.outerResponse = next;
            else
                ((ServletResponseWrapper) previous).setResponse(next);
            break;
        }

        // Advance to the next response in the chain
        previous = current;
        current = ((ServletResponseWrapper) current).getResponse();

    }

}
项目:goodees    文件:CatalinaAdapter.java   
private ResponseFacade httpResp() {
    return (ResponseFacade) response.getResponse();
}