com.sun.grizzly.ssl
Class SSLStreamReader

java.lang.Object
  extended by com.sun.grizzly.streams.AbstractStreamReader
      extended by com.sun.grizzly.streams.StreamReaderDecorator
          extended by com.sun.grizzly.ssl.SSLStreamReader
All Implemented Interfaces:
StreamReader, Closeable

public class SSLStreamReader
extends StreamReaderDecorator

SSL aware StreamReader implementation, which work like a wrapper over existing StreamReader.

Author:
Alexey Stashok
See Also:
SSLStreamWriter

Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.grizzly.streams.StreamReaderDecorator
StreamReaderDecorator.FeederCompletionHandler
 
Nested classes/interfaces inherited from class com.sun.grizzly.streams.AbstractStreamReader
AbstractStreamReader.NotifyObject
 
Field Summary
static Attribute<LinkedList> sslAttribute
           
 
Fields inherited from class com.sun.grizzly.streams.StreamReaderDecorator
underlyingReader
 
Fields inherited from class com.sun.grizzly.streams.AbstractStreamReader
bufferSize, dataRecords, notifyObject, sync, timeoutMillis
 
Constructor Summary
SSLStreamReader()
           
SSLStreamReader(StreamReader underlyingReader)
           
 
Method Summary
 boolean appendBuffer(Buffer buffer)
          Add more data to the end of the stream.
protected  void attach()
          Attach state, saved in Connection to this SSLStreamReader.
protected  void detach()
          Save state of this SSLStreamReader into Connection.
 SSLEngine getSSLEngine()
           
protected  Buffer read0()
           
 void setUnderlyingReader(StreamReader underlyingReader)
           
protected  Buffer unwrap(Object data)
           
protected  Object wrap(Buffer buffer)
           
 
Methods inherited from class com.sun.grizzly.streams.StreamReaderDecorator
getConnection, getUnderlyingReader, isBlocking, notifyCondition, pull, setBlocking
 
Methods inherited from class com.sun.grizzly.streams.AbstractStreamReader
append, availableDataSize, close, current, ensureRead, ensureRead, finishBuffer, getBuffer, getBufferSize, getTimeout, hasAvailableData, isClosed, newBuffer, notifyAvailable, notifyAvailable, notifyCondition, poll, pollBuffer, prepend, prependBuffer, readBoolean, readBooleanArray, readBuffer, readByte, readByteArray, readByteArray, readBytes, readChar, readCharArray, readDouble, readDoubleArray, readFloat, readFloatArray, readInt, readIntArray, readLong, readLongArray, readShort, readShortArray, setBufferSize, setConnection, setTimeout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sslAttribute

public static Attribute<LinkedList> sslAttribute
Constructor Detail

SSLStreamReader

public SSLStreamReader()

SSLStreamReader

public SSLStreamReader(StreamReader underlyingReader)
Method Detail

setUnderlyingReader

public void setUnderlyingReader(StreamReader underlyingReader)
Overrides:
setUnderlyingReader in class StreamReaderDecorator

appendBuffer

public boolean appendBuffer(Buffer buffer)
Description copied from class: AbstractStreamReader
Add more data to the end of the stream.

Specified by:
appendBuffer in interface StreamReader
Overrides:
appendBuffer in class AbstractStreamReader
Returns:
true, if buffer was appended to the StreamReader, or false otherwise

getSSLEngine

public SSLEngine getSSLEngine()

attach

protected void attach()
Attach state, saved in Connection to this SSLStreamReader.


detach

protected void detach()
Save state of this SSLStreamReader into Connection.


read0

protected Buffer read0()
                throws IOException
Specified by:
read0 in class AbstractStreamReader
Throws:
IOException

wrap

protected final Object wrap(Buffer buffer)
Specified by:
wrap in class AbstractStreamReader

unwrap

protected Buffer unwrap(Object data)
Specified by:
unwrap in class AbstractStreamReader


Copyright © 2009 SUN Microsystems. All Rights Reserved.