public class CommandManagerImpl<C,V> extends Object implements CommandManager<C,V>, HasCommandListener<CommandListener<C,V>>
Constructor and Description |
---|
CommandManagerImpl() |
Modifier and Type | Method and Description |
---|---|
CommandResult<V> |
allow(C context,
Command<C,V> command)
Check whether the given command can be executed.
|
CommandResult<V> |
execute(C context,
Command<C,V> command)
Execute the given command.
|
void |
setCommandListener(CommandListener<C,V> listener) |
CommandResult<V> |
undo(C context,
Command<C,V> command)
Undo an executed command.
|
public CommandResult<V> allow(C context, Command<C,V> command)
CommandManager
allow
in interface CommandManager<C,V>
public CommandResult<V> execute(C context, Command<C,V> command)
CommandManager
execute
in interface CommandManager<C,V>
public CommandResult<V> undo(C context, Command<C,V> command)
CommandManager
undo
in interface CommandManager<C,V>
public void setCommandListener(CommandListener<C,V> listener)
setCommandListener
in interface HasCommandListener<CommandListener<C,V>>
Copyright © 2001–2020 JBoss by Red Hat. All rights reserved.