public abstract class AbstractCommandFilter extends java.lang.Object implements CommandFilter
Constructor and Description |
---|
AbstractCommandFilter() |
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
allowed(Command command,
KernelState state)
Find out if a particular command is allowed.
|
void |
filter(java.util.Collection<Command> commands,
KernelState state)
Filter a set of agent commands.
|
void |
initialise(Config config)
Initialise this filter.
|
public void initialise(Config config)
CommandFilter
initialise
in interface CommandFilter
config
- The kernel configuration.public void filter(java.util.Collection<Command> commands, KernelState state)
CommandFilter
filter
in interface CommandFilter
commands
- The commands to filter. This collection should be modified to remove any illegal commands.state
- The state of the kernel.protected abstract boolean allowed(Command command, KernelState state)
command
- The command.state
- The kernel state.