com.sun.grizzly.streams
Class StreamWriterDecorator

java.lang.Object
  extended by com.sun.grizzly.streams.AbstractStreamWriter
      extended by com.sun.grizzly.streams.StreamWriterDecorator
All Implemented Interfaces:
StreamWriter, Closeable
Direct Known Subclasses:
SSLStreamWriter

public abstract class StreamWriterDecorator
extends AbstractStreamWriter

Author:
oleksiys

Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.grizzly.streams.AbstractStreamWriter
AbstractStreamWriter.DisposeBufferCompletionHandler
 
Field Summary
protected  StreamWriter underlyingWriter
           
 
Fields inherited from class com.sun.grizzly.streams.AbstractStreamWriter
buffer, bufferSize, ZERO, ZERO_READY_FUTURE
 
Constructor Summary
StreamWriterDecorator(StreamWriter underlyingWriter)
           
 
Method Summary
protected  Future close0(CompletionHandler completionHandler)
          
 Connection getConnection()
          Get the Connection this StreamWriter belongs to.
 StreamWriter getUnderlyingWriter()
           
 boolean isBlocking()
          Returns the StreamReader mode.
 void setBlocking(boolean isBlocking)
          Sets the StreamReader mode.
 void setUnderlyingWriter(StreamWriter underlyingWriter)
           
 
Methods inherited from class com.sun.grizzly.streams.AbstractStreamWriter
close, close, ensure, flush, flush, flush0, getBuffer, getBufferSize, getTimeout, newBuffer, overflow, overflow, setBufferSize, setConnection, setTimeout, writeBoolean, writeBooleanArray, writeBuffer, writeBuffer, writeByte, writeByteArray, writeByteArray, writeChar, writeCharArray, writeDouble, writeDoubleArray, writeFloat, writeFloatArray, writeInt, writeIntArray, writeLong, writeLongArray, writeShort, writeShortArray, writeStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

underlyingWriter

protected StreamWriter underlyingWriter
Constructor Detail

StreamWriterDecorator

public StreamWriterDecorator(StreamWriter underlyingWriter)
Method Detail

getConnection

public Connection getConnection()
Get the Connection this StreamWriter belongs to.

Specified by:
getConnection in interface StreamWriter
Overrides:
getConnection in class AbstractStreamWriter
Returns:
the Connection this StreamWriter belongs to.

getUnderlyingWriter

public StreamWriter getUnderlyingWriter()

setUnderlyingWriter

public void setUnderlyingWriter(StreamWriter underlyingWriter)

isBlocking

public boolean isBlocking()
Returns the StreamReader mode. true, if StreamReader is operating in blocking mode, or false otherwise.

Specified by:
isBlocking in interface StreamWriter
Overrides:
isBlocking in class AbstractStreamWriter
Returns:
the StreamReader mode.

setBlocking

public void setBlocking(boolean isBlocking)
Sets the StreamReader mode.

Specified by:
setBlocking in interface StreamWriter
Overrides:
setBlocking in class AbstractStreamWriter
Parameters:
isBlocking - true, if StreamReader is operating in blocking mode, or false otherwise.

close0

protected Future close0(CompletionHandler completionHandler)
                 throws IOException

Specified by:
close0 in class AbstractStreamWriter
Throws:
IOException


Copyright © 2009 SUN Microsystems. All Rights Reserved.