goog.labs.net.webChannel.WebChannelBaseTransport.ChannelProperties
Provided By | |
---|---|
All Implemented Interfaces |
Implementation of the goog.net.WebChannel.RuntimeProperties
.
new ChannelProperties( transportChannel, channel )
Parameters |
|
---|
Instance Methods
this.ackCommit( commitId ) → void
void
Experimental API.
This method is used by the application to generate an ack-commit response for the given commitId. Commit protocol spec: https://github.com/bidiweb/webchannel/blob/master/commit.md
This is not yet implemented.
Specified by | |||||
---|---|---|---|---|---|
Parameters |
|
this.commit( callback ) → void
void
Experimental API.
This method generates an in-band commit request to the server, which will ack the commit request as soon as all messages sent prior to this commit request have been committed by the application.
Committing a message has a stronger semantics than delivering a message to the application. Detail spec: https://github.com/bidiweb/webchannel/blob/master/commit.md
Timeout or cancellation is not supported and the application is expected to abort the channel if the commit-ack fails to arrive in time.
===
This is currently implemented only in the client layer and the commit callback will be invoked after all the pending client-sent messages have been delivered by the server-side webchannel endpoint. This semantics is different and weaker than what's required for end-to-end ack which requires the server application to ack the in-order delivery of messages that are sent before the commit request is issued.
Commit should only be called after the channel open event is received. Duplicated commits are allowed and only the last callback is guaranteed. Commit called after the channel has been closed will be ignored.
Specified by | |||||
---|---|---|---|---|---|
Parameters |
|
this.getConcurrentRequestLimit() → number
number
Specified by | |||
---|---|---|---|
Parameters | None. | ||
Returns |
|
this.getHttpSessionId() → (string|null)
(string|null)
For applications to query the current HTTP session id, sent by the server during the initial handshake.
Specified by | |||
---|---|---|---|
Parameters | None. | ||
Returns |
|
this.getLastStatusCode() → number
number
Transport-metadata support.
TODO: getInitStatusCode (handshake) TODO: getInitResponseHeaders (handshake)
Note that response headers from client-initiated close (abort) are not available.
In future when client-initiated half-close is supported, its response status will be available via this API.
Specified by | |||
---|---|---|---|
Parameters | None. | ||
Returns |
|
This method may be used by the application to recover from a peer failure or to enable sender-initiated flow-control.
Detail spec: https://github.com/bidiweb/webchannel/blob/master/commit.md
Note that the caller should NOT modify the list of returned messages.
Specified by | ||
---|---|---|
Parameters | None. | |
Returns |
|
this.getPendingRequestCount() → number
number
Specified by | |||
---|---|---|---|
Parameters | None. | ||
Returns |
|
this.isSpdyEnabled() → boolean
boolean
For applications that need support multiple channels (e.g. from different tabs) to the same origin, use this method to decide if SPDY is enabled and therefore it is safe to open multiple channels.
If SPDY is disabled, the application may choose to limit the number of active channels to one or use other means such as sub-domains to work around the browser connection limit.
Specified by | |||
---|---|---|---|
Parameters | None. | ||
Returns |
|
this.notifyNonAckedMessageCount( count, callback ) → void
void
A low water-mark message count to notify the application when the flow-control condition is cleared, that is, when the application is able to send more messages.
We expect the application to configure a high water-mark message count, which is checked via getNonAckedMessageCount(). When the high water-mark is exceeded, the application should install a callback via this method to be notified when to start to send new messages.
This is not yet implemented.
Specified by | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
this.onCommit( callback ) → void
void
Experimental API.
This method registers a callback to handle the commit request sent by the server. Commit protocol spec: https://github.com/bidiweb/webchannel/blob/master/commit.md
This is not yet implemented.
Specified by | |||||
---|---|---|---|---|---|
Parameters |
|