labs.net.webChannel.ForwardChannelRequestPool Extends
This class represents the state of all forward channel requests.

Inheritance

Constructor

goog.labs.net.webChannel.ForwardChannelRequestPool(opt_maxPoolSize)

Parameters

opt_maxPoolSize : number=
The maximum pool size.

Instance Methods

Public Protected Private
addRequest(req)
Adds a new request to the pool.
Arguments:
req : !ChannelRequest
The new channel request.
code »
applyClientProtocol(clientProtocol)
Once we know the client protocol (from the handshake), check if we need enable the request pool accordingly. This is more robust than using browser-internal APIs (specific to Chrome).
Arguments:
clientProtocol : string
The client protocol
code »
cancel()
Clears the pool and cancel all the pending requests.
code »
forceComplete(onComplete) boolean
Cancels all pending requests and force the completion of channel requests. Need go through the standard onRequestComplete logic to expose the max-retry failure in the standard way.
Arguments:
onComplete : !function(!ChannelRequest)
The completion callback.
Returns: boolean  true if any request has been forced to complete.
code »
getMaxSize() number
No description.
Returns: number  The current size limit.
code »
getRequestCount() number
No description.
Returns: number  The number of pending requests in the pool.
code »
hasPendingRequest() boolean
No description.
Returns: boolean  Whether there are any pending requests.
code »
hasRequest(req) boolean
No description.
Arguments:
req : ChannelRequest
The channel request.
Returns: boolean  True if the request is a included inside the pool.
code »
isFull() boolean
No description.
Returns: boolean  True if the pool is full.
code »
removeRequest(req) boolean
Removes the given request from the pool.
Arguments:
req : ChannelRequest
The channel request.
Returns: boolean  Whether the request has been removed from the pool.
code »

Instance Properties

maxPoolSizeConfigured_ :
THe max pool size as configured.
Code »
maxSize_ :
The current size limit of the request pool. This limit is meant to be read-only after the channel is fully opened. If SPDY is enabled, set it to the max pool size, which is also configurable.
Code »
requestPool_ : goog.structs.Set
The container for all the pending request objects.
Code »
The single request object when the pool size is limited to one.
Code »

Static Methods

goog.labs.net.webChannel.ForwardChannelRequestPool.isSpdyEnabled_() boolean
No description.
Returns: boolean  True if SPDY is enabled for the current page using chrome specific APIs.
code »

Static Properties

goog.labs.net.webChannel.ForwardChannelRequestPool.MAX_POOL_SIZE_ :
The default size limit of the request pool.
Code »

Package labs.net.webChannel

Package Reference