Classes
The following classes are available globally.
-
A base
IAsyncCommand
implementation.Your subclass should override the
execute
method where your business logic will handle theINotification
.
See more@see org.puremvc.swift.multicore.utilities.asynccommand.patterns.command.AsyncMacroCommand AsyncMacroCommand
Declaration
Swift
public class AsyncCommand: SimpleCommand, IAsyncCommand
-
A base
ICommand
implementation that executes otherICommand
s asynchronously.An
AsyncMacroCommand
maintains a list of closures returningICommand
references called SubCommands.When
execute
is called, theAsyncMacroCommand
caches a reference to theINotification
and callsnextCommand
.If there are still SubCommands’s to be executed, the
nextCommand
method instantiates and callsexecute
on each of its *SubCommands in turn. Each SubCommand will be passed a reference to the originalINotification
that was passed to theAsyncMacroCommand
’sexecute
method. If the SubCommand to execute is anIAsyncCommand
, the next SubCommand will not be executed until the previousIAsyncCommand
has called its commandComplete method.Unlike
AsyncCommand
andSimpleCommand
, your subclass should not overrideexecute
, but instead, should override theinitializeAsyncMacroCommand
method, callingaddSubCommand
once for each SubCommand to be executed.
See more@see org.puremvc.as3.multicore.patterns.command.AsyncCommand AsyncCommand
Declaration
Swift
public class AsyncMacroCommand: Notifier, IAsyncCommand, INotifier