public interface Command
IfsCommand
Modifier and Type | Method and Description |
---|---|
CommandContext |
createCommandContext()
Create a default implementation of the command context object.
|
void |
populateNestedCommands(CommandInvoker commandInvoker)
Populate all the needed nested commands.
|
void |
run(CommandContext context)
Run the commmand.
|
void run(CommandContext context) throws IfsException
context
- the CommandContext
object that encapsulates both
the parameters and the result of the command.IfsException
- if there is any exception thrown.CommandContext
void populateNestedCommands(CommandInvoker commandInvoker) throws IfsException
CommandInvoker
is not guaranteed to exist for the lifetime of
the command. Therefore, the command should not keep a reference to the
command invoker and it should acquire all the references to the needed
commands in this call-back method.
commandInvoker
- the CommandInvoker
object that can be
used to acquire references to the needed
sub-commands.IfsException
- if there is any exception thrown.CommandInvoker
CommandContext createCommandContext() throws IfsException
CommandContext
.IfsException
CommandContext
Copyright © 2023. All rights reserved.