MessageDispatcher

MessageDispatcher

Class represents MessageDispatcher

Constructor

new MessageDispatcher(actionAllocator)

Source:

creates new MessageDispatcher instance

Parameters:
Name Type Default Description
actionAllocator object null

Methods

(private) _runObjectAllocator(allocator, data)

Source:

run against object allocator

Parameters:
Name Type Description
allocator object
data Message.data

executeAction(type, action, messageData) → {*}

Source:

execute action

Parameters:
Name Type Description
type string
action string
messageData object | string
Returns:
Type
*

filter(filterMethod) → {MessageDispatcher}

Source:

define general filter for this dispatcher

Parameters:
Name Type Description
filterMethod function
Returns:
Type
MessageDispatcher

getMessageActionAllocatorType(action) → {string|null}

Source:

get message allocator type

Parameters:
Name Type Description
action string
Returns:
Type
string | null

onMessage(message)

Source:

handles and maps incoming messages

Parameters:
Name Type Description
message Message

validateMessageOnCustomFilter(messageData) → {boolean}

Source:

check validate message on custom filter

Parameters:
Name Type Description
messageData
Returns:
Type
boolean