org.mockftpserver.stub.command
Class PortCommandHandler

java.lang.Object
  extended by org.mockftpserver.core.command.AbstractCommandHandler
      extended by org.mockftpserver.core.command.AbstractTrackingCommandHandler
          extended by org.mockftpserver.core.command.AbstractStaticReplyCommandHandler
              extended by org.mockftpserver.stub.command.AbstractStubCommandHandler
                  extended by org.mockftpserver.stub.command.PortCommandHandler
All Implemented Interfaces:
CommandHandler, InvocationHistory, ReplyTextBundleAware

public class PortCommandHandler
extends AbstractStubCommandHandler
implements CommandHandler

CommandHandler for the PORT command. Send back a reply code of 200.

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

Version:
$Revision: 232 $ - $Date: 2009-06-13 19:18:01 -0400 (Sat, 13 Jun 2009) $
Author:
Chris Mair

Field Summary
static String HOST_KEY
           
static String PORT_KEY
           
 
Fields inherited from class org.mockftpserver.core.command.AbstractStaticReplyCommandHandler
replyCode, replyMessageKey, replyText
 
Fields inherited from class org.mockftpserver.core.command.AbstractCommandHandler
LOG
 
Constructor Summary
PortCommandHandler()
          Constructor.
 
Method Summary
 void handleCommand(Command command, Session session, InvocationRecord invocationRecord)
          Handle the command
 
Methods inherited from class org.mockftpserver.core.command.AbstractStaticReplyCommandHandler
sendReply, sendReply, setReplyCode, setReplyMessageKey, setReplyText
 
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

HOST_KEY

public static final String HOST_KEY
See Also:
Constant Field Values

PORT_KEY

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

PortCommandHandler

public PortCommandHandler()
Constructor. Initialize the replyCode.

Method Detail

handleCommand

public void handleCommand(Command command,
                          Session session,
                          InvocationRecord invocationRecord)
                   throws UnknownHostException
Handle the command

Specified by:
handleCommand in class AbstractTrackingCommandHandler
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
Throws:
UnknownHostException
See Also:
CommandHandler.handleCommand(org.mockftpserver.core.command.Command, org.mockftpserver.core.session.Session)


Copyright © 2014. All rights reserved.