com.sun.grizzly.ssl
Class SSLAsyncOutputBuffer

java.lang.Object
  extended by com.sun.grizzly.tcp.http11.InternalOutputBuffer
      extended by com.sun.grizzly.http.SocketChannelOutputBuffer
          extended by com.sun.grizzly.ssl.SSLAsyncOutputBuffer
All Implemented Interfaces:
OutputBuffer, ByteChunk.ByteOutputChannel

public class SSLAsyncOutputBuffer
extends SocketChannelOutputBuffer

Buffer the bytes until the ByteChunk is full or the request is completed, and then delegate the SSL encryption to class SSLOutputBuffer

Author:
Jean-Francois Arcand

Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.grizzly.tcp.http11.InternalOutputBuffer
InternalOutputBuffer.OutputStreamOutputBuffer
 
Field Summary
protected  ByteBuffer outputBB
          Encrypted Output ByteBuffer
protected  SSLEngine sslEngine
          The SSLEngine used to write SSL data.
 
Fields inherited from class com.sun.grizzly.http.SocketChannelOutputBuffer
socketChannel
 
Fields inherited from class com.sun.grizzly.tcp.http11.InternalOutputBuffer
activeFilters, buf, committed, filterLibrary, finished, headers, lastActiveFilter, outputStream, outputStreamOutputBuffer, pos, response, sm, socketBuffer, useSocketBuffer
 
Constructor Summary
SSLAsyncOutputBuffer(Response response, int headerBufferSize, boolean useSocketBuffer)
          Alternate constructor.
 
Method Summary
 void flushChannel(ByteBuffer bb)
          Flush the buffer by looping until the ByteBuffer is empty using SSLOutputBuffer
 ByteBuffer getOutputBB()
          Return the encrypted ByteBuffer used to handle response.
 SSLEngine getSSLEngine()
          Set the SSLEngine.
 void setOutputBB(ByteBuffer outputBB)
          Set the encrypted ByteBuffer used to handle response.
 void setSSLEngine(SSLEngine sslEngine)
          Get the SSLEngine.
 
Methods inherited from class com.sun.grizzly.http.SocketChannelOutputBuffer
endRequest, flush, flushBuffer, getChannel, getMaxBufferedBytes, realWriteBytes, recycle, sendAck, setChannel, setMaxBufferedBytes
 
Methods inherited from class com.sun.grizzly.tcp.http11.InternalOutputBuffer
addActiveFilter, addFilter, clearFilters, commit, doWrite, endHeaders, getFilters, getOutputStream, nextRequest, reset, sendHeader, sendHeader, sendHeader, sendStatus, setOutputStream, setSocketBuffer, write, write, write, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

outputBB

protected ByteBuffer outputBB
Encrypted Output ByteBuffer


sslEngine

protected SSLEngine sslEngine
The SSLEngine used to write SSL data.

Constructor Detail

SSLAsyncOutputBuffer

public SSLAsyncOutputBuffer(Response response,
                            int headerBufferSize,
                            boolean useSocketBuffer)
Alternate constructor.

Method Detail

flushChannel

public void flushChannel(ByteBuffer bb)
                  throws IOException
Flush the buffer by looping until the ByteBuffer is empty using SSLOutputBuffer

Overrides:
flushChannel in class SocketChannelOutputBuffer
Parameters:
bb - the ByteBuffer to write.
Throws:
IOException

getOutputBB

public ByteBuffer getOutputBB()
Return the encrypted ByteBuffer used to handle response.


setOutputBB

public void setOutputBB(ByteBuffer outputBB)
Set the encrypted ByteBuffer used to handle response.


getSSLEngine

public SSLEngine getSSLEngine()
Set the SSLEngine.


setSSLEngine

public void setSSLEngine(SSLEngine sslEngine)
Get the SSLEngine.



Copyright © 2009 SUN Microsystems. All Rights Reserved.