net.sf.hermesftp.session.impl
Class FtpSessionImpl

java.lang.Object
  extended by java.lang.Thread
      extended by net.sf.hermesftp.session.impl.FtpSessionImpl
All Implemented Interfaces:
java.lang.Runnable, FtpConstants, FtpSession

public class FtpSessionImpl
extends java.lang.Thread
implements FtpSession, FtpConstants

Default FTP session implementation.

Author:
Lars Behnke

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
 
Fields inherited from interface net.sf.hermesftp.common.FtpConstants
ATTR_CLIENT_NAME, ATTR_DATA_PROT, ATTR_FILE_OFFSET, ATTR_FORCE_UTF8, ATTR_GROUP_DATA, ATTR_LOGIN_TIME, ATTR_RENAME_FILE, ATTR_RESTART_MARKERS, ATTR_SSL, ATTR_USER_DATA, BYTE_LENGTH, BYTE_MASK, DEFAULT_BEAN_RES, DEFAULT_KEYSTORE, DEFAULT_KEYSTORE_PASS, DT_ASCII, DT_BINARY, DT_EBCDIC, HERMES_HOME, MILLI, MODE_BLOCK, MODE_COMPRESS, MODE_STREAM, MODE_ZIP, MSG_GOODBYE, MSG150, MSG200, MSG200_NOTED, MSG200_PBSZ, MSG200_SIZE, MSG200_TYPE, MSG202, MSG211_FEAT_ENTRY, MSG211_FEAT_FOOTER, MSG211_FEAT_HEADER, MSG211_STAT, MSG213_SIZE, MSG213_TIME, MSG214, MSG220, MSG220_WEL, MSG226, MSG227, MSG229, MSG230, MSG234, MSG250, MSG257, MSG331, MSG350, MSG350_REST, MSG421, MSG425, MSG426, MSG431, MSG450, MSG451, MSG500, MSG500_CMD, MSG501, MSG501_PATH, MSG501_SIZE, MSG503, MSG503_USR, MSG504, MSG522, MSG530, MSG530_AUTH, MSG534, MSG536, MSG550, MSG550_COMM, MSG550_EXISTS, MSG550_MSG, MSG550_NOTEMPTY, MSG550_PERM, MSG553, OPT_ALLOWED_PASSIVE_PORTS, OPT_BUFFER_SIZE, OPT_CHARSET_ASCII, OPT_CHARSET_EBCDIC, OPT_EMULATE_UNIX, OPT_FTP_PORT, OPT_IPV4_BLACK_LIST, OPT_IPV6_BLACK_LIST, OPT_MAX_CONNECTIONS, OPT_MAX_DOWNLOAD_RATE, OPT_MAX_IDLE_SECONDS, OPT_MAX_UPLOAD_RATE, OPT_MSG_GOODBYE, OPT_MSG_WELCOME, OPT_REMOTE_DIR, OPT_SSL_ALLOW_EXPLICIT, OPT_SSL_ALLOW_IMPLICIT, OPT_SSL_CIPHER_SUITES, OPT_SSL_FORCE, OPT_SSL_KEYSTORE_FILE, OPT_SSL_KEYSTORE_PASS, OPT_SSL_PORT_IMPLICIT, PRIV_NONE, PRIV_READ, PRIV_READ_WRITE, PRIV_WRITE, PWD, SEPARATOR, SERVER_STATUS_HALTED, SERVER_STATUS_INIT, SERVER_STATUS_READY, SERVER_STATUS_UNDEF, SPACE, STAT_BYTES_DOWNLOADED, STAT_BYTES_UPLOADED, STAT_DOWNLOAD_RATE, STAT_FILES_DOWNLOADED, STAT_FILES_UPLOADED, STAT_UPLOAD_RATE, STRUCT_FILE, STRUCT_RECORD, TYPE_NAMES, WILDCARD
 
Constructor Summary
FtpSessionImpl()
          Constructor.
 
Method Summary
 void abort()
          Aborts the client session.
 FtpSessionContext getFtpContext()
          Getter method for the java bean ftpContext.
 boolean isTerminated()
          Getter method for the java bean terminated.
 void run()
          
 void setCmdReader(FtpCmdReader reader)
          Sets the object providing the client's commands.
 void setFtpContext(FtpSessionContext ftpContext)
          Setter method for the java bean ftpContext.
 
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.session.FtpSession
start
 

Constructor Detail

FtpSessionImpl

public FtpSessionImpl()
Constructor.

Method Detail

run

public void run()

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

getFtpContext

public FtpSessionContext getFtpContext()
Getter method for the java bean ftpContext.

Specified by:
getFtpContext in interface FtpSession
Returns:
Returns the value of the java bean ftpContext.

setFtpContext

public void setFtpContext(FtpSessionContext ftpContext)
Setter method for the java bean ftpContext.

Specified by:
setFtpContext in interface FtpSession
Parameters:
ftpContext - The value of ftpContext to set.

setCmdReader

public void setCmdReader(FtpCmdReader reader)
Sets the object providing the client's commands. The bean is set by the Spring Framework.

Specified by:
setCmdReader in interface FtpSession
Parameters:
reader - The FTP command reader thread.

isTerminated

public boolean isTerminated()
Getter method for the java bean terminated.

Specified by:
isTerminated in interface FtpSession
Returns:
Returns the value of the java bean terminated.

abort

public void abort()
Description copied from interface: FtpSession
Aborts the client session.

Specified by:
abort in interface FtpSession
See Also:
FtpSession.abort()


Copyright © 2005-2007 Lars Behnke. All Rights Reserved.