Author: Carol 96

Click link for more description


Design and implement a basic File Transfer Protocol (FTP) command line tool. When executed, the tool will display a simple “ftp> “ prompt in the console where the user can enter commands to upload (put) and download (get) files from a remote server. The ftp4j library will be used to implement the actual protocol and file transfers. A remote FTP site and credentials will be provided for the project
The following classes or interfaces are provided as a starting point for the project:
• FTPBuilder.java: Provides methods for setting FTP related values and building an FTPClient instance or FTP URL.
• JobState.java: An enumeration of the possible transfer job states.
• TransferEngine.java: An interface defining a transfer engine that can manage multiple transfer jobs and perform the transfers. Different implementations may perform the transfers differently.
• TransferJob.java: An abstract base class providing basic transfer functionality including common fields and state management.
You must implement the following classes:
• ConsoleFtpApp.java: The main class of the application which will have the main() method and the core logic to prompt the user and process the user input.
• PutJob.java: A subclass of TransferJob that performs an FTP upload of a file to the remote host.
• GetJob.java: A subclass of TransferJob that performs and FTP download of a file from the remote host.
• SingleThreadedTransferEngine.java: An implementation of TransferEngine that performs all operations in a single thread (i.e. the same thread as the caller). Therefore operations like addJob(…) will block while the job is added and executed
The application must support the following commands at the prompt. You can assume that the user input will be valid (i.e. the user will provide the correct command names and number of arguments).

See More
Try a College Course Free

Sophia’s self-paced online courses are a great way to save time and money as you earn credits eligible for transfer to over 2,000 colleges and universities.*

Begin Free Trial
No credit card required

26 Sophia partners guarantee credit transfer.

226 Institutions have accepted or given pre-approval for credit transfer.

* The American Council on Education's College Credit Recommendation Service (ACE Credit®) has evaluated and recommended college credit for 21 of Sophia’s online courses. More than 2,000 colleges and universities consider ACE CREDIT recommendations in determining the applicability to their course and degree programs.