From 1e237d795d3a2563fdcf5956b652327c443a49fc Mon Sep 17 00:00:00 2001 From: laoyuyu <511455842@qq.com> Date: Sat, 28 Dec 2019 13:18:20 +0800 Subject: [PATCH] =?UTF-8?q?loader=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/arialyy/aria/core/AriaManager.java | 2 +- .../core/manager/DTaskWrapperFactory.java | 2 +- .../aria/apache/commons/net/ftp/FTPFile.java | 2 +- .../net/ftp/parser/NetwareFTPEntryParser.java | 2 +- .../net/ftp/parser/VMSFTPEntryParser.java | 2 +- ...cordAdapter.java => FtpRecordHandler.java} | 8 +- .../aria/ftp/download/FtpDLoaderAdapter.java | 6 +- .../aria/ftp/download/FtpDirDLoaderUtil.java | 4 +- .../aria/ftp/upload/FtpULoaferAdapter.java | 6 +- ...eInfoThread.java => HttpFileInfoTask.java} | 30 ++- .../arialyy/aria/http/HttpGroupInfoTask.java | 167 +++++++++++++++ ...ordAdapter.java => HttpRecordHandler.java} | 14 +- .../aria/http/download/DGroupLoaderUtil.java | 8 +- .../http/download/HttpDLoaderAdapter.java | 200 +++++++++--------- .../aria/http/download/HttpDLoaderUtil.java | 36 ++-- .../aria/http/download/HttpDTTBuilder.java | 62 ++++++ .../http/download/HttpSubDLoaderUtil.java | 4 +- .../aria/http/upload/HttpULoaderAdapter.java | 6 +- .../com/arialyy/aria/m3u8/BaseM3U8Loader.java | 4 +- ...ordAdapter.java => M3U8RecordHandler.java} | 8 +- .../core/common/AbsRecordHandlerAdapter.java | 44 ---- .../aria/core/common/RecordHandler.java | 56 +++-- .../aria/core/common/RecordHelper.java | 2 +- .../arialyy/aria/core/config/XMLReader.java | 4 +- ...GroupUtil.java => AbsGroupLoaderUtil.java} | 4 +- .../aria/core/group/SimpleSchedulers.java | 2 +- .../aria/core/group/SimpleSubQueue.java | 2 +- .../arialyy/aria/core/inf/IThreadState.java | 15 +- .../aria/core/listener/BaseDListener.java | 2 +- .../aria/core/listener/BaseUListener.java | 2 +- .../core/listener/DownloadGroupListener.java | 2 +- .../arialyy/aria/core/loader/AbsLoader.java | 97 +++++---- .../aria/core/loader/AbsNormalLoaderUtil.java | 36 ++-- .../aria/core/loader/AbsNormalTTBuilder.java | 185 ++++++++++++++++ .../IInfoTask.java} | 40 ++-- .../com/arialyy/aria/core/loader/ILoader.java | 15 +- .../aria/core/loader/ILoaderAdapter.java | 1 - ...erIntercept.java => ILoaderComponent.java} | 32 +-- ...erInterceptor.java => ILoaderVisitor.java} | 43 ++-- .../IRecordHandler.java} | 37 +++- .../IThreadTaskBuilder.java} | 31 +-- .../arialyy/aria/core/loader/LoaderChain.java | 75 ------- ...dInterceptor.java => LoaderStructure.java} | 38 ++-- .../aria/core/loader/NormalLoader.java | 186 +++++----------- .../aria/core/loader/ThreadStateManager.java | 140 ++++++------ .../arialyy/aria/core/task/AbsGroupTask.java | 6 +- .../arialyy/aria/core/task/IThreadTask.java | 6 + .../arialyy/aria/core/task/ThreadTask.java | 4 + .../java/com/arialyy/aria/util/CheckUtil.java | 2 +- .../com/arialyy/aria/util/RecordUtil.java | 2 +- app/gradle.properties | 4 +- build.gradle | 4 +- 52 files changed, 1003 insertions(+), 689 deletions(-) rename FtpComponent/src/main/java/com/arialyy/aria/ftp/{FtpRecordAdapter.java => FtpRecordHandler.java} (93%) rename HttpComponent/src/main/java/com/arialyy/aria/http/{HttpFileInfoThread.java => HttpFileInfoTask.java} (94%) create mode 100644 HttpComponent/src/main/java/com/arialyy/aria/http/HttpGroupInfoTask.java rename HttpComponent/src/main/java/com/arialyy/aria/http/{HttpRecordAdapter.java => HttpRecordHandler.java} (90%) create mode 100644 HttpComponent/src/main/java/com/arialyy/aria/http/download/HttpDTTBuilder.java rename M3U8Component/src/main/java/com/arialyy/aria/m3u8/{M3U8RecordAdapter.java => M3U8RecordHandler.java} (95%) delete mode 100644 PublicComponent/src/main/java/com/arialyy/aria/core/common/AbsRecordHandlerAdapter.java rename PublicComponent/src/main/java/com/arialyy/aria/core/group/{AbsGroupUtil.java => AbsGroupLoaderUtil.java} (98%) create mode 100644 PublicComponent/src/main/java/com/arialyy/aria/core/loader/AbsNormalTTBuilder.java rename PublicComponent/src/main/java/com/arialyy/aria/core/{inf/OnFileInfoCallback.java => loader/IInfoTask.java} (60%) rename PublicComponent/src/main/java/com/arialyy/aria/core/loader/{LoaderIntercept.java => ILoaderComponent.java} (63%) rename PublicComponent/src/main/java/com/arialyy/aria/core/loader/{ILoaderInterceptor.java => ILoaderVisitor.java} (60%) rename PublicComponent/src/main/java/com/arialyy/aria/core/{inf/IRecordHandlerAdapter.java => loader/IRecordHandler.java} (69%) rename PublicComponent/src/main/java/com/arialyy/aria/core/{inf/IRecordHandler.java => loader/IThreadTaskBuilder.java} (55%) delete mode 100644 PublicComponent/src/main/java/com/arialyy/aria/core/loader/LoaderChain.java rename PublicComponent/src/main/java/com/arialyy/aria/core/loader/{RecordInterceptor.java => LoaderStructure.java} (50%) diff --git a/Aria/src/main/java/com/arialyy/aria/core/AriaManager.java b/Aria/src/main/java/com/arialyy/aria/core/AriaManager.java index a562e53b..c7483c7c 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/AriaManager.java +++ b/Aria/src/main/java/com/arialyy/aria/core/AriaManager.java @@ -35,7 +35,7 @@ import com.arialyy.aria.core.download.DownloadGroupEntity; import com.arialyy.aria.core.download.DownloadReceiver; import com.arialyy.aria.core.inf.AbsReceiver; import com.arialyy.aria.core.inf.IReceiver; -import com.arialyy.aria.core.inf.IRecordHandler; +import com.arialyy.aria.core.loader.IRecordHandler; import com.arialyy.aria.core.inf.ReceiverType; import com.arialyy.aria.core.upload.UploadEntity; import com.arialyy.aria.core.upload.UploadReceiver; diff --git a/Aria/src/main/java/com/arialyy/aria/core/manager/DTaskWrapperFactory.java b/Aria/src/main/java/com/arialyy/aria/core/manager/DTaskWrapperFactory.java index 16e6592d..6f08c620 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/manager/DTaskWrapperFactory.java +++ b/Aria/src/main/java/com/arialyy/aria/core/manager/DTaskWrapperFactory.java @@ -19,7 +19,7 @@ import com.arialyy.aria.core.TaskRecord; import com.arialyy.aria.core.download.DTaskWrapper; import com.arialyy.aria.core.download.DownloadEntity; import com.arialyy.aria.core.inf.IEntity; -import com.arialyy.aria.core.inf.IRecordHandler; +import com.arialyy.aria.core.loader.IRecordHandler; import com.arialyy.aria.core.wrapper.ITaskWrapper; import java.io.File; diff --git a/FtpComponent/src/main/java/aria/apache/commons/net/ftp/FTPFile.java b/FtpComponent/src/main/java/aria/apache/commons/net/ftp/FTPFile.java index 5edcc119..3a9dd625 100644 --- a/FtpComponent/src/main/java/aria/apache/commons/net/ftp/FTPFile.java +++ b/FtpComponent/src/main/java/aria/apache/commons/net/ftp/FTPFile.java @@ -55,7 +55,7 @@ public class FTPFile implements Serializable { /** A constant indicating file/directory write permission. ***/ public static final int WRITE_PERMISSION = 1; /** - * A constant indicating file execute permission or directory listing + * A constant indicating file accept permission or directory listing * permission. ***/ public static final int EXECUTE_PERMISSION = 2; diff --git a/FtpComponent/src/main/java/aria/apache/commons/net/ftp/parser/NetwareFTPEntryParser.java b/FtpComponent/src/main/java/aria/apache/commons/net/ftp/parser/NetwareFTPEntryParser.java index 7585ebbe..212198b3 100644 --- a/FtpComponent/src/main/java/aria/apache/commons/net/ftp/parser/NetwareFTPEntryParser.java +++ b/FtpComponent/src/main/java/aria/apache/commons/net/ftp/parser/NetwareFTPEntryParser.java @@ -95,7 +95,7 @@ public class NetwareFTPEntryParser extends ConfigurableFTPFileEntryParserImpl { * Netware file permissions are in the following format: RWCEAFMS, and are explained as follows: *