|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread net.sf.hermesftp.parser.impl.FtpCmdReaderThread
public class FtpCmdReaderThread
This Command reader thread listens for client input and mantains an FIFO list of incoming command lines. The thread is active during the execution of transfer commands (STOR, RETR) and informs these commands asynchronously when a status or abort is requested by the client.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
FtpCmdReaderThread()
Constructor. |
Method Summary | |
---|---|
void |
abort()
Aborts the current process.. |
FtpSessionContext |
getCtx()
Getter method for the java bean ctx . |
FtpCmdParser |
getParser()
Getter method for the java bean parser . |
boolean |
isTerminated()
Checks if the current process has been aborted. |
void |
run()
Reads commands issued by the client form the buffer. |
void |
setCtx(FtpSessionContext ctx)
Setter method for the java bean ctx . |
void |
setParser(FtpCmdParser parser)
Setter method for the java bean parser . |
FtpCmd |
waitForNextCommand(int timeout)
Waits until another command is available. |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface net.sf.hermesftp.parser.FtpCmdReader |
---|
start |
Constructor Detail |
---|
public FtpCmdReaderThread()
Method Detail |
---|
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
Runnable.run()
public FtpCmd waitForNextCommand(int timeout) throws FtpIllegalCmdException, java.net.SocketTimeoutException
waitForNextCommand
in interface FtpCmdReader
timeout
- Timeout in milliseconds.
FtpIllegalCmdException
- Thrown if an unknown command token is encountered.
java.net.SocketTimeoutException
- Timeout error.public FtpCmdParser getParser()
parser
.
getParser
in interface FtpCmdReader
parser
.public void setParser(FtpCmdParser parser)
parser
.
setParser
in interface FtpCmdReader
parser
- The value of parser to set.public FtpSessionContext getCtx()
ctx
.
ctx
.public void setCtx(FtpSessionContext ctx)
ctx
.
setCtx
in interface FtpCmdReader
ctx
- The value of ctx to set.public boolean isTerminated()
isTerminated
in interface Abortable
public void abort()
abort
in interface Abortable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |