Package com.sun.grizzly.ssl

Examples of com.sun.grizzly.ssl.SSLOutputBuffer


         * we would have a problem when we flush the response. This is because
         * the 1.6 SSLOutputWriter tries to cast the workerthread to a 1.6 object
         * which will fail because we are still executing in a 1.0  worker.
         * So, as of now the best way to send a response is from here.
         */
        SSLOutputBuffer outputBuffer = (SSLOutputBuffer) response.getOutputBuffer();
        sslErrorBuffer.clear();
        MimeHeaders headers = response.getMimeHeaders();
        Enumeration names = headers.names();
        write(LoadBalancerProxyConstants.HTTP_11, sslErrorBuffer);
        write(response.getStatus() + " ", sslErrorBuffer);
        write(response.getMessage(), sslErrorBuffer);
        write(LoadBalancerProxyConstants.CRLF, sslErrorBuffer);
        while (names.hasMoreElements()) {
            String headername = (String) names.nextElement();
            String headervalue = headers.getHeader(headername);
            write(headername + ": " + headervalue, sslErrorBuffer);
            write(LoadBalancerProxyConstants.CRLF, sslErrorBuffer);
        }
        write(LoadBalancerProxyConstants.CRLF, sslErrorBuffer);
        sslErrorBuffer.flip();
        try {
            SSLOutputWriter.flushChannel(outputBuffer.getChannel(),
                    sslErrorBuffer.slice());
        } catch (IOException ex) {
            _logger.log(Level.SEVERE, "clb.proxy.handler_ssl_error_failed", ex);
        }
    }
View Full Code Here


        : new ByteBufferInputStream();
       
        inputBuffer.setInputStream(inputStream);
        request.setInputBuffer(inputBuffer);
        response = new Response();
        outputBuffer = secure ? new SSLOutputBuffer(response,
                LoadBalancerProxyConstants.DEFAULT_HTTP_HEADER_BUFFER_SIZE,
                false):
            new SocketChannelOutputBuffer
                (response,
                LoadBalancerProxyConstants.DEFAULT_HTTP_HEADER_BUFFER_SIZE,
View Full Code Here

TOP

Related Classes of com.sun.grizzly.ssl.SSLOutputBuffer

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.