org.mockftpserver.fake.command
Class HelpCommandHandler

java.lang.Object
  extended by org.mockftpserver.core.command.AbstractCommandHandler
      extended by org.mockftpserver.fake.command.AbstractFakeCommandHandler
          extended by org.mockftpserver.fake.command.HelpCommandHandler
All Implemented Interfaces:
CommandHandler, ReplyTextBundleAware, ServerConfigurationAware

public class HelpCommandHandler
extends AbstractFakeCommandHandler

CommandHandler for the HELP command. Handler logic:

  1. If the optional command-name parameter is specified, then reply with 214 along with the help text configured for that command (or empty if none)
  2. Otherwise, reply with 214 along with the configured default help text that has been configured (or empty if none)

The help text is configured within the FakeFtpServer.

Version:
$Revision: 182 $ - $Date: 2008-11-30 21:37:49 -0500 (Sun, 30 Nov 2008) $
Author:
Chris Mair
See Also:
ServerConfiguration, FakeFtpServer

Field Summary
 
Fields inherited from class org.mockftpserver.fake.command.AbstractFakeCommandHandler
INTERNAL_ERROR_KEY, replyCodeForFileSystemException
 
Fields inherited from class org.mockftpserver.core.command.AbstractCommandHandler
LOG
 
Constructor Summary
HelpCommandHandler()
           
 
Method Summary
protected  void handle(Command command, Session session)
          Handle the specified command for the session.
 
Methods inherited from class org.mockftpserver.fake.command.AbstractFakeCommandHandler
defaultIfNullOrEmpty, endOfLine, getFileSystem, getRealPath, getRequiredSessionAttribute, getServerConfiguration, getUserAccount, handleCommand, list, list, login, notNullOrEmpty, sendReply, sendReply, sendReply, sendReply, setServerConfiguration, validateUserAccount, verifyExecutePermission, verifyFileSystemCondition, verifyLoggedIn, verifyReadPermission, verifyWritePermission
 
Methods inherited from class org.mockftpserver.core.command.AbstractCommandHandler
assertValidReplyCode, getReplyTextBundle, quotes, setReplyTextBundle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HelpCommandHandler

public HelpCommandHandler()
Method Detail

handle

protected void handle(Command command,
                      Session session)
Description copied from class: AbstractFakeCommandHandler
Handle the specified command for the session. All checked exceptions are expected to be wrapped or handled by the caller.

Specified by:
handle in class AbstractFakeCommandHandler
Parameters:
command - - the Command to be handled
session - - the session on which the Command was submitted


Copyright © 2014. All rights reserved.