public class NlstCommandHandler extends AbstractStubDataCommandHandler implements CommandHandler
directoryListing
property.
Each invocation record stored by this CommandHandler includes the following data element key/values:
PATHNAME_KEY
("pathname") - the pathname of the directory (or file) submitted on the
invocation (the first command parameter); this parameter is optional, so the value may be null.
Modifier and Type | Field and Description |
---|---|
static String |
PATHNAME_KEY |
finalReplyCode, finalReplyMessageKey, finalReplyText, preliminaryReplyCode, preliminaryReplyMessageKey, preliminaryReplyText
LOG
Constructor and Description |
---|
NlstCommandHandler() |
Modifier and Type | Method and Description |
---|---|
protected void |
beforeProcessData(Command command,
Session session,
InvocationRecord invocationRecord)
Perform any necessary logic before transferring data across the data connection.
|
protected void |
processData(Command command,
Session session,
InvocationRecord invocationRecord)
Abstract method placeholder for subclass transfer of data across the data connection.
|
void |
setDirectoryListing(String directoryListing)
Set the contents of the directoryListing to send back on the data connection for this command.
|
afterProcessData, handleCommand, sendFinalReply, setFinalReplyCode, setFinalReplyMessageKey, setFinalReplyText, setPreliminaryReplyCode, setPreliminaryReplyMessageKey, setPreliminaryReplyText
clearInvocations, getInvocation, handleCommand, numberOfInvocations, sendReply
assertValidReplyCode, getReplyTextBundle, quotes, setReplyTextBundle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handleCommand
public static final String PATHNAME_KEY
protected void beforeProcessData(Command command, Session session, InvocationRecord invocationRecord) throws Exception
AbstractStubDataCommandHandler
beforeProcessData
in class AbstractStubDataCommandHandler
command
- - the Command to be handledsession
- - the session on which the Command was submittedinvocationRecord
- - the InvocationRecord; CommandHandlers are expected to add
handler-specific data to the InvocationRecord, as appropriateException
- - if an error occursAbstractStubDataCommandHandler.beforeProcessData(org.mockftpserver.core.command.Command, org.mockftpserver.core.session.Session, org.mockftpserver.core.command.InvocationRecord)
protected void processData(Command command, Session session, InvocationRecord invocationRecord)
AbstractStubDataCommandHandler
processData
in class AbstractStubDataCommandHandler
command
- - the Command to be handledsession
- - the session on which the Command was submittedinvocationRecord
- - the InvocationRecord; CommandHandlers are expected to add
handler-specific data to the InvocationRecord, as appropriateAbstractStubDataCommandHandler.processData(org.mockftpserver.core.command.Command, org.mockftpserver.core.session.Session, org.mockftpserver.core.command.InvocationRecord)
public void setDirectoryListing(String directoryListing)
directoryListing
- - the directoryListing to setCopyright © 2016. All rights reserved.