net.xpc.NixTransport Extends goog.net.xpc.Transport
NIX method transport. NOTE(user): NIX method tested in all IE versions starting from 6.0.

Inheritance

Constructor

goog.net.xpc.NixTransport(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
attemptInnerSetup_()
Attempts to setup the channel from the perspective of the inner (read: iframe) page. This method will attempt to *read* the opener object from the page's opener property. If it succeeds, this object is saved into nixChannel_ and the channel is confirmed with the container by calling CreateChannel with an instance of a wrapper for *this* page. Note that if this method fails, it will continue to loop until it succeeds.
code »
attemptOuterSetup_()
Attempts to setup the channel from the perspective of the outer (read: container) page. This method will attempt to create a NIX wrapper for this transport and place it into the "opener" property of the inner page's window object. If it fails, it will continue to loop until it does so.
code »
connect()
Connect this transport.
code »
createChannel_(channel)
Internal method called by the inner page, via the NIX wrapper, to complete the setup of the channel.
Arguments:
channel : Object
The NIX wrapper of the inner page.
code »
disposeInternal()
No description.
code »
handleMessage_(serviceNamepayload)
Internal method called by the other page, via the NIX wrapper, to deliver a message.
Arguments:
serviceName : string
The name of the service the message is to be delivered to.
payload : string
The message to process.
code »
send(servicepayload)
Sends a message.
Arguments:
service : string
The name of the service the message is to be delivered to.
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

authToken_ :
The authorization token, if any, used by this transport.
Code »
The channel this transport belongs to.
Code »
constructor :
No description.
Code »
localSetupCompleted_ :
Keeps track of whether the local setup has completed (i.e. the initial work towards setting the channel up has been completed for this end).
Code »
nixChannel_ :
The NIX channel used to talk to the other page. This object is in fact a reference to a VBScript class (see above) and as such, is in fact a COM wrapper. When using this object, make sure to not access methods without calling them, otherwise a COM error will be thrown.
Code »
remoteAuthToken_ :
The authorization token, if any, that must be sent by the other party for setup to occur.
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.NixTransport.conductGlobalSetup_(listenWindow)
Conducts the global setup work for the NIX transport method. This function creates and then injects into the page the VBScript code necessary to create the NIX wrapper class. Note that this method can be called multiple times, as it internally checks whether the work is necessary before proceeding.
Arguments:
listenWindow : Window
The window containing the affected page.
code »
goog.net.xpc.NixTransport.isNixSupported() boolean
Determines if the installed version of IE supports accessing window.opener after it has been set to a non-Window/null value. NIX relies on this being possible.
Returns: boolean  Whether window.opener behavior is compatible with NIX.
code »

Static Properties

goog.net.xpc.NixTransport.NIX_CREATE_CHANNEL :
The name of the create channel method used by the wrapper class when calling the transport.
Code »
goog.net.xpc.NixTransport.NIX_GET_WRAPPER :
Global name of the GetWrapper VBScript function. This constant is used by JavaScript to call this function. Note that this function will be stored in the *global* namespace (i.e. window in browsers).
Code »
goog.net.xpc.NixTransport.NIX_HANDLE_MESSAGE :
The name of the handle message method used by the wrapper class when calling the transport.
Code »
goog.net.xpc.NixTransport.NIX_ID_FIELD :
A "unique" identifier that is stored in the wrapper class so that the wrapper can be distinguished from other objects easily.
Code »
goog.net.xpc.NixTransport.NIX_WRAPPER :
Global name of the Wrapper VBScript class. Note that this class will be stored in the *global* namespace (i.e. window in browsers).
Code »
goog.net.xpc.NixTransport.superClass_ :
No description.
Code »

Package net.xpc

Package Reference