net.xpc.IframeRelayTransport Extends goog.net.xpc.Transport
Iframe relay transport. Creates hidden iframes containing a document from the peer's origin. Data is transferred in the fragment identifier. Therefore the document loaded in the iframes can be served from the browser's cache.

Inheritance

Constructor

goog.net.xpc.IframeRelayTransport(channelopt_domHelper)

Parameters

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.

Instance Methods

Public Protected Private
connect()
Connects this transport.
code »
disposeInternal()
No description.
code »
send(servicepayload)
Sends a message.
Arguments:
service : string
Name of service this the message has to be delivered.
payload : string
The message content.
code »
send_(serviceencodedPayloadopt_fragmentIdStr)
Sends an encoded message or message fragment.
Arguments:
service : string
Name of service this the message has to be delivered.
encodedPayload : string
The message content, URI encoded.
opt_fragmentIdStr : string=
If sending a fragment, a string that identifies the fragment.
code »
transportServiceHandler(payload)
Handles transport service messages (internal signalling).
Arguments:
payload : string
The message content.
code »
getName() string
Return the transport name.
Returns: string  the transport name.
code »
getType() number
No description.
Returns: number  The transport type identifier.
code »
getWindow() !Window
Returns the window associated with this transport instance.
Returns: !Window  The window to use.
code »
send(servicepayload)
Sends a message.
Arguments:
service : string
The name off the service the message is to be delivered to.
payload : string
The message content.
code »
transportServiceHandler(payload)
Handles transport service messages (internal signalling).
Arguments:
payload : string
The message content.
code »
addOnDisposeCallback(callbackopt_scope)
Invokes a callback function when this object is disposed. Callbacks are invoked in the order in which they were added.
Arguments:
callback : function(this:T):?
The callback function.
opt_scope : T=
An optional scope to call the callback in.
code »
dispose() void
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 »
disposeInternal()
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 »
getDisposed() boolean
Use #isDisposed instead. No description.
Returns: boolean  Whether the object has been disposed of.
code »
isDisposed() boolean
No description.
Returns: boolean  Whether the object has been disposed of.
code »
registerDisposable(disposable)
Associates a disposable object with this object so that they will be disposed together.
Arguments:
disposable : goog.disposable.IDisposable
that will be disposed when this object is disposed.
code »

Instance Properties

The channel this transport belongs to.
Code »
constructor :
No description.
Code »
peerIframeId_ :
The id of the iframe the peer page lives in.
Code »
peerRelayUri_ :
The URI used to relay data to the peer.
Code »
transportType :
The transport type.
Code »
connect :
Connects this transport. The transport implementation is expected to call CrossPageChannel.prototype.notifyConnected when the channel is ready to be used.
Code »
constructor :
No description.
Code »
domHelper_ : goog.dom.DomHelper
The dom helper to use for finding the window objects to reference.
Code »
transportType :
The transport type.
Code »
creationStack :
If monitoring the goog.Disposable instances is enabled, stores the creation stack trace of the Disposable instance.
Code »
disposed_ :
Whether the object has been disposed of.
Code »
onDisposeCallbacks_ :
Callbacks to invoke when this object is disposed.
Code »

Static Methods

goog.net.xpc.IframeRelayTransport.cleanupCb_()
Function which wraps cleanup_().
code »
goog.net.xpc.IframeRelayTransport.cleanup_(opt_maxAge)
Remove all relay-iframes which are older than the maximal age.
Arguments:
opt_maxAge : number=
The maximal age in milliseconds.
code »
goog.net.xpc.IframeRelayTransport.iframeLoadHandler_()
The iframe load handler. Gets called as method on the iframe element.
code »
goog.net.xpc.IframeRelayTransport.receiveMessage_(channelNameframe)
Processes an incoming message.
Arguments:
channelName : string
The name of the channel.
frame : string
The raw frame content.
code »
goog.net.xpc.IframeRelayTransport.startCleanupTimer_()
Starts the cleanup timer.
code »

Static Properties

goog.net.xpc.IframeRelayTransport.CLEANUP_INTERVAL_ :
Interval at which iframes are destroyed.
Code »
goog.net.xpc.IframeRelayTransport.FragmentInfo :
No description.
Code »
goog.net.xpc.IframeRelayTransport.IE_PAYLOAD_MAX_SIZE_ :
Maximum sendable size of a payload via a single iframe in IE.
Code »
goog.net.xpc.IframeRelayTransport.IFRAME_MAX_AGE_ :
Time after which a relay-iframe is destroyed.
Code »
goog.net.xpc.IframeRelayTransport.cleanupTimer_ :
The cleanup timer id.
Code »
goog.net.xpc.IframeRelayTransport.fragmentMap_ :
Used to track incoming payload fragments. The implementation can process incoming fragments from several channels at a time, even if data is out-of-order or interleaved.
Code »
goog.net.xpc.IframeRelayTransport.iframeRefs_ :
Array to keep references to the relay-iframes. Used only if there is no way to detect when the iframes are loaded. In that case the relay-iframes are removed after a timeout.
Code »
goog.net.xpc.IframeRelayTransport.superClass_ :
No description.
Code »

Package net.xpc

Package Reference