goog.Disposable | |
goog.net.xpc.Transport | goog.Disposable |
goog.net.xpc.IframePollingTransport | goog.net.xpc.Transport |
channel
: goog.net.xpc.CrossPageChannel
The channel this
transport belongs to.
|
opt_domHelper
: goog.dom.DomHelper=
The dom helper to use for finding
the correct window.
|
![]()
Checks if the frames in the peer's page are ready. These contain a
document from the own domain and are the ones messages are received through.
|
code » | ||
![]()
Check if connection is ready.
|
code » | ||
![]()
Checks if the iframes created in the own document are ready.
|
code » | ||
![]()
Connects this transport.
|
code » | ||
Constructs a sending frame the the given id.
|
code » | ||
![]()
Creates the iframes which are used to send messages (and acknowledgements)
to the peer. Sender iframes contain a document from a different origin and
therefore their content can't be accessed.
|
code » | ||
![]()
Cleans up the existing sender frames owned by this peer. Only called by
the outer peer.
|
code » | ||
![]()
Delivers a message.
Arguments:
|
code » | ||
![]()
No description.
|
code » | ||
Returns the name/ID of the ack frame.
Returns: string
Name of ack frame.
|
code » | ||
Returns the name/ID of the message frame.
Returns: string
Name of message frame.
|
code » | ||
Safely retrieves the peer frame with the specified name.
|
code » | ||
Safely retrieves the frames from the peer window. If an error is thrown
(e.g. the window is closing) an empty frame object is returned.
|
code » | ||
Determines whether the channel is still available. The channel is
unavailable if the transport was disposed or the peer is no longer
available.
Returns: boolean
Whether the channel is available.
|
code » | ||
Checks if the receiving frame is ready.
|
code » | ||
![]()
The protocol for reconnecting is for the inner frame to change channel
names, and then communicate the new channel name to the outer peer.
The outer peer looks in a predefined location for the channel name
upate. It is important to use a completely new channel name, as this
will ensure that all messaging iframes are not in the bfcache.
Otherwise, Safari may pollute the history when modifying the location
of bfcached iframes.
|
code » | ||
![]()
Scans inner peer for a reconnect message, which will be used to update
the outer peer's channel name. If a reconnect message is found, the
sender frames will be cleaned up to make way for the new sender frames.
Only called by the outer peer.
|
code » | ||
![]()
Process an incoming acknowdedgement.
Arguments:
|
code » | ||
![]()
Processes an incoming message.
Arguments:
|
code » | ||
![]()
Sends a message. Splits it in multiple frames if too long (exceeds IE's
URL-length maximum.
Wireformat: [,/<#frames>]|
|
code » | ||
![]()
Sends a frame (message part).
|
code » |
Return the transport name.
Returns: string
the transport name.
|
code » | ||
No description.
Returns: number
The transport type identifier.
|
code » | ||
Returns the window associated with this transport instance.
Returns: !Window
The window to use.
|
code » | ||
![]()
Sends a message.
|
code » | ||
![]()
Handles transport service messages (internal signalling).
Arguments:
|
code » |
![]()
Invokes a callback function when this object is disposed. Callbacks are
invoked in the order in which they were added.
Arguments:
|
code » | |||
![]()
Disposes of the object. If the object hasn't already been disposed of, calls
#disposeInternal . Classes that extend goog.Disposable should
override #disposeInternal in order to delete references to COM
objects, DOM nodes, and other disposable objects. Reentrant.
Returns: void
Nothing.
|
code » | |||
![]()
Deletes or nulls out any references to COM objects, DOM nodes, or other
disposable objects. Classes that extend
goog.Disposable should
override this method.
Not reentrant. To avoid calling it twice, it must only be called from the
subclass' disposeInternal method. Everywhere else the public
dispose method must be used.
For example:
mypackage.MyClass = function() { mypackage.MyClass.base(this, 'constructor'); // Constructor logic specific to MyClass. ... }; goog.inherits(mypackage.MyClass, goog.Disposable); mypackage.MyClass.prototype.disposeInternal = function() { // Dispose logic specific to MyClass. ... // Call superclass's disposeInternal at the end of the subclass's, like // in C++, to avoid hard-to-catch issues. mypackage.MyClass.base(this, 'disposeInternal'); }; |
code » | |||
Use
#isDisposed instead.
No description.
Returns: boolean
Whether the object has been disposed of.
|
code » | |||
No description.
Returns: boolean
Whether the object has been disposed of.
|
code » | |||
![]()
Associates a disposable object with this object so that they will be disposed
together.
Arguments:
|
code » |
![]()
Maximal frame length.
|
Code » | |
The channel this transport belongs to.
|
Code » | |
![]()
No description.
|
Code » | |
![]()
Flag indicating if channel has been initialized.
|
Code » | |
![]()
The number of times the inner frame will check for evidence of the outer
frame before it tries its reconnection sequence. These occur at 100ms
intervals, making this an effective max waiting period of 500ms.
|
Code » | |
![]()
The URI which is polled for incoming messages.
|
Code » | |
![]()
Reconnection iframe created by inner peer.
|
Code » | |
![]()
The queue to hold messages which can't be sent immediately.
|
Code » | |
![]()
The URI used to send messages.
|
Code » | |
![]()
Sequence counter.
|
Code » | |
![]()
The transport type.
|
Code » | |
![]()
Flag indicating whether we are waiting for an acknoledgement.
|
Code » |
![]()
Connects this transport.
The transport implementation is expected to call
CrossPageChannel.prototype.notifyConnected when the channel is ready
to be used.
|
Code » | |
![]()
No description.
|
Code » | |
The dom helper to use for finding the window objects to reference.
|
Code » | |
![]()
The transport type.
|
Code » |
![]()
Polls all receivers.
|
code » | |
![]()
Starts the polling loop.
|
code » |
![]()
The string used to prefix all iframe names and IDs.
|
Code » | |
![]()
Long polling interval.
|
Code » | |
![]()
Short polling interval.
|
Code » | |
![]()
Period how long to use TIME_POLL_SHORT_ before raising polling-interval
to TIME_POLL_LONG_ after an activity.
|
Code » | |
![]()
No description.
|
Code » | |
![]()
No description.
|
Code » | |
![]()
Callback that wraps receive_ to be used in timers.
|
Code » | |
![]()
Array holding all Receiver-instances.
|
Code » | |
![]()
No description.
|
Code » |