Package org.apache.http.nio.protocol

Examples of org.apache.http.nio.protocol.AsyncHttpService.shutdown()


        }

        public void closed(final NHttpServerConnection conn) {
            AsyncHttpService httpService = (AsyncHttpService) conn.getContext()
                .getAttribute(HTTP_ASYNC_SERVICE);
            httpService.shutdown();
        }

        public void exception(final NHttpServerConnection conn, final HttpException httpex) {
            AsyncHttpService httpService = (AsyncHttpService) conn.getContext()
                .getAttribute(HTTP_ASYNC_SERVICE);
View Full Code Here


            AsyncHttpService httpService = (AsyncHttpService) conn.getContext()
                .getAttribute(HTTP_ASYNC_SERVICE);
            try {
                httpService.handleException(conn, httpex);
            } catch (IOException ex) {
                httpService.shutdown(ex);
                shutdownConnection(conn);
            } catch (HttpException ex) {
                System.err.println("Unexpected HTTP protocol error: " + ex.getMessage());
                httpService.shutdown();
                shutdownConnection(conn);
View Full Code Here

            } catch (IOException ex) {
                httpService.shutdown(ex);
                shutdownConnection(conn);
            } catch (HttpException ex) {
                System.err.println("Unexpected HTTP protocol error: " + ex.getMessage());
                httpService.shutdown();
                shutdownConnection(conn);
            }
        }

        public void exception(final NHttpServerConnection conn, final IOException ioex) {
View Full Code Here

        }

        public void exception(final NHttpServerConnection conn, final IOException ioex) {
            AsyncHttpService httpService = (AsyncHttpService) conn.getContext()
                .getAttribute(HTTP_ASYNC_SERVICE);
            httpService.shutdown(ioex);
            shutdownConnection(conn);
        }

        public void timeout(final NHttpServerConnection conn) {
            exception(conn, new SocketTimeoutException("Socket timeout"));
View Full Code Here

            AsyncHttpService httpService = (AsyncHttpService) conn.getContext()
                .getAttribute(HTTP_ASYNC_SERVICE);
            try {
                httpService.consumeContent(decoder);
            } catch (IOException ex) {
                httpService.shutdown(ex);
                shutdownConnection(conn);
            }
        }

        public void outputReady(NHttpServerConnection conn, ContentEncoder encoder) {
View Full Code Here

            AsyncHttpService httpService = (AsyncHttpService) conn.getContext()
                .getAttribute(HTTP_ASYNC_SERVICE);
            try {
                httpService.produceContent(encoder);
            } catch (IOException ex) {
                httpService.shutdown(ex);
                shutdownConnection(conn);
            }
        }
    }
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.