goog.net.BrowserChannel.Handler
Classgoog.net.BrowserChannel.Handler()
Interface for the browser channel handler
.badMapError(browserChannel, map)
Called by the channel if enumeration of the map throws an exception.
browserChannel
{goog.net.BrowserChannel
}
map
{Object
}
.channelClosed(browserChannel, opt_pendingMaps, opt_undeliveredMaps)
Indicates the BrowserChannel is closed. Also notifies about which maps, if any, that may not have been delivered to the server.
browserChannel
{goog.net.BrowserChannel
}
opt_pendingMaps
{Array
.<goog.net.BrowserChannel.QueuedMap
>=}
opt_undeliveredMaps
{Array
.<goog.net.BrowserChannel.QueuedMap
>=}
.channelError(browserChannel, error)
Indicates an error occurred on the BrowserChannel.
browserChannel
{goog.net.BrowserChannel
}
error
{goog.net.BrowserChannel.Error
}
.channelHandleArray(browserChannel, array)
New input is available for the application to process.
browserChannel
{goog.net.BrowserChannel
}
array
{Array
}
.channelHandleMultipleArrays
{Function
}Callback handler for when a batch of response arrays is received from the server.
.channelOpened(browserChannel)
Indicates the BrowserChannel has successfully negotiated with the server and can now send and receive data.
browserChannel
{goog.net.BrowserChannel
}
.channelSuccess(browserChannel, deliveredMaps)
Indicates maps were successfully sent on the BrowserChannel.
browserChannel
{goog.net.BrowserChannel
}
deliveredMaps
{Array
.<goog.net.BrowserChannel.QueuedMap
>}
.correctHostPrefix(serverHostPrefix)
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.
serverHostPrefix
{?string
}
string
}
.getAdditionalParams(browserChannel)
Gets any parameters that should be added at the time another connection is made to the server.
browserChannel
{goog.net.BrowserChannel
}
Object
}
.getNetworkTestImageUri(browserChannel)
Gets the URI of an image that can be used to test network connectivity.
browserChannel
{goog.net.BrowserChannel
}
goog.Uri
?}
.isActive(browserChannel)
Gets whether this channel is currently active. This is used to determine the length of time to wait before retrying.
browserChannel
{goog.net.BrowserChannel
}
boolean
}
.okToMakeRequest(browserChannel)
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.
browserChannel
{goog.net.BrowserChannel
}
goog.net.BrowserChannel.Error
}