org.mockftpserver.stub.command
Class AbstractStorCommandHandler

java.lang.Object
  extended by org.mockftpserver.core.command.AbstractCommandHandler
      extended by org.mockftpserver.core.command.AbstractTrackingCommandHandler
          extended by org.mockftpserver.stub.command.AbstractStubDataCommandHandler
              extended by org.mockftpserver.stub.command.AbstractStorCommandHandler
All Implemented Interfaces:
CommandHandler, InvocationHistory, ReplyTextBundleAware
Direct Known Subclasses:
AppeCommandHandler, StorCommandHandler, StouCommandHandler

public abstract class AbstractStorCommandHandler
extends AbstractStubDataCommandHandler

Abstract superclass for CommandHandler for commands that store a file. Send back two replies on the control connection: a reply code of 150 and another of 226.

Each invocation record stored by this CommandHandler includes the following data element key/values:

Version:
$Revision: 194 $ - $Date: 2008-12-07 08:53:58 -0500 (Sun, 07 Dec 2008) $
Author:
Chris Mair

Field Summary
static String FILE_CONTENTS_KEY
           
static String PATHNAME_KEY
           
 
Fields inherited from class org.mockftpserver.stub.command.AbstractStubDataCommandHandler
finalReplyCode, finalReplyMessageKey, finalReplyText, preliminaryReplyCode, preliminaryReplyMessageKey, preliminaryReplyText
 
Fields inherited from class org.mockftpserver.core.command.AbstractCommandHandler
LOG
 
Constructor Summary
AbstractStorCommandHandler()
           
 
Method Summary
protected  void processData(Command command, Session session, InvocationRecord invocationRecord)
          Abstract method placeholder for subclass transfer of data across the data connection.
 
Methods inherited from class org.mockftpserver.stub.command.AbstractStubDataCommandHandler
afterProcessData, beforeProcessData, handleCommand, sendFinalReply, setFinalReplyCode, setFinalReplyMessageKey, setFinalReplyText, setPreliminaryReplyCode, setPreliminaryReplyMessageKey, setPreliminaryReplyText
 
Methods inherited from class org.mockftpserver.core.command.AbstractTrackingCommandHandler
clearInvocations, getInvocation, handleCommand, numberOfInvocations, sendReply
 
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
 
Methods inherited from interface org.mockftpserver.core.command.CommandHandler
handleCommand
 

Field Detail

PATHNAME_KEY

public static final String PATHNAME_KEY
See Also:
Constant Field Values

FILE_CONTENTS_KEY

public static final String FILE_CONTENTS_KEY
See Also:
Constant Field Values
Constructor Detail

AbstractStorCommandHandler

public AbstractStorCommandHandler()
Method Detail

processData

protected void processData(Command command,
                           Session session,
                           InvocationRecord invocationRecord)
Description copied from class: AbstractStubDataCommandHandler
Abstract method placeholder for subclass transfer of data across the data connection. Subclasses must override. The data connection is opened before this method and is closed after this method completes.

Specified by:
processData in class AbstractStubDataCommandHandler
Parameters:
command - - the Command to be handled
session - - the session on which the Command was submitted
invocationRecord - - the InvocationRecord; CommandHandlers are expected to add handler-specific data to the InvocationRecord, as appropriate
See Also:
AbstractStubDataCommandHandler.processData(org.mockftpserver.core.command.Command, org.mockftpserver.core.session.Session, org.mockftpserver.core.command.InvocationRecord)


Copyright © 2014. All rights reserved.