org.glassfish.grizzly.streams
Class StreamReaderDecorator
java.lang.Object
org.glassfish.grizzly.streams.AbstractStreamReader
org.glassfish.grizzly.streams.StreamReaderDecorator
- All Implemented Interfaces:
- Closeable, StreamReader
- Direct Known Subclasses:
- SSLStreamReader
public abstract class StreamReaderDecorator
- extends AbstractStreamReader
- Author:
- oleksiys
| Methods inherited from class org.glassfish.grizzly.streams.AbstractStreamReader |
append, appendBuffer, availableDataSize, close, current, ensureRead, ensureRead, finishBuffer, getBuffer, getBufferSize, getTimeout, isClosed, newBuffer, notifyAvailable, notifyAvailable, notifyCondition, poll, pollBuffer, prepend, prependBuffer, read0, readBoolean, readBooleanArray, readBuffer, readByte, readByteArray, readByteArray, readBytes, readChar, readCharArray, readDouble, readDoubleArray, readFloat, readFloatArray, readInt, readIntArray, readLong, readLongArray, readShort, readShortArray, setBufferSize, setConnection, setTimeout, unwrap, wrap |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
underlyingReader
protected StreamReader underlyingReader
StreamReaderDecorator
public StreamReaderDecorator(StreamReader underlyingReader)
getUnderlyingReader
public StreamReader getUnderlyingReader()
setUnderlyingReader
public void setUnderlyingReader(StreamReader underlyingReader)
isBlocking
public boolean isBlocking()
- Returns the
StreamReader mode.
true, if StreamReader is operating in blocking mode, or
false otherwise.
- Specified by:
isBlocking in interface StreamReader- Overrides:
isBlocking in class AbstractStreamReader
- Returns:
- the
StreamReader mode.
setBlocking
public void setBlocking(boolean isBlocking)
- Sets the
StreamReader mode.
- Specified by:
setBlocking in interface StreamReader- Overrides:
setBlocking in class AbstractStreamReader
- Parameters:
isBlocking - true, if StreamReader is operating in
blocking mode, or false otherwise.
getConnection
public Connection getConnection()
- Description copied from class:
AbstractStreamReader
- Get the
Connection this StreamReader belongs to.
- Specified by:
getConnection in interface StreamReader- Overrides:
getConnection in class AbstractStreamReader
- Returns:
- the
Connection this StreamReader belongs to.
notifyCondition
public Future<Integer> notifyCondition(Condition<StreamReader> condition,
CompletionHandler<Integer> completionHandler)
- Method returns
Future, using which it's possible check if
StreamReader meets specific Condition.
CompletionHandler is also passed to get notified, once
the Condition will be satisfied.
- Parameters:
condition - Condition StreamReader should meet.completionHandler - CompletionHandler, which will be
notified, once the Condition will be satisfied.
- Returns:
Future, using which it's possible to check whether
StreamReader meets the required Condition.
pull
public void pull()
- Pulls data out from underlying
StreamReader chain into this
StreamReader
Copyright © 2009 SUN Microsystems. All Rights Reserved.