net.BrowserChannel.Handler Extends
Abstract base class for the browser channel handler

Inheritance

Constructor

goog.net.BrowserChannel.Handler()

Instance Methods

Public Protected Private
badMapError(browserChannelmap)
Called by the channel if enumeration of the map throws an exception.
Arguments:
browserChannel : goog.net.BrowserChannel
The browser channel.
map : Object
The map that can't be enumerated.
code »
channelClosed(browserChannelopt_pendingMapsopt_undeliveredMaps)
Indicates the BrowserChannel is closed. Also notifies about which maps, if any, that may not have been delivered to the server.
Arguments:
browserChannel : goog.net.BrowserChannel
The browser channel.
opt_pendingMaps : Array.<goog.net.BrowserChannel.QueuedMap>>
The array of pending maps, which may or may not have been delivered to the server.
opt_undeliveredMaps : Array.<goog.net.BrowserChannel.QueuedMap>>
The array of undelivered maps, which have definitely not been delivered to the server.
code »
channelError(browserChannelerror)
Indicates an error occurred on the BrowserChannel.
Arguments:
browserChannel : goog.net.BrowserChannel
The browser channel.
error : goog.net.BrowserChannel.Error
The error code.
code »
channelHandleArray(browserChannelarray)
New input is available for the application to process.
Arguments:
browserChannel : goog.net.BrowserChannel
The browser channel.
array : Array
The data array.
code »
channelHandleMultipleArrays()
Callback handler for when a batch of response arrays is received from the server.
code »
channelOpened(browserChannel)
Indicates the BrowserChannel has successfully negotiated with the server and can now send and receive data.
Arguments:
browserChannel : goog.net.BrowserChannel
The browser channel.
code »
channelSuccess(browserChanneldeliveredMaps)
Indicates maps were successfully sent on the BrowserChannel.
Arguments:
browserChannel : goog.net.BrowserChannel
The browser channel.
deliveredMaps : Array.<goog.net.BrowserChannel.QueuedMap>
The array of maps that have been delivered to the server. This is a direct reference to the internal BrowserChannel array, so a copy should be made if the caller desires a reference to the data.
code »
correctHostPrefix(serverHostPrefix) ?string
Allows the handler to override a host prefix provided by the server. Will be called whenever the channel has received such a prefix and is considering its use.
Arguments:
serverHostPrefix : ?string
The host prefix provided by the server.
Returns: ?string  The host prefix the client should use.
code »
getAdditionalParams(browserChannel) Object
Gets any parameters that should be added at the time another connection is made to the server.
Arguments:
browserChannel : goog.net.BrowserChannel
The browser channel.
Returns: Object  Extra parameter keys and values to add to the requests.
code »
getNetworkTestImageUri(browserChannel) ?goog.Uri
Gets the URI of an image that can be used to test network connectivity.
Arguments:
browserChannel : goog.net.BrowserChannel
The browser channel.
Returns: ?goog.Uri  A custom URI to load for the network test.
code »
isActive(browserChannel) boolean
Gets whether this channel is currently active. This is used to determine the length of time to wait before retrying.
Arguments:
browserChannel : goog.net.BrowserChannel
The browser channel.
Returns: boolean  Whether the channel is currently active.
code »
okToMakeRequest(browserChannel) goog.net.BrowserChannel.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.
Arguments:
browserChannel : goog.net.BrowserChannel
The browser channel.
Returns: goog.net.BrowserChannel.Error  An error code. The code should return goog.net.BrowserChannel.Error.OK to indicate it's okay. Any other error code will cause a failure.
code »

Package net.BrowserChannel

Package Reference