Examples of AsyncContextImpl


Examples of org.apache.catalina.core.AsyncContextImpl

            throw new IllegalStateException(
                    "Dispatch may only happen on an existing request.");
        }
        boolean comet = false;
        boolean success = true;
        AsyncContextImpl asyncConImpl = (AsyncContextImpl)request.getAsyncContext();
        try {
            if (!request.isAsync() && !comet) {
                // Error or timeout - need to tell listeners the request is over
                // Have to test this first since state may change while in this
                // method and this is only required if entering this methos in
                // this state
                Context ctxt = (Context) request.getMappingData().context;
                if (ctxt != null) {
                    ctxt.fireRequestDestroyEvent(request);
                }
            }

            if (status==SocketStatus.TIMEOUT) {
                success = true;
                if (!asyncConImpl.timeout()) {
                    asyncConImpl.setErrorState(null);
                }
            }
            if (request.isAsyncDispatching()) {
                success = true;
                connector.getService().getContainer().getPipeline().getFirst().invoke(request, response);
                Throwable t = (Throwable) request.getAttribute(
                        RequestDispatcher.ERROR_EXCEPTION);
                if (t != null) {
                    asyncConImpl.setErrorState(t);
                }
            }

            if (request.isComet()) {
                if (!response.isClosed() && !response.isError()) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.