MessagingTopic

Class representation of a message topic.

Summary
Class representation of a message topic.
This event fires when this message topic gets published.
Creates an instance of the mojo.MessagingTopic class.
Retrieves the message topic.
Retrieves the message object broadcasted with the message topic.
Sets the message object associated with the message topic.

Functions

onPublish

onPublish: function()

This event fires when this message topic gets published.

constructor

constructor: function(topic)

Creates an instance of the mojo.MessagingTopic class.

Parameters

topic{string}

Example

// instantiate a new MessagingTopic object
var msgObj = new mojo.MessagingTopic("someTopic");

getTopic

getTopic: function()

Retrieves the message topic.

Returns

{object} Topic

getMessage

getMessage: function()

Retrieves the message object broadcasted with the message topic.

Returns

{object} messageObj

setMessage

setMessage: function(messageObj)

Sets the message object associated with the message topic.

Parameters

messageObj{object}
onPublish: function()
This event fires when this message topic gets published.
constructor: function(topic)
Creates an instance of the mojo.MessagingTopic class.
getTopic: function()
Retrieves the message topic.
getMessage: function()
Retrieves the message object broadcasted with the message topic.
setMessage: function(messageObj)
Sets the message object associated with the message topic.