Package org.glassfish.grizzly.spdy
Class Source
java.lang.Object
org.glassfish.grizzly.spdy.Source
The class represents generic source of data to be sent on
SpdyStream.- Author:
- Alexey Stashok
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Source.SourceFactoryfactory(SpdyStream spdyStream) Returns theSource.SourceFactoryassociated with theSpdyStream.abstract booleanReturns true if there is more data to be written, or false otherwise.abstract org.glassfish.grizzly.Bufferread(int length) Returns the number of bytes to be written.abstract voidrelease()The method is called, when the source might be released/closed.abstract longReturns the number of bytes remaining to be written.
-
Constructor Details
-
Source
public Source()
-
-
Method Details
-
remaining
public abstract long remaining()Returns the number of bytes remaining to be written. -
read
Returns the number of bytes to be written.- Parameters:
length- max number of bytes to return.- Returns:
Buffer, which contains up to length bytes (could return less) to be written. null result is not permitted.- Throws:
SpdyStreamException
-
hasRemaining
public abstract boolean hasRemaining()Returns true if there is more data to be written, or false otherwise. -
release
public abstract void release()The method is called, when the source might be released/closed. -
factory
Returns theSource.SourceFactoryassociated with theSpdyStream.
-