Java Doc for BaseFtpConnection.java in  » Net » DrFTPD » net » sf » drftpd » master » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Net » DrFTPD » net.sf.drftpd.master 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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 $


Field Summary
final public static  StringNEWLINE
    
protected  boolean_authenticated
    
protected  Socket_controlSocket
    
protected  LinkedRemoteFileInterface_currentDirectory
    
protected  boolean_executing
    
protected  GlobalContext_gctx
    
protected  long_lastActive
    
protected  PrintWriter_out
    
protected  FtpRequest_request
    
protected  boolean_stopRequest
    
protected  String_stopRequestMessage
    
protected  Thread_thread
    
protected  String_user
    

Constructor Summary
protected  BaseFtpConnection()
    
public  BaseFtpConnection(GlobalContext gctx, Socket soc)
    

Method Summary
public  InetAddressgetClientAddress()
    
public  CommandManagergetCommandManager()
    
public  BufferedReadergetControlReader()
    
public  SocketgetControlSocket()
    
public  PrintWritergetControlWriter()
    
public  LinkedRemoteFileInterfacegetCurrentDirectory()
    
public  DataConnectionHandlergetDataConnectionHandler()
    
public  chargetDirection()
    
public  GlobalContextgetGlobalContext()
    
public  longgetLastActive()
     Returns the "currentTimeMillis" when last command finished executing.
public  OutputStreamgetOutputStream()
    
public static  ReplacerEnvironmentgetReplacerEnvironment(ReplacerEnvironment env, User user)
    
public  FtpRequestgetRequest()
     Returns the FtpRequest of current or last command executed.
public  chargetTransferDirection()
     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  UsergetUser()
    
public  UsergetUserNull()
    
protected  booleanhasPermission(FtpRequest request)
    
public  booleanisAuthenticated()
    
public  booleanisExecuting()
     Returns true if client is executing a command.
public  booleanisSecure()
    
public static  Stringjprintf(ReplacerFormat format, ReplacerEnvironment env, User user)
    
public static  Stringjprintf(Class class1, String key, ReplacerEnvironment env, User user)
    
public  Stringjprintf(Class baseName, String key)
    
public  Stringjprintf(Class class1, String string, ReplacerEnvironment env)
    
public  StringjprintfException(Class class1, String key, ReplacerEnvironment env)
    
public static  StringjprintfExceptionStatic(Class class1, String key, ReplacerEnvironment env, User user)
    
public  voidrun()
     Server one FTP connection.
public  voidservice(FtpRequest request, PrintWriter out)
     Execute the ftp command.
public  voidsetAuthenticated(boolean authenticated)
    
public  voidsetControlSocket(Socket socket)
    
public  voidsetCurrentDirectory(LinkedRemoteFileInterface file)
    
public  voidsetUser(String user)
    
public  voidstart()
    
public  Stringstatus()
    
public  voidstop()
     User logout and stop this thread.
public  voidstop(String message)
    
public  StringtoString()
    
public  inttransferCounter(char transferDirection)
    

Field Detail
NEWLINE
final public static String NEWLINE(Code)



_authenticated
protected boolean _authenticated(Code)
Is the current password authenticated?



_controlSocket
protected Socket _controlSocket(Code)



_currentDirectory
protected LinkedRemoteFileInterface _currentDirectory(Code)



_executing
protected boolean _executing(Code)
Is the client running a command?



_gctx
protected GlobalContext _gctx(Code)



_lastActive
protected long _lastActive(Code)
time when last command from the client finished execution



_out
protected PrintWriter _out(Code)



_request
protected FtpRequest _request(Code)



_stopRequest
protected boolean _stopRequest(Code)
Should this thread stop insted of continue looping?



_stopRequestMessage
protected String _stopRequestMessage(Code)



_thread
protected Thread _thread(Code)



_user
protected String _user(Code)




Constructor Detail
BaseFtpConnection
protected BaseFtpConnection()(Code)



BaseFtpConnection
public BaseFtpConnection(GlobalContext gctx, Socket soc) throws IOException(Code)




Method Detail
getClientAddress
public InetAddress getClientAddress()(Code)
Get client address



getCommandManager
public CommandManager getCommandManager()(Code)



getControlReader
public BufferedReader getControlReader()(Code)



getControlSocket
public Socket getControlSocket()(Code)



getControlWriter
public PrintWriter getControlWriter()(Code)



getCurrentDirectory
public LinkedRemoteFileInterface getCurrentDirectory()(Code)



getDataConnectionHandler
public DataConnectionHandler getDataConnectionHandler()(Code)



getDirection
public char getDirection()(Code)



getGlobalContext
public GlobalContext getGlobalContext()(Code)



getLastActive
public long getLastActive()(Code)
Returns the "currentTimeMillis" when last command finished executing.



getOutputStream
public OutputStream getOutputStream() throws IOException(Code)



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.



getUser
public User getUser() throws NoSuchUserException(Code)
Get user object



getUserNull
public User getUserNull()(Code)



hasPermission
protected boolean hasPermission(FtpRequest request)(Code)



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)



jprintf
public static String jprintf(Class class1, String key, ReplacerEnvironment env, User user)(Code)



jprintf
public String jprintf(Class baseName, String key)(Code)



jprintf
public String jprintf(Class class1, String string, ReplacerEnvironment env)(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.



service
public void service(FtpRequest request, PrintWriter out) throws IOException(Code)
Execute the ftp command.



setAuthenticated
public void setAuthenticated(boolean authenticated)(Code)



setControlSocket
public void setControlSocket(Socket socket)(Code)



setCurrentDirectory
public void setCurrentDirectory(LinkedRemoteFileInterface file)(Code)



setUser
public void setUser(String user)(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.



stop
public void stop(String message)(Code)



toString
public String toString()(Code)



transferCounter
public int transferCounter(char transferDirection)(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.