goog.Disposable | |
goog.messaging.AbstractChannel | goog.Disposable |
goog.testing.messaging.MockMessageChannel | goog.messaging.AbstractChannel |
mockControl
: goog.testing.MockControl
The mock control used to create
the method mock for #send.
|
![]()
Immediately calls opt_connectCb if given, and is otherwise a no-op. If
subclasses have configuration that needs to happen before the channel is
connected, they should override this and
#isConnected .
|
code » | |
Converts the message payload into the format expected by the registered
service (either JSON or string).
|
code » | |
![]()
The default service to be run when no other services match.
|
code » | |
![]()
Delivers a message to the appropriate service. This is meant to be called by
subclasses when they receive messages.
This method takes into account both explicitly-registered and default
services, as well as making sure that JSON payloads are decoded when
necessary. If the subclass is capable of passing objects as payloads, those
objects can be passed in to this method directly. Otherwise, the (potentially
JSON-encoded) strings should be passed in.
|
code » | |
![]()
No description.
|
code » | |
![]()
Find the service object for a given service name. If there's no service
explicitly registered, but there is a default service, a service object is
constructed for it.
|
code » | |
![]()
Always returns true. If subclasses have configuration that needs to happen
before the channel is connected, they should override this and
#connect .
|
code » | |
![]()
No description.
|
code » | |
![]()
No description.
|
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 » |
![]()
No description.
|
Code » |