org.mockftpserver.stub.command
Class StouCommandHandler

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
                  extended by org.mockftpserver.stub.command.StouCommandHandler
All Implemented Interfaces:
CommandHandler, InvocationHistory, ReplyTextBundleAware

public class StouCommandHandler
extends AbstractStorCommandHandler

CommandHandler for the STOU (Store Unique) command. Send back two replies on the control connection: a reply code of 150 and another of 226. The text accompanying the final reply (226) is the unique filename, which is "" by default. You can customize the returned filename by setting the filename property.

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
 
Fields inherited from class org.mockftpserver.stub.command.AbstractStorCommandHandler
FILE_CONTENTS_KEY, 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
StouCommandHandler()
           
 
Method Summary
protected  void sendFinalReply(Session session)
          Override the default implementation to send a custom reply text that includes the STOU response filename
 void setFilename(String filename)
          Set the filename returned with the final reply of the STOU command
 
Methods inherited from class org.mockftpserver.stub.command.AbstractStorCommandHandler
processData
 
Methods inherited from class org.mockftpserver.stub.command.AbstractStubDataCommandHandler
afterProcessData, beforeProcessData, handleCommand, 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
 

Constructor Detail

StouCommandHandler

public StouCommandHandler()
Method Detail

sendFinalReply

protected void sendFinalReply(Session session)
Override the default implementation to send a custom reply text that includes the STOU response filename

Overrides:
sendFinalReply in class AbstractStubDataCommandHandler
Parameters:
session - - the Session
See Also:
AbstractStubDataCommandHandler.sendFinalReply(org.mockftpserver.core.session.Session)

setFilename

public void setFilename(String filename)
Set the filename returned with the final reply of the STOU command

Parameters:
filename - - the filename


Copyright © 2014. All rights reserved.