Examples of SSLIOSession


Examples of org.apache.http.impl.nio.reactor.SSLIOSession

    }

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

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

Examples of org.apache.http.impl.nio.reactor.SSLIOSession

    }

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

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

Examples of org.apache.http.impl.nio.reactor.SSLIOSession

    }

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

        this.handler.timeout(conn);
        synchronized (sslSession) {
            if (sslSession.isOutboundDone() && !sslSession.isInboundDone()) {
                // The session failed to cleanly terminate
                sslSession.shutdown();
            }
        }
    }
View Full Code Here

Examples of org.apache.http.impl.nio.reactor.SSLIOSession

     */
    protected SSLIOSession createSSLIOSession(
            final IOSession session,
            final SSLContext sslcontext,
            final SSLSetupHandler sslHandler) {
        return new SSLIOSession(session, sslcontext, sslHandler);
    }
View Full Code Here

Examples of org.apache.http.impl.nio.reactor.SSLIOSession

        return new SSLIOSession(session, sslcontext, sslHandler);
    }
   
    public void connected(final IOSession session) {

        SSLIOSession sslSession = createSSLIOSession(
                session,
                this.sslcontext,
                this.sslHandler);
       
        NHttpClientIOTarget conn = createConnection(
                sslSession);
       
        session.setAttribute(ExecutionContext.HTTP_CONNECTION, conn);
        session.setAttribute(SSL_SESSION, sslSession);
       
        Object attachment = session.getAttribute(IOSession.ATTACHMENT_KEY);
        this.handler.connected(conn, attachment);

        try {
            sslSession.bind(SSLMode.CLIENT, this.params);
        } catch (SSLException ex) {
            this.handler.exception(conn, ex);
            sslSession.shutdown();
        }
    }
View Full Code Here

Examples of org.apache.http.impl.nio.reactor.SSLIOSession

    }

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

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

Examples of org.apache.http.impl.nio.reactor.SSLIOSession

    }

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

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

Examples of org.apache.http.nio.reactor.ssl.SSLIOSession

                                super.onRequestSubmitted(request);
                                if (request instanceof EntityEnclosingRequestWrapper) {
                                    request = ((EntityEnclosingRequestWrapper)request).getOriginal();
                                }
                                if (getIOSession() instanceof SSLIOSession) {
                                    SSLIOSession sslio = (SSLIOSession)getIOSession();
                                    getIOSession().setAttribute(CXFHttpRequest.class.getName(), request);
                                    if (getIOSession().getAttribute("cxf.handshake.done") != null) {
                                        ((CXFHttpRequest)request).getOutputStream()
                                            .setSSLSession(sslio.getSSLSession());
                                    }
                                }
                            }
                        };
                    }
View Full Code Here

Examples of org.apache.http.nio.reactor.ssl.SSLIOSession

    public boolean isSecure() {
        return true;
    }

    public SSLIOSession layer(final IOSession iosession) {
        SSLIOSession ssliosession = new SSLIOSession(iosession, SSLMode.CLIENT, this.sslContext,
                new InternalSSLSetupHandler());
        iosession.setAttribute(SSLIOSession.SESSION_KEY, ssliosession);
        return ssliosession;
    }
View Full Code Here

Examples of org.apache.http.nio.reactor.ssl.SSLIOSession

     */
    protected SSLIOSession createSSLIOSession(
            final IOSession session,
            final SSLContext sslcontext,
            final SSLSetupHandler sslHandler) {
        return new SSLIOSession(session, SSLMode.CLIENT, sslcontext, sslHandler);
    }
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.