Class SpdySession

java.lang.Object
org.glassfish.grizzly.spdy.SpdySession
Direct Known Subclasses:
SpdySession3, SpdySession31

public abstract class SpdySession extends Object
The SPDY Session abstraction.
Author:
oleksiys
  • Constructor Details

    • SpdySession

      public SpdySession(org.glassfish.grizzly.Connection<?> connection, boolean isServer, SpdyHandlerFilter handlerFilter)
  • Method Details

    • get

      public static SpdySession get(org.glassfish.grizzly.Connection connection)
    • bind

      public static void bind(org.glassfish.grizzly.Connection connection, SpdySession spdySession)
    • getVersion

      public abstract SpdyVersion getVersion()
    • newOutputSink

      protected abstract SessionOutputSink newOutputSink()
    • sendWindowUpdate

      protected abstract void sendWindowUpdate(int delta)
    • newStream

      protected SpdyStream newStream(org.glassfish.grizzly.http.HttpRequestPacket spdyRequest, int streamId, int associatedToStreamId, int priority, int slot, boolean isUnidirectional)
    • getLocalStreamWindowSize

      public int getLocalStreamWindowSize()
    • setLocalStreamWindowSize

      public void setLocalStreamWindowSize(int localStreamWindowSize)
    • getPeerStreamWindowSize

      public int getPeerStreamWindowSize()
    • getLocalConnectionWindowSize

      public int getLocalConnectionWindowSize()
    • setLocalConnectionWindowSize

      public void setLocalConnectionWindowSize(int localConnectionWindowSize)
    • getAvailablePeerConnectionWindowSize

      public int getAvailablePeerConnectionWindowSize()
    • getLocalMaxConcurrentStreams

      public int getLocalMaxConcurrentStreams()
      Returns the maximum number of concurrent streams allowed for this session by our side.
    • setLocalMaxConcurrentStreams

      public void setLocalMaxConcurrentStreams(int localMaxConcurrentStreams)
      Sets the default maximum number of concurrent streams allowed for this session by our side.
    • getPeerMaxConcurrentStreams

      public int getPeerMaxConcurrentStreams()
      Returns the maximum number of concurrent streams allowed for this session by peer.
    • getNextLocalStreamId

      public int getNextLocalStreamId()
    • getStreamBuilder

      public SpdySession.StreamBuilder getStreamBuilder()
    • getConnection

      public org.glassfish.grizzly.Connection getConnection()
    • getMemoryManager

      public org.glassfish.grizzly.memory.MemoryManager getMemoryManager()
    • isServer

      public boolean isServer()
    • getStream

      public SpdyStream getStream(int streamId)
    • getOutputSink

      protected SessionOutputSink getOutputSink()
    • goAway

      public void goAway(int statusCode)
      If the session is still open - closes it and sends GOAWAY frame to a peer, otherwise if the session was already closed - does nothing.
      Parameters:
      statusCode - GOAWAY status code.
    • getDeflaterCompressionLevel

      public int getDeflaterCompressionLevel()
    • setDeflaterCompressionLevel

      public void setDeflaterCompressionLevel(int deflaterCompressionLevel)
    • getNewClientStreamLock

      public ReentrantLock getNewClientStreamLock()
    • openStream

      public SpdyStream openStream(org.glassfish.grizzly.http.HttpRequestPacket spdyRequest, int streamId, int associatedToStreamId, int priority, int slot, boolean isUnidirectional, boolean fin) throws SpdyStreamException
      Method is not thread-safe, it is expected that it will be called within getNewClientStreamLock() lock scope. The caller code is responsible for obtaining and releasing the mentioned getNewClientStreamLock() lock.
      Throws:
      SpdyStreamException