Home

# Class goog.gears.WorkerChannel

Creates a message channel for the given Gears worker.

extends goog.messaging.AbstractChannel

Instance Method Summary
| `checkMessageOrigin(string messageOrigin) ⇒ boolean` Checks whether the origin for a given message is the expected origin. If it's not, a warning is logged and the message is ignored. This checks that the origin matches the peerOrigin property. It can be overridden if more complex origin detection is necessary.
| `deliver_(?goog.gears.WorkerEvent e)` Delivers a message to the appropriate service handler. If this message isn't a GearsWorkerChannel message, it's ignored and passed on to other handlers.

`disposeInternal()`

Deletes or nulls out any references to COM objects, DOM nodes, or other disposable objects. Classes that extend {@code goog.Disposable} should override this method. Not reentrant. To avoid calling it twice, it must only be called from the subclass' {@code disposeInternal} method. Everywhere else the public {@code dispose} method must be used. For example:

    mypackage.MyClass = function() {
    goog.base(this);
    // Constructor logic specific to MyClass.
    ...
    };
    goog.inherits(mypackage.MyClass, goog.Disposable);

    mypackage.MyClass.prototype.disposeInternal = function() {
    goog.base(this, 'disposeInternal');
    // Dispose logic specific to MyClass.
    ...
    };

| `validateMessage_(?Object body) ⇒ boolean` Checks whether the message is invalid in some way.