goog.labs.net.webChannel.WebChannelBase.Handler
Provided By | |
---|---|
All Known Direct Subclasses |
Abstract base class for the channel handler
new Handler()
Parameters | None. |
---|
Instance Methods
this.badMapError( channel, map ) → void
void
Called by the channel if enumeration of the map throws an exception.
Parameters |
|
---|
this.channelClosed( channel, opt_pendingMaps, opt_undeliveredMaps ) → void
void
Indicates the WebChannel is closed. Also notifies about which maps, if any, that may not have been delivered to the server.
Parameters |
|
---|
this.channelError( channel, error ) → void
void
Indicates an error occurred on the WebChannel.
Parameters |
|
---|
this.channelHandleArray( channel, array ) → void
void
New input is available for the application to process.
Parameters |
|
---|
this.channelOpened( channel ) → void
void
Indicates the WebChannel has successfully negotiated with the server and can now send and receive data.
Parameters |
|
---|
this.channelSuccess( channel, request ) → void
void
Indicates messages that have been successfully sent on the channel.
Parameters |
|
---|
this.correctHostPrefix( serverHostPrefix ) → (string|null)
(string|null)
this.getAdditionalParams( channel ) → Object
Object
Gets any parameters that should be added at the time another connection is made to the server.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
this.getNetworkTestImageUri( channel ) → (goog.Uri|null)
(goog.Uri|null)
Gets the URI of an image that can be used to test network connectivity.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
this.isActive( channel ) → boolean
boolean
Gets whether this channel is currently active. This is used to determine the length of time to wait before retrying.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
this.okToMakeRequest( channel ) → goog.labs.net.webChannel.WebChannelBase.Error
goog.labs.net.webChannel.WebChannelBase.Error
Whether it's okay to make a request to the server. A handler can return false if the channel should fail. For example, if the user has logged out, the handler may want all requests to fail immediately.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
Instance Properties
this.channelHandleMultipleArrays → (function(goog.labs.net.webChannel.WebChannelBase, Array<Array<?>>): ?|null)
(function(goog.labs.net.webChannel.WebChannelBase, Array<Array<?>>): ?|null)
Callback handler for when a batch of response arrays is received from the server. When null, batched dispatching is disabled.