public abstract class CommandFactory<T extends Command> extends Object
Modifier and Type | Field and Description |
---|---|
protected HashMap<String,Class<? extends T>> |
commands |
protected List<CommandConfigurator<T>> |
configurators |
Constructor and Description |
---|
CommandFactory() |
Modifier and Type | Method and Description |
---|---|
CommandFactory<T> |
addConfigurator(CommandConfigurator<T> configurator) |
protected void |
configureCommand(T command,
Connection con) |
T |
createCommand(String command,
Connection con) |
Set<String> |
getSupportedCommands() |
CommandFactory<T> |
installCommand(Class<? extends T> cls) |
CommandFactory<T> |
installCommand(String cmd,
Class<? extends T> cls) |
protected T |
newInstance(String command,
Connection con) |
CommandFactory<T> |
removeConfigurator(CommandConfigurator<T> configurator) |
boolean |
supportsCommand(String command) |
CommandFactory<T> |
uninstallCommand(String cmd) |
protected List<CommandConfigurator<T extends Command>> configurators
public CommandFactory<T> addConfigurator(CommandConfigurator<T> configurator)
public CommandFactory<T> removeConfigurator(CommandConfigurator<T> configurator)
public CommandFactory<T> installCommand(String cmd, Class<? extends T> cls)
public CommandFactory<T> installCommand(Class<? extends T> cls)
public CommandFactory<T> uninstallCommand(String cmd)
public boolean supportsCommand(String command)
public T createCommand(String command, Connection con) throws UnsupportedCommandException, IllegalAccessException, InstantiationException, IOException, PermissionDeniedException
protected T newInstance(String command, Connection con) throws UnsupportedCommandException, IllegalAccessException, InstantiationException, IOException, PermissionDeniedException
protected void configureCommand(T command, Connection con) throws IOException, PermissionDeniedException
IOException
PermissionDeniedException
Copyright © 2024. All rights reserved.