|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.hermesftp.cmd.AbstractFtpCmd
public abstract class AbstractFtpCmd
Abstract ancestor of FTP command classes that provides some functionallity shared by different command classes.
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
AbstractFtpCmd()
|
|
| Method Summary | |
|---|---|
protected java.lang.String |
getAbsPath(java.lang.String path)
Returns the absolute path of the passed rel. path. |
protected long |
getAndResetFileOffset()
|
java.lang.String |
getArguments()
Returns the arguments previously passed to the instance. |
FtpSessionContext |
getCtx()
Getter method for the java bean ctx. |
protected java.lang.String |
getPathArg()
Returns a path argument. |
int |
getPermission()
Gets the permission on the current path. |
java.lang.String |
getToken()
Returns the command token. |
boolean |
handleAsyncCmd(java.lang.String req)
Handles any request on the control connection that was sent while the current command is executed. |
boolean |
isResponded()
|
protected java.lang.String |
msg(java.lang.String msgKey)
Returns a message resource string. |
protected java.lang.String |
msg(java.lang.String msgKey,
java.lang.Object[] args)
Returns a message resource string. |
protected java.lang.String |
msg(java.lang.String msgKey,
java.lang.String arg)
Returns a message resource string. |
protected void |
msgOut(java.lang.String msgKey)
Convenience method that prints out a message to the control channel.. |
protected void |
msgOut(java.lang.String msgKey,
java.lang.Object[] args)
Writes the message identified by the passed key to the control stream. |
protected void |
msgOut(java.lang.String msgKey,
java.lang.String argument)
Convenience method that prints out a message to the control channel. |
protected void |
out(java.lang.String text)
Writes out the response to a client command. |
void |
setArguments(java.lang.String args)
Passes the optional command argument. |
void |
setCtx(FtpSessionContext ctx)
Setter method for the java bean ctx. |
void |
setToken(java.lang.String token)
Sets the command token. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.sf.hermesftp.cmd.FtpCmd |
|---|
execute, getHelp, isAuthenticationRequired |
| Constructor Detail |
|---|
public AbstractFtpCmd()
| Method Detail |
|---|
protected java.lang.String msg(java.lang.String msgKey,
java.lang.Object[] args)
msgKey - The message key.args - The arguments.
protected java.lang.String msg(java.lang.String msgKey)
msgKey - The message key.
protected java.lang.String msg(java.lang.String msgKey,
java.lang.String arg)
msgKey - The message key.arg - An single message argument.
protected void out(java.lang.String text)
text - The response.
protected void msgOut(java.lang.String msgKey,
java.lang.Object[] args)
msgKey - The message key as defined in the resource file.args - The optional arguments.protected void msgOut(java.lang.String msgKey)
msgKey - The key of the message.
protected void msgOut(java.lang.String msgKey,
java.lang.String argument)
msgKey - The key of the message.argument - Text argument.protected java.lang.String getPathArg()
protected java.lang.String getAbsPath(java.lang.String path)
path - The relative path;
protected long getAndResetFileOffset()
public void setArguments(java.lang.String args)
setArguments in interface FtpCmdargs - The arguments as textpublic java.lang.String getArguments()
public FtpSessionContext getCtx()
ctx.
ctx.public void setCtx(FtpSessionContext ctx)
ctx.
setCtx in interface FtpCmdctx - The value of ctx to set.public int getPermission()
public java.lang.String getToken()
getToken in interface FtpCmdpublic void setToken(java.lang.String token)
setToken in interface FtpCmdtoken - The command token (e.g. STOR, RETR, ...)public boolean isResponded()
public boolean handleAsyncCmd(java.lang.String req)
handleAsyncCmd in interface FtpCmdreq - The request that has to be handled.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||