Skip to content
Permalink
Browse files

优化任务配置

  • Loading branch information...
AriaLyy committed Jan 22, 2019
1 parent 56af75c commit 1a8361704589cabd3fedabc6976d1a1e794067cd
Showing with 931 additions and 1,224 deletions.
  1. +2 −5 .github/ISSUE_TEMPLATE/Custom.md
  2. +16 −12 Aria/src/main/java/com/arialyy/aria/core/AriaManager.java
  3. +0 −441 Aria/src/main/java/com/arialyy/aria/core/ConfigHelper.java.back
  4. +2 −2 Aria/src/main/java/com/arialyy/aria/core/common/AbsFileer.java
  5. +22 −19 Aria/src/main/java/com/arialyy/aria/core/common/AbsThreadTask.java
  6. +12 −12 Aria/src/main/java/com/arialyy/aria/core/common/BaseListener.java
  7. +2 −2 Aria/src/main/java/com/arialyy/aria/core/common/RecordWrapper.java
  8. +2 −2 Aria/src/main/java/com/arialyy/aria/core/common/SubThreadConfig.java
  9. +3 −4 Aria/src/main/java/com/arialyy/aria/core/common/ftp/AbsFtpThreadTask.java
  10. +112 −0 Aria/src/main/java/com/arialyy/aria/core/config/AppConfig.java
  11. +51 −0 Aria/src/main/java/com/arialyy/aria/core/config/BaseConfig.java
  12. +221 −0 Aria/src/main/java/com/arialyy/aria/core/config/BaseTaskConfig.java
  13. +1 −1 Aria/src/main/java/com/arialyy/aria/core/{ → config}/ConfigType.java
  14. +117 −0 Aria/src/main/java/com/arialyy/aria/core/config/Configuration.java
  15. +114 −0 Aria/src/main/java/com/arialyy/aria/core/config/DGroupConfig.java
  16. +75 −0 Aria/src/main/java/com/arialyy/aria/core/config/DownloadConfig.java
  17. +5 −0 Aria/src/main/java/com/arialyy/aria/core/config/TTaskConfigAdapeter.java
  18. +44 −0 Aria/src/main/java/com/arialyy/aria/core/config/UploadConfig.java
  19. +12 −13 Aria/src/main/java/com/arialyy/aria/core/{ConfigHelper.java → config/XMLReader.java}
  20. +2 −4 Aria/src/main/java/com/arialyy/aria/core/download/BaseDListener.java
  21. +2 −2 Aria/src/main/java/com/arialyy/aria/core/download/DGEntityWrapper.java
  22. +7 −1 Aria/src/main/java/com/arialyy/aria/core/download/DGTaskWrapper.java
  23. +10 −0 Aria/src/main/java/com/arialyy/aria/core/download/DTaskWrapper.java
  24. +2 −4 Aria/src/main/java/com/arialyy/aria/core/download/DownloadGroupListener.java
  25. +3 −3 Aria/src/main/java/com/arialyy/aria/core/download/DownloadGroupTask.java
  26. +4 −4 Aria/src/main/java/com/arialyy/aria/core/download/DownloadTask.java
  27. +13 −11 Aria/src/main/java/com/arialyy/aria/core/download/downloader/FtpThreadTask.java
  28. +1 −1 Aria/src/main/java/com/arialyy/aria/core/download/downloader/HttpFileInfoThread.java
  29. +14 −12 Aria/src/main/java/com/arialyy/aria/core/download/downloader/HttpThreadTask.java
  30. +14 −0 Aria/src/main/java/com/arialyy/aria/core/inf/AbsTaskWrapper.java
  31. +2 −2 Aria/src/main/java/com/arialyy/aria/core/queue/DownloadGroupTaskQueue.java
  32. +3 −10 Aria/src/main/java/com/arialyy/aria/core/scheduler/AbsSchedulers.java
  33. +2 −7 Aria/src/main/java/com/arialyy/aria/core/upload/BaseUListener.java
  34. +6 −0 Aria/src/main/java/com/arialyy/aria/core/upload/UTaskWrapper.java
  35. +9 −6 Aria/src/main/java/com/arialyy/aria/core/upload/uploader/FtpThreadTask.java
  36. +11 −10 Aria/src/main/java/com/arialyy/aria/core/upload/uploader/HttpThreadTask.java
  37. +1 −1 Aria/src/main/java/com/arialyy/aria/orm/{AbsWrapper.java → AbsDbWrapper.java}
  38. +2 −2 Aria/src/main/java/com/arialyy/aria/orm/DbEntity.java
  39. +2 −2 Aria/src/main/java/com/arialyy/aria/orm/DelegateFind.java
  40. +1 −1 Aria/src/main/java/com/arialyy/aria/orm/DelegateUpdate.java
  41. +1 −1 Aria/src/main/java/com/arialyy/aria/orm/DelegateWrapper.java
  42. +3 −3 app/src/main/assets/aria_config.xml
  43. +0 −621 aria/src/main/java/com/arialyy/aria/core/Configuration.java
  44. +3 −3 aria/src/main/java/com/arialyy/aria/core/upload/UploadTask.java
@@ -4,7 +4,7 @@ about: 描述你遇到的问题或bug

---

## 版本号
## Aria版本


## 什么问题
@@ -13,8 +13,5 @@ about: 描述你遇到的问题或bug
## 如何复现此问题


## 手机型号


## 控制台日志(越完整越好)
## 控制台日志

@@ -28,6 +28,12 @@
import android.widget.PopupWindow;
import com.arialyy.aria.core.command.ICmd;
import com.arialyy.aria.core.common.QueueMod;
import com.arialyy.aria.core.config.AppConfig;
import com.arialyy.aria.core.config.DGroupConfig;
import com.arialyy.aria.core.config.DownloadConfig;
import com.arialyy.aria.core.config.UploadConfig;
import com.arialyy.aria.core.config.XMLReader;
import com.arialyy.aria.core.config.Configuration;
import com.arialyy.aria.core.download.DownloadEntity;
import com.arialyy.aria.core.download.DownloadGroupEntity;
import com.arialyy.aria.core.download.DownloadReceiver;
@@ -54,9 +60,7 @@
import org.xml.sax.SAXException;

/**
* Created by lyy on 2016/12/1.
* https://github.com/AriaLyy/Aria
* Aria管理器,任务操作在这里执行
* Created by lyy on 2016/12/1. https://github.com/AriaLyy/Aria Aria管理器,任务操作在这里执行
*/
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH) public class AriaManager {
private static final String TAG = "AriaManager";
@@ -72,10 +76,10 @@
private Map<String, List<String>> mSubClass = new ConcurrentHashMap<>();
public static Context APP;
private List<ICmd> mCommands = new ArrayList<>();
private Configuration.DownloadConfig mDConfig;
private Configuration.UploadConfig mUConfig;
private Configuration.AppConfig mAConfig;
private Configuration.DGroupConfig mDGConfig;
private DownloadConfig mDConfig;
private UploadConfig mUConfig;
private AppConfig mAConfig;
private DGroupConfig mDGConfig;

private AriaManager(Context context) {
APP = context.getApplicationContext();
@@ -179,7 +183,7 @@ private void amendTaskState() {
* </code>
* </pre>
*/
public Configuration.DownloadConfig getDownloadConfig() {
public DownloadConfig getDownloadConfig() {
return mDConfig;
}

@@ -192,14 +196,14 @@ private void amendTaskState() {
* </code>
* </pre>
*/
public Configuration.UploadConfig getUploadConfig() {
public UploadConfig getUploadConfig() {
return mUConfig;
}

/**
* 获取APP配置
*/
public Configuration.AppConfig getAppConfig() {
public AppConfig getAppConfig() {
return mAConfig;
}

@@ -212,7 +216,7 @@ private void amendTaskState() {
* </code>
* </pre>
*/
public Configuration.DGroupConfig getDGroupConfig(){
public DGroupConfig getDGroupConfig() {
return mDGConfig;
}

@@ -423,7 +427,7 @@ private void initConfig() {
*/
private void loadConfig() {
try {
ConfigHelper helper = new ConfigHelper();
XMLReader helper = new XMLReader();
SAXParserFactory factory = SAXParserFactory.newInstance();
SAXParser parser = factory.newSAXParser();
parser.parse(APP.getAssets().open("aria_config.xml"), helper);
Oops, something went wrong.

0 comments on commit 1a83617

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.