org.apache.ftpserver.command
Class CommandFactoryFactory

java.lang.Object
  extended by org.apache.ftpserver.command.CommandFactoryFactory

public class CommandFactoryFactory
extends Object

Factory for CommandFactory instances

Author:
Apache MINA Project

Constructor Summary
CommandFactoryFactory()
           
 
Method Summary
 void addCommand(String commandName, Command command)
          Add or override a command.
 CommandFactory createCommandFactory()
          Create an CommandFactory based on the configuration on the factory.
 Map<String,Command> getCommandMap()
          Get the installed commands
 boolean isUseDefaultCommands()
          Are default commands used?
 void setCommandMap(Map<String,Command> commandMap)
          Set commands to add or override to the default commands
 void setUseDefaultCommands(boolean useDefaultCommands)
          Sets whether the default commands will be used.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandFactoryFactory

public CommandFactoryFactory()
Method Detail

createCommandFactory

public CommandFactory createCommandFactory()
Create an CommandFactory based on the configuration on the factory.

Returns:
The CommandFactory

isUseDefaultCommands

public boolean isUseDefaultCommands()
Are default commands used?

Returns:
true if default commands are used

setUseDefaultCommands

public void setUseDefaultCommands(boolean useDefaultCommands)
Sets whether the default commands will be used.

Parameters:
useDefaultCommands - true if default commands should be used

getCommandMap

public Map<String,Command> getCommandMap()
Get the installed commands

Returns:
The installed commands

addCommand

public void addCommand(String commandName,
                       Command command)
Add or override a command.

Parameters:
commandName - The command name, e.g. STOR
command - The command

setCommandMap

public void setCommandMap(Map<String,Command> commandMap)
Set commands to add or override to the default commands

Parameters:
commandMap - The map of commands, the key will be used to map to requests.


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.