|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mockftpserver.core.command.AbstractCommandHandler
org.mockftpserver.core.command.AbstractTrackingCommandHandler
org.mockftpserver.core.command.AbstractStaticReplyCommandHandler
public abstract class AbstractStaticReplyCommandHandler
The abstract superclass for CommandHandler classes that default to sending
back a configured reply code and text. You can customize the returned reply
code by setting the required replyCode property. If only the
replyCode property is set, then the default reply text corresponding to that
reply code is used in the response. You can optionally configure the reply text by setting
the replyMessageKey or replyText property.
Subclasses can optionally override the reply code and/or text for the reply by calling
setReplyCode(int), setReplyMessageKey(String) and setReplyText(String).
| Field Summary | |
|---|---|
protected int |
replyCode
|
protected String |
replyMessageKey
|
protected String |
replyText
|
| Fields inherited from class org.mockftpserver.core.command.AbstractCommandHandler |
|---|
LOG |
| Constructor Summary | |
|---|---|
AbstractStaticReplyCommandHandler()
|
|
| Method Summary | |
|---|---|
protected void |
sendReply(Session session)
Send the reply using the replyCode and message key/text configured for this command handler. |
protected void |
sendReply(Session session,
Object messageParameter)
Send the reply using the replyCode and message key/text configured for this command handler. |
void |
setReplyCode(int replyCode)
Set the reply code. |
void |
setReplyMessageKey(String replyMessageKey)
Set the message key for the reply text. |
void |
setReplyText(String replyText)
Set the reply text. |
| Methods inherited from class org.mockftpserver.core.command.AbstractTrackingCommandHandler |
|---|
clearInvocations, getInvocation, handleCommand, 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 |
| Field Detail |
|---|
protected int replyCode
protected String replyText
protected String replyMessageKey
| Constructor Detail |
|---|
public AbstractStaticReplyCommandHandler()
| Method Detail |
|---|
public void setReplyCode(int replyCode)
replyCode - - the replyCode
AssertFailedException - - if the replyCode is not validpublic void setReplyText(String replyText)
replyText - - the replyTextpublic void setReplyMessageKey(String replyMessageKey)
replyMessageKey - - the replyMessageKey to setprotected void sendReply(Session session)
session - - the Session
AssertFailedException - if the replyCode is not valid
protected void sendReply(Session session,
Object messageParameter)
session - - the SessionmessageParameter - - message parameter; may be null
AssertFailedException - if the replyCode is not valid
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||