|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.hermesftp.cmd.AbstractFtpCmd net.sf.hermesftp.cmd.AbstractFtpCmdStor
public abstract class AbstractFtpCmdStor
Ancestor command class that is extended by commands that store data on the remote file system.
Field Summary |
---|
Constructor Summary | |
---|---|
AbstractFtpCmdStor()
|
Method Summary | |
---|---|
protected abstract void |
doPerformAccessChecks(boolean unique,
java.io.File file,
long offset)
Checks availability and access rights for the current folder and passed file. |
protected abstract void |
doStoreFileData(java.io.InputStream is,
java.io.File file,
long offset)
Stores unstructured data as file. |
protected abstract void |
doStoreRecordData(RecordReadSupport rrs,
java.io.File file,
long offset)
Stores record based data as file. |
void |
execute(boolean unique)
Executes the command. |
long |
getCompleted()
Getter method for the java bean completed . |
long |
getFileSize()
Getter method for the java bean fileSize . |
TransferRateLimiter |
getTransferRateLimiter()
Getter Methode fuer die Eigenschaft transferRateLimiter . |
boolean |
handleAsyncCmd(java.lang.String req)
Handles any request on the control connection that was sent while the current command is executed. For instance, while storing or retrieving the client may issue an abort or status command. |
void |
incCompleted(long completed)
Setter method for the java bean completed . |
protected boolean |
isAbortRequested()
|
void |
setFileSize(long fileSize)
Setter method for the java bean fileSize . |
void |
setTransferRateLimiter(TransferRateLimiter transferRateLimiter)
|
Methods inherited from class net.sf.hermesftp.cmd.AbstractFtpCmd |
---|
getAbsPath, getAndResetFileOffset, getArguments, getCtx, getPathArg, getPermission, getToken, isResponded, msg, msg, msg, msgOut, msgOut, msgOut, out, setArguments, setCtx, setToken |
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 AbstractFtpCmdStor()
Method Detail |
---|
public void execute(boolean unique) throws FtpCmdException
unique
- True, if file that is supposed to be stored may not exist on the remote file
system.
FtpCmdException
- Wrapper class for any exception thrown in the command.public boolean handleAsyncCmd(java.lang.String req)
handleAsyncCmd
in interface FtpCmd
handleAsyncCmd
in class AbstractFtpCmd
req
- The request that has to be handled.
protected abstract void doPerformAccessChecks(boolean unique, java.io.File file, long offset) throws FtpException
execute(boolean)
;
unique
- True, if destination file may not exist already.file
- The destination file.offset
- The file offset (-1 on append).
FtpException
- Thrown if permission rules have been violated or resource limits have
been exceeded.protected abstract void doStoreRecordData(RecordReadSupport rrs, java.io.File file, long offset) throws java.io.IOException
execute(boolean)
;
rrs
- The wrapped input stream.file
- Destination file.offset
- The file offset (-1 on append).
java.io.IOException
- Thrown if IO fails or if at least one resource limit was reached.protected abstract void doStoreFileData(java.io.InputStream is, java.io.File file, long offset) throws java.io.IOException
execute(boolean)
;
is
- The input stream.file
- Destination file.offset
- The file offset (-1 on append).
java.io.IOException
- Thrown if IO fails or if at least one resource limit was reachedpublic long getCompleted()
completed
.
completed
.public void incCompleted(long completed)
completed
.
completed
- The value of completed to set.public long getFileSize()
fileSize
.
fileSize
.public void setFileSize(long fileSize)
fileSize
.
fileSize
- The value of fileSize to set.protected boolean isAbortRequested()
public TransferRateLimiter getTransferRateLimiter()
transferRateLimiter
.
transferRateLimiter
.public void setTransferRateLimiter(TransferRateLimiter transferRateLimiter)
transferRateLimiter
- the transferRateLimiter to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |