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).
• connect : Sets the remote credentials and remote host and port to use for all connections. Starts the transfer engine.
• put : Puts (uploads) the file with the given name in the current directory to the remote host. The implementation does not have to support spaces in filenames.
• get : Gets (downloads) the file with the given name into the current directory from the remote host. The implementation does not have to support spaces in filenames.
• jobs: Lists all jobs in the transfer engine and the status of the job.
• exit: Stops the transfer engine and cleanly exits the application.
• help: Displays these commands