org.mockftpserver.fake.command
Class EpsvCommandHandler

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

public class EpsvCommandHandler
extends AbstractFakeCommandHandler

CommandHandler for the EPSV command. Handler logic:

  1. If the user has not logged in, then reply with 530
  2. Otherwise, request the Session to switch to passive data connection mode. Return a reply code of 229, along with response text including: "(|||PORT|)", where PORT is the 16-bit TCP port address of the data connection on the server to which the client must connect.
See RFC2428 for more information.

Version:
$Revision: 262 $ - $Date: 2012-07-15 08:33:02 -0400 (Sun, 15 Jul 2012) $
Author:
Chris Mair

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
EpsvCommandHandler()
           
 
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

EpsvCommandHandler

public EpsvCommandHandler()
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.