public abstract class SpdySession extends Object
Modifier and Type | Class and Description |
---|---|
class |
SpdySession.BidirectionalBuilder |
class |
SpdySession.StreamBuilder |
class |
SpdySession.UnidirectionalBuilder |
Constructor and Description |
---|
SpdySession(Connection<?> connection,
boolean isServer,
SpdyHandlerFilter handlerFilter) |
Modifier and Type | Method and Description |
---|---|
static void |
bind(Connection connection,
SpdySession spdySession) |
static SpdySession |
get(Connection connection) |
int |
getAvailablePeerConnectionWindowSize() |
Connection |
getConnection() |
int |
getDeflaterCompressionLevel() |
int |
getLocalConnectionWindowSize() |
int |
getLocalMaxConcurrentStreams()
Returns the maximum number of concurrent streams allowed for this session by our side.
|
int |
getLocalStreamWindowSize() |
MemoryManager |
getMemoryManager() |
ReentrantLock |
getNewClientStreamLock() |
int |
getNextLocalStreamId() |
protected SessionOutputSink |
getOutputSink() |
int |
getPeerMaxConcurrentStreams()
Returns the maximum number of concurrent streams allowed for this session by peer.
|
int |
getPeerStreamWindowSize() |
SpdyStream |
getStream(int streamId) |
SpdySession.StreamBuilder |
getStreamBuilder() |
abstract SpdyVersion |
getVersion() |
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.
|
boolean |
isServer() |
protected abstract SessionOutputSink |
newOutputSink() |
protected SpdyStream |
newStream(HttpRequestPacket spdyRequest,
int streamId,
int associatedToStreamId,
int priority,
int slot,
boolean isUnidirectional) |
SpdyStream |
openStream(HttpRequestPacket spdyRequest,
int streamId,
int associatedToStreamId,
int priority,
int slot,
boolean isUnidirectional,
boolean fin)
Method is not thread-safe, it is expected that it will be called
within
getNewClientStreamLock() lock scope. |
protected abstract void |
sendWindowUpdate(int delta) |
void |
setDeflaterCompressionLevel(int deflaterCompressionLevel) |
void |
setLocalConnectionWindowSize(int localConnectionWindowSize) |
void |
setLocalMaxConcurrentStreams(int localMaxConcurrentStreams)
Sets the default maximum number of concurrent streams allowed for this session by our side.
|
void |
setLocalStreamWindowSize(int localStreamWindowSize) |
public SpdySession(Connection<?> connection, boolean isServer, SpdyHandlerFilter handlerFilter)
public static SpdySession get(Connection connection)
public static void bind(Connection connection, SpdySession spdySession)
public abstract SpdyVersion getVersion()
protected abstract SessionOutputSink newOutputSink()
protected abstract void sendWindowUpdate(int delta)
protected SpdyStream newStream(HttpRequestPacket spdyRequest, int streamId, int associatedToStreamId, int priority, int slot, boolean isUnidirectional)
public int getLocalStreamWindowSize()
public void setLocalStreamWindowSize(int localStreamWindowSize)
public int getPeerStreamWindowSize()
public int getLocalConnectionWindowSize()
public void setLocalConnectionWindowSize(int localConnectionWindowSize)
public int getAvailablePeerConnectionWindowSize()
public int getLocalMaxConcurrentStreams()
public void setLocalMaxConcurrentStreams(int localMaxConcurrentStreams)
public int getPeerMaxConcurrentStreams()
public int getNextLocalStreamId()
public SpdySession.StreamBuilder getStreamBuilder()
public Connection getConnection()
public MemoryManager getMemoryManager()
public boolean isServer()
public SpdyStream getStream(int streamId)
protected SessionOutputSink getOutputSink()
public void goAway(int statusCode)
statusCode
- GOAWAY status code.public int getDeflaterCompressionLevel()
public void setDeflaterCompressionLevel(int deflaterCompressionLevel)
public ReentrantLock getNewClientStreamLock()
public SpdyStream openStream(HttpRequestPacket spdyRequest, int streamId, int associatedToStreamId, int priority, int slot, boolean isUnidirectional, boolean fin) throws SpdyStreamException
getNewClientStreamLock()
lock scope.
The caller code is responsible for obtaining and releasing the mentioned
getNewClientStreamLock()
lock.SpdyStreamException
Copyright © 2015 Oracle Corporation. All rights reserved.