public class UserCommandHandler extends AbstractStubCommandHandler implements CommandHandler
passwordRequired property defaults to true,
indicating that a password is required following the user name. If true, this command handler
returns a reply of 331. If false, return a reply of 230.
Each invocation record stored by this CommandHandler includes the following data element key/values:
USERNAME_KEY ("username") - the user name submitted on the invocation (the first command parameter)
| Modifier and Type | Field and Description |
|---|---|
static String |
USERNAME_KEY |
replyCode, replyMessageKey, replyTextLOG| Constructor and Description |
|---|
UserCommandHandler()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
handleCommand(Command command,
Session session,
InvocationRecord invocationRecord)
Handle the specified command for the session.
|
boolean |
isPasswordRequired()
Return true if a password is required at login.
|
void |
setPasswordRequired(boolean passwordRequired)
Set true to indicate that a password is required.
|
sendReply, sendReply, setReplyCode, setReplyMessageKey, setReplyTextclearInvocations, getInvocation, handleCommand, numberOfInvocations, sendReplyassertValidReplyCode, getReplyTextBundle, quotes, setReplyTextBundleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandleCommandpublic static final String USERNAME_KEY
public void handleCommand(Command command, Session session, InvocationRecord invocationRecord)
AbstractTrackingCommandHandlerhandleCommand in class AbstractTrackingCommandHandlercommand - - 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 appropriateCommandHandler.handleCommand(org.mockftpserver.core.command.Command, org.mockftpserver.core.session.Session)public boolean isPasswordRequired()
setPasswordRequired(boolean).public void setPasswordRequired(boolean passwordRequired)
passwordRequired - - is a password required for loginCopyright © 2016. All rights reserved.