net.sf.hermesftp.parser.impl
Class FtpCmdParserImpl

java.lang.Object
  extended by net.sf.hermesftp.parser.impl.FtpCmdParserImpl
All Implemented Interfaces:
FtpCmdParser, org.springframework.beans.factory.BeanFactoryAware

public class FtpCmdParserImpl
extends java.lang.Object
implements FtpCmdParser, org.springframework.beans.factory.BeanFactoryAware

Default implementation of a command container.

Author:
Lars Behnke

Constructor Summary
FtpCmdParserImpl()
          Constructor.
 
Method Summary
 FtpCmd createCommandByToken(java.lang.String token)
          Returns the command instance corresponding to the passed token.
 java.lang.String findCommandToken(java.lang.String cmdString)
          Extracts the command token from the passed command line.
 java.lang.String[] getCommandTokens()
          Lists the known FTP commands.
 void setBeanFactory(org.springframework.beans.factory.BeanFactory f)
          
 void setCommands(java.util.Map<java.lang.String,java.lang.String> map)
          Registers the implemented FTP commands.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FtpCmdParserImpl

public FtpCmdParserImpl()
Constructor.

Method Detail

setCommands

public void setCommands(java.util.Map<java.lang.String,java.lang.String> map)
Registers the implemented FTP commands.

Specified by:
setCommands in interface FtpCmdParser
Parameters:
map - The commands.

findCommandToken

public java.lang.String findCommandToken(java.lang.String cmdString)
Extracts the command token from the passed command line.

Specified by:
findCommandToken in interface FtpCmdParser
Parameters:
cmdString - The command string.
Returns:
The command token or NULL.

createCommandByToken

public FtpCmd createCommandByToken(java.lang.String token)
Returns the command instance corresponding to the passed token.

Specified by:
createCommandByToken in interface FtpCmdParser
Parameters:
token - The command token.
Returns:
The command instance.

getCommandTokens

public java.lang.String[] getCommandTokens()
Lists the known FTP commands.

Specified by:
getCommandTokens in interface FtpCmdParser
Returns:
The FTP commands.

setBeanFactory

public void setBeanFactory(org.springframework.beans.factory.BeanFactory f)

Specified by:
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware


Copyright © 2005-2007 Lars Behnke. All Rights Reserved.