| java.lang.Object net.sf.drftpd.master.BaseFtpConnection
All known Subclasses: org.drftpd.tests.DummyBaseFtpConnection,
BaseFtpConnection | public class BaseFtpConnection implements Runnable(Code) | | This is a generic ftp connection handler. It delegates
the request to appropriate methods in subclasses.
author: Rana Bhattacharyya author: mog version: $Id: BaseFtpConnection.java 1451 2006-03-30 00:45:05Z zubov $ |
Method Summary | |
public InetAddress | getClientAddress() | public CommandManager | getCommandManager() | public BufferedReader | getControlReader() | public Socket | getControlSocket() | public PrintWriter | getControlWriter() | public LinkedRemoteFileInterface | getCurrentDirectory() | public DataConnectionHandler | getDataConnectionHandler() | public char | getDirection() | public GlobalContext | getGlobalContext() | public long | getLastActive() Returns the "currentTimeMillis" when last command finished executing. | public OutputStream | getOutputStream() | public static ReplacerEnvironment | getReplacerEnvironment(ReplacerEnvironment env, User user) | public FtpRequest | getRequest() Returns the FtpRequest of current or last command executed. | public char | getTransferDirection() Returns Transfer.TRANSFER_SENDING_DOWNLOAD if this connection is processing a RETR command
or Transfer.TRANSFER_RECEIVING_UPLOAD if this connection is processing a STOR command. | public User | getUser() | public User | getUserNull() | protected boolean | hasPermission(FtpRequest request) | public boolean | isAuthenticated() | public boolean | isExecuting() Returns true if client is executing a command. | public boolean | isSecure() | public static String | jprintf(ReplacerFormat format, ReplacerEnvironment env, User user) | public static String | jprintf(Class class1, String key, ReplacerEnvironment env, User user) | public String | jprintf(Class baseName, String key) | public String | jprintf(Class class1, String string, ReplacerEnvironment env) | public String | jprintfException(Class class1, String key, ReplacerEnvironment env) | public static String | jprintfExceptionStatic(Class class1, String key, ReplacerEnvironment env, User user) | public void | run() Server one FTP connection. | public void | service(FtpRequest request, PrintWriter out) Execute the ftp command. | public void | setAuthenticated(boolean authenticated) | public void | setControlSocket(Socket socket) | public void | setCurrentDirectory(LinkedRemoteFileInterface file) | public void | setUser(String user) | public void | start() | public String | status() | public void | stop() User logout and stop this thread. | public void | stop(String message) | public String | toString() | public int | transferCounter(char transferDirection) |
_authenticated | protected boolean _authenticated(Code) | | Is the current password authenticated?
|
_executing | protected boolean _executing(Code) | | Is the client running a command?
|
_lastActive | protected long _lastActive(Code) | | time when last command from the client finished execution
|
_stopRequest | protected boolean _stopRequest(Code) | | Should this thread stop insted of continue looping?
|
_stopRequestMessage | protected String _stopRequestMessage(Code) | | |
BaseFtpConnection | protected BaseFtpConnection()(Code) | | |
getDirection | public char getDirection()(Code) | | |
getLastActive | public long getLastActive()(Code) | | Returns the "currentTimeMillis" when last command finished executing.
|
getReplacerEnvironment | public static ReplacerEnvironment getReplacerEnvironment(ReplacerEnvironment env, User user)(Code) | | |
getRequest | public FtpRequest getRequest()(Code) | | Returns the FtpRequest of current or last command executed.
|
getTransferDirection | public char getTransferDirection()(Code) | | Returns Transfer.TRANSFER_SENDING_DOWNLOAD if this connection is processing a RETR command
or Transfer.TRANSFER_RECEIVING_UPLOAD if this connection is processing a STOR command.
throws: IllegalStateException - if the connection isn't processing a STOR or RETR command. |
isAuthenticated | public boolean isAuthenticated()(Code) | | |
isExecuting | public boolean isExecuting()(Code) | | Returns true if client is executing a command.
|
isSecure | public boolean isSecure()(Code) | | |
jprintf | public static String jprintf(ReplacerFormat format, ReplacerEnvironment env, User user) throws FormatterException(Code) | | |
jprintfException | public String jprintfException(Class class1, String key, ReplacerEnvironment env) throws FormatterException(Code) | | |
jprintfExceptionStatic | public static String jprintfExceptionStatic(Class class1, String key, ReplacerEnvironment env, User user) throws FormatterException(Code) | | |
run | public void run()(Code) | | Server one FTP connection.
|
setAuthenticated | public void setAuthenticated(boolean authenticated)(Code) | | |
setControlSocket | public void setControlSocket(Socket socket)(Code) | | |
start | public void start()(Code) | | |
status | public String status()(Code) | | returns a two-line status
|
stop | public void stop()(Code) | | User logout and stop this thread.
|
transferCounter | public int transferCounter(char transferDirection)(Code) | | |
|
|