interface IMessageDispatcher
package com.domwires.core.mvc.message
extends IDisposable, IMessageDispatcherImmutable
extended by IHierarchyObject, MessageDispatcher
Common message dispatcher. Can be used for listening and dispatching messages for mediators and models. Bubbling feature in any objects (Not only DisplayObjects, like in EventDispatcher).
Methods
dispatchMessage(type:EnumValue, ?data:Dynamic, bubbles:Bool = true):Void
Dispatches message from bottom to top of the hierarchy.
Parameters:
type | Message type |
---|---|
data | Optional data that will sent with message |
bubbles | If true, then message will bubble up to hierarchy |
handleMessage(message:IMessage):Void
Handle specified message without dispatching it.
Parameters:
null | message |
---|
removeAllMessageListeners():Void
Removes all message listeners from object. Bubbled messages will be also ignored.