goog.messaging.MessageChannel
Provided By | |
---|---|
All Known Implementations |
No description available.
Instance Methods
this.connect( opt_connectCb ) → void
void
Initiates the channel connection. When this method is called, all the information needed to connect the channel has to be available.
Implementers should only require this method to be called if the channel needs to be configured in some way between when it's created and when it becomes active. Otherwise, the channel should be immediately active and this method should do nothing but immediately call opt_connectCb.
Parameters |
|
---|
this.isConnected() → boolean
boolean
this.registerDefaultService( callback ) → void
void
Registers a service to be called when a message is received that doesn't match any other services.
Parameters |
|
---|
this.registerService( serviceName, callback, opt_objectPayload ) → void
void
Registers a service to be called when a message is received.
Implementers shouldn't impose any restrictions on the service names that may
be registered. If some services are needed as control codes,
goog.messaging.MultiMessageChannel
can be used to safely split the
channel into "public" and "control" virtual channels.
Parameters |
|
---|
this.send( serviceName, payload ) → void
void
Sends a message over the channel.
Parameters |
|
---|