Package org.apache.http.nio

Examples of org.apache.http.nio.NHttpServerIOTarget


            throw ex;
        }
    }

    public void disconnected(final IOSession session) {
        NHttpServerIOTarget conn = (NHttpServerIOTarget) session.getAttribute(
                ExecutionContext.HTTP_CONNECTION);
        if (conn != null) {
            this.handler.closed(conn);
        }
    }
View Full Code Here


        }
    }

    public void inputReady(final IOSession session) {
        try {
            NHttpServerIOTarget conn = (NHttpServerIOTarget) session.getAttribute(
                    ExecutionContext.HTTP_CONNECTION);
            ensureNotNull(conn);
            SSLIOSession sslSession =
                (SSLIOSession) session.getAttribute(SSL_SESSION);
            ensureNotNull(sslSession);

            try {
                if (sslSession.isAppInputReady()) {
                    conn.consumeInput(this.handler);
                }
                sslSession.inboundTransport();
            } catch (IOException ex) {
                this.handler.exception(conn, ex);
                sslSession.shutdown();
View Full Code Here

        }
    }

    public void outputReady(final IOSession session) {
        try {
            NHttpServerIOTarget conn = (NHttpServerIOTarget) session.getAttribute(
                    ExecutionContext.HTTP_CONNECTION);
            ensureNotNull(conn);
            SSLIOSession sslSession =
                (SSLIOSession) session.getAttribute(SSL_SESSION);
            ensureNotNull(sslSession);

            try {
                if (sslSession.isAppOutputReady()) {
                    conn.produceOutput(this.handler);
                }
                sslSession.outboundTransport();
            } catch (IOException ex) {
                this.handler.exception(conn, ex);
                sslSession.shutdown();
View Full Code Here

        }
    }

    public void timeout(final IOSession session) {
        try {
            NHttpServerIOTarget conn = (NHttpServerIOTarget) session.getAttribute(
                    ExecutionContext.HTTP_CONNECTION);
            ensureNotNull(conn);
            SSLIOSession sslSession =
                (SSLIOSession) session.getAttribute(SSL_SESSION);
            ensureNotNull(sslSession);
View Full Code Here

                this.params);
    }

    public void connected(final IOSession session) {
        try {
            NHttpServerIOTarget conn = createConnection(session);
            session.setAttribute(ExecutionContext.HTTP_CONNECTION, conn);

            int timeout = HttpConnectionParams.getSoTimeout(this.params);
            session.setSocketTimeout(timeout);
View Full Code Here

            throw ex;
        }
    }

    public void disconnected(final IOSession session) {
        NHttpServerIOTarget conn = (NHttpServerIOTarget) session.getAttribute(
                ExecutionContext.HTTP_CONNECTION);
        if (conn != null) {
            this.handler.closed(conn);
        }
    }
View Full Code Here

        }
    }

    public void inputReady(final IOSession session) {
        try {
            NHttpServerIOTarget conn = (NHttpServerIOTarget) session.getAttribute(
                    ExecutionContext.HTTP_CONNECTION);
            ensureNotNull(conn);
            conn.consumeInput(this.handler);
        } catch (RuntimeException ex) {
            session.shutdown();
            throw ex;
        }
    }
View Full Code Here

        }
    }

    public void outputReady(final IOSession session) {
        try {
            NHttpServerIOTarget conn = (NHttpServerIOTarget) session.getAttribute(
                    ExecutionContext.HTTP_CONNECTION);
            ensureNotNull(conn);
            conn.produceOutput(this.handler);
        } catch (RuntimeException ex) {
            session.shutdown();
            throw ex;
        }
    }
View Full Code Here

        }
    }

    public void timeout(final IOSession session) {
        try {
            NHttpServerIOTarget conn = (NHttpServerIOTarget) session.getAttribute(
                    ExecutionContext.HTTP_CONNECTION);
            ensureNotNull(conn);
            this.handler.timeout(conn);
        } catch (RuntimeException ex) {
            session.shutdown();
View Full Code Here

        SSLIOSession sslSession = createSSLIOSession(
                session,
                this.sslcontext,
                this.sslHandler);
       
        NHttpServerIOTarget conn = createConnection(
                sslSession);
       
        session.setAttribute(ExecutionContext.HTTP_CONNECTION, conn);
        session.setAttribute(SSL_SESSION, sslSession);
View Full Code Here

TOP

Related Classes of org.apache.http.nio.NHttpServerIOTarget

Copyright © 2018 www.massapicom. 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.