Source Code Cross Referenced for DataConnectionInitiator.java in  » Net » ColoradoFTP » com » coldcore » coloradoftp » connection » 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 » ColoradoFTP » com.coldcore.coloradoftp.connection 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


01:        package com.coldcore.coloradoftp.connection;
02:
03:        /**
04:         * Initiates a data connection with user.
05:         *
06:         * This class establishes a new connection to user's machine as a result of a PORT command.
07:         * This class is a part of a control connection and is created on a per user basis.
08:         *
09:         * When a user wants a server to establish a data connection with his/her machine, this class
10:         * is executed by a control connection untill a data connection is established or failed.
11:         * In the latter case it is a responsibility of this class to send a failed reply to the user
12:         * (this will also clear the INTERRUPT state of the control connection).
13:         * Otherwise, if data connection is established, this class must add it to a connection pool
14:         * and set control connection's reference to the new data connection.
15:         *
16:         * This class can establish connection with user only after user gets "150" reply from the
17:         * control connection and not before. Data port listener and data connection do not have to
18:         * check for "150" reply, but this class has to.
19:         *
20:         * The easiest way to test this condition is:
21:         * 1. Before producing "150" relpy, a command saves into a user session amount of bytes
22:         *    the control connection has sent to the user so far (byte marker)
23:         * 2. This class must wait until byte marker apperas in the session and the control
24:         *    connection writes beyond it
25:         * 3. When control connection clears its outgoing buffer the "150" reply is sent to the user
26:         * NB! This class may or may not remove byte marker from the session later, so it is the
27:         *     responsibility of a file command to clear the byte marker before initiating a new
28:         *     data connection to make sure that this class will wait for a proper "150" reply.
29:         *
30:         *
31:         * ColoradoFTP - The Open Source FTP Server (http://cftp.coldcore.com)
32:         */
33:        public interface DataConnectionInitiator {
34:
35:            /** Set IP address to connect to
36:             * @param ip User's IP address
37:             */
38:            public void setIp(String ip);
39:
40:            /** Get IP address to connect to
41:             * @return User's IP address
42:             */
43:            public String getIp();
44:
45:            /** Set port number to connect to
46:             * @param port User's port number
47:             */
48:            public void setPort(int port);
49:
50:            /** Get port number to connect to
51:             * @return User's port number
52:             */
53:            public int getPort();
54:
55:            /** Test if data connection initiator is active and should be executed by a control connection.
56:             * @return TRUE if it is active, FALSE otherwise
57:             */
58:            public boolean isActive();
59:
60:            /** Activate (start connecting) */
61:            public void activate();
62:
63:            /** Abort data connection initializer (if active then stop connection attempts and send failed reply).
64:             * This method has nothong to do with ABOR command and reply must not be to ABOR command.
65:             */
66:            public void abort();
67:
68:            /** Get control connection of this data connection initiator
69:             * @return Control connection
70:             */
71:            public ControlConnection getControlConnection();
72:
73:            /** Set control connection of this control connection initiator
74:             * @param controlConnection Control connection
75:             */
76:            public void setControlConnection(ControlConnection controlConnection);
77:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.