Class Source

java.lang.Object
org.glassfish.grizzly.spdy.Source

public abstract class Source extends Object
The class represents generic source of data to be sent on SpdyStream.
Author:
Alexey Stashok
  • Constructor Details

    • Source

      public Source()
  • Method Details

    • remaining

      public abstract long remaining()
      Returns the number of bytes remaining to be written.
    • read

      public abstract org.glassfish.grizzly.Buffer read(int length) throws SpdyStreamException
      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

      public static Source.SourceFactory factory(SpdyStream spdyStream)
      Returns the Source.SourceFactory associated with the SpdyStream.