Members
-
<private> _subscriptions :Array
-
Description
The list of subscriptions maintained by the mixin
Details
Methods
-
subscribe( channel, topic [, callback ] ) → {object}
-
Description
Subscribe to an event
Parameters
Name Type Attributes Description channelstring The channel to subscribe to
topicstring The topic to subscribe to
callbackcallback <optional> What to do when you get the event
Returns
Details
-
once( channel [, topic [, callback ] ] ) → {object}
-
Description
Subscribe to an event once
Parameters
Name Type Attributes Description channelstring The channel to subscribe to
topicstring <optional> The topic to subscribe to
callbackcallback <optional> What to do when you get the event
Returns
Details
-
publish( [ channel [, topic [, options ] ] ] )
-
Description
Publish an event on the system bus
Parameters
Name Type Attributes Default Description channelstring <optional> '2' The channel to publish to
topicstring <optional> 1 The topic to publish to
optionsobject <optional> {} What to pass to the event
Name Type Attributes Default Description haboolean <optional> 2 Test sub prop
Details
-
getSubscription( channel, topic ) → {object}
-
Description
Get a subscription definition
Parameters
Name Type Description channelstring topicstring Returns
Details
-
<private> destroy()
-
Description
Gets rid of all subscriptions for this object.
Details