From: steve c. <pre...@ya...> - 2005-09-07 14:45:28
|
Hello team, After I tracked the code and ran the project, I propose my idea for the = ftp support. I hope you can give me comments about it. class diagram http://homepage3.seed.net.tw/web@5/stevechang/class.png sequence diagram for create a new download task = http://homepage3.seed.net.tw/web@5/stevechang/seq.png The design is based on the abstract factory design pattern. = ProtocolFactory is an abstract factory class that creates = ProtocolDownloadHelper, Protocol and Command. Based on the original code, DownloadMap and DownloadRange aren't = dependent on protocol. So they aren't appear on the class diagram. In order to seperate the quickget from protocol implementation clearly, = I use protocol and command interface to wrap the httpclient library and = ftp implementation is also wrapped under the same interface. I also find a ftp implementation that has a similar architecture with = httpclient under apache common net project. Hope for your comment. Regards, Steve |