| Package | org.mvcexpress.core |
| Class | public class CommandMap |
| Inheritance | CommandMap Object |
| Method | Defined By | ||
|---|---|---|---|
CONSTRUCTOR | CommandMap | ||
checkIsClassPooled(commandClass:Class):Boolean
Checks if PooledCommand is already pooled. | CommandMap | ||
clearCommandPool(commandClass:Class):void
Clears pool created for specified command. | CommandMap | ||
execute(commandClass:Class, params:Object = null):void
Instantiates and executes provided command class, and sends params to it. | CommandMap | ||
isMapped(type:String, commandClass:Class):Boolean
Checks if Command class is already added to message type
| CommandMap | ||
listMappings():String
Returns text of all command classes that are mapped to messages. | CommandMap | ||
map(type:String, commandClass:Class):void
Map a class to be executed then message with provided type is sent. | CommandMap | ||
scopeMap(scopeName:String, type:String, commandClass:Class):void
Maps a class for module to module communication, to be executed then message with provided type and scopeName is sent to scope. | CommandMap | ||
scopeUnmap(scopeName:String, type:String, commandClass:Class):void
Unmaps a class for module to module communication, to be executed then message with provided type and scopeName is sent to scope. | CommandMap | ||
unmap(type:String, commandClass:Class):void
Unmaps a class to be executed then message with provided type is sent. | CommandMap | ||
| CommandMap | () | Constructor |
public function CommandMap($moduleName:String, $messenger:Messenger, $proxyMap:ProxyMap, $mediatorMap:MediatorMap)CONSTRUCTOR
Parameters$moduleName:String | |
$messenger:Messenger | |
$proxyMap:ProxyMap | |
$mediatorMap:MediatorMap |
| checkIsClassPooled | () | method |
public function checkIsClassPooled(commandClass:Class):BooleanChecks if PooledCommand is already pooled.
Parameters
commandClass:Class |
Boolean — true if command pool is created.
|
| clearCommandPool | () | method |
public function clearCommandPool(commandClass:Class):voidClears pool created for specified command. (if commands are not pooled - function fails silently.)
Parameters
commandClass:Class |
| execute | () | method |
public function execute(commandClass:Class, params:Object = null):voidInstantiates and executes provided command class, and sends params to it.
Parameters
commandClass:Class — Command class to be instantiated and executed.
| |
params:Object (default = null) — Object to be sent to execute() function.
|
| handleCommandExecute | () | method |
pureLegsCore function handleCommandExecute(messageType:String, params:Object):voidfunction to be called by messenger on needed message type sent
Parameters
messageType:String | |
params:Object |
| isMapped | () | method |
public function isMapped(type:String, commandClass:Class):BooleanChecks if Command class is already added to message type
Parameters
type:String — Message type for command class to react to.
| |
commandClass:Class — Command class that will be instantiated and executed.
|
Boolean — true if Command class is already mapped to message
|
| listMappings | () | method |
public function listMappings():StringReturns text of all command classes that are mapped to messages. (for debugging)
ReturnsString — Text with all mapped commands.
|
| listMessageCommands | () | method |
pureLegsCore function listMessageCommands(messageType:String):Vector.<Class>Parameters
messageType:String |
Vector.<Class> |
| map | () | method |
public function map(type:String, commandClass:Class):voidMap a class to be executed then message with provided type is sent.
Parameters
type:String — Message type for command class to react to.
| |
commandClass:Class — Command class that will be executed.
|
| scopeMap | () | method |
public function scopeMap(scopeName:String, type:String, commandClass:Class):voidMaps a class for module to module communication, to be executed then message with provided type and scopeName is sent to scope.
Parameters
scopeName:String — both sending and receiving modules must use same scope to make module to module communication.
| |
type:String — Message type for command class to react to.
| |
commandClass:Class — Command class that will be executed.
|
| scopeUnmap | () | method |
public function scopeUnmap(scopeName:String, type:String, commandClass:Class):voidUnmaps a class for module to module communication, to be executed then message with provided type and scopeName is sent to scope.
Parameters
scopeName:String — both sending and receiving modules must use same scope to make module to module communication.
| |
type:String — Message type for command class to react to.
| |
commandClass:Class — Command class that would be executed.
|
| unmap | () | method |
public function unmap(type:String, commandClass:Class):voidUnmaps a class to be executed then message with provided type is sent.
Parameters
type:String — Message type for command class to react to.
| |
commandClass:Class — Command class that would be executed.
|