http, schedulers reconstruct

v4
laoyuyu 2 years ago
parent f2ef5927ca
commit 74c2e032c5
  1. 2
      Aria/build.gradle
  2. 0
      Http/.gitignore
  3. 0
      Http/bintray-release.gradle
  4. 0
      Http/build.gradle
  5. 0
      Http/consumer-rules.pro
  6. 0
      Http/proguard-rules.pro
  7. 0
      Http/src/main/AndroidManifest.xml
  8. 0
      Http/src/main/java/com/arialyy/aria/http/BaseHttpThreadTaskAdapter.java
  9. 0
      Http/src/main/java/com/arialyy/aria/http/ChunkedInputStream.java
  10. 0
      Http/src/main/java/com/arialyy/aria/http/ConnectionHelp.java
  11. 0
      Http/src/main/java/com/arialyy/aria/http/HttpBaseController.kt
  12. 0
      Http/src/main/java/com/arialyy/aria/http/HttpComponent.kt
  13. 0
      Http/src/main/java/com/arialyy/aria/http/HttpComponentLoader.kt
  14. 0
      Http/src/main/java/com/arialyy/aria/http/HttpOption.kt
  15. 0
      Http/src/main/java/com/arialyy/aria/http/HttpRecordHandler.java
  16. 0
      Http/src/main/java/com/arialyy/aria/http/HttpTaskOption.java
  17. 0
      Http/src/main/java/com/arialyy/aria/http/HttpUtil.kt
  18. 0
      Http/src/main/java/com/arialyy/aria/http/download/HttpDFileInfoTask.java
  19. 0
      Http/src/main/java/com/arialyy/aria/http/download/HttpDGInfoTask.java
  20. 0
      Http/src/main/java/com/arialyy/aria/http/download/HttpDGLoader.java
  21. 0
      Http/src/main/java/com/arialyy/aria/http/download/HttpDGLoaderUtil.java
  22. 0
      Http/src/main/java/com/arialyy/aria/http/download/HttpDLoaderUtil.java
  23. 0
      Http/src/main/java/com/arialyy/aria/http/download/HttpDStartController.kt
  24. 0
      Http/src/main/java/com/arialyy/aria/http/download/HttpDTTBuilderAdapter.java
  25. 0
      Http/src/main/java/com/arialyy/aria/http/download/HttpDTaskOption.kt
  26. 0
      Http/src/main/java/com/arialyy/aria/http/download/HttpDThreadTaskAdapter.java
  27. 0
      Http/src/main/java/com/arialyy/aria/http/download/HttpDownloadListener.kt
  28. 0
      Http/src/main/java/com/arialyy/aria/http/download/HttpDownloader.kt
  29. 0
      Http/src/main/java/com/arialyy/aria/http/download/HttpSubDLoaderUtil.java
  30. 0
      Http/src/main/java/com/arialyy/aria/http/upload/HttpULoader.java
  31. 0
      Http/src/main/java/com/arialyy/aria/http/upload/HttpULoaderUtil.java
  32. 0
      Http/src/main/java/com/arialyy/aria/http/upload/HttpUThreadTaskAdapter.java
  33. 0
      Http/src/main/resources/META-INF/MANIFEST.MF
  34. 0
      Http/src/main/resources/META-INF/services/com.arialyy.aria.core.inf.IComponentInit
  35. 0
      Http/src/main/resources/META-INF/services/com.arialyy.aria.core.inf.IUtil
  36. 2
      M3U8Component/build.gradle
  37. 4
      PublicComponent/src/main/java/com/arialyy/aria/core/DuaContext.kt
  38. 4
      PublicComponent/src/main/java/com/arialyy/aria/core/inf/IPool.java
  39. 13
      PublicComponent/src/main/java/com/arialyy/aria/core/provider/DuaStartupProvider.kt
  40. 1
      Queue/src/main/java/com/arialyy/aria/queue/AbsTaskQueue.java
  41. 1
      Queue/src/main/java/com/arialyy/aria/queue/BaseCachePool.java
  42. 1
      Queue/src/main/java/com/arialyy/aria/queue/BaseExecutePool.java
  43. 1
      Queue/src/main/java/com/arialyy/aria/queue/DTaskQueue.java
  44. 4
      Queue/src/main/java/com/arialyy/aria/queue/QueueComponent.kt
  45. 2
      settings.gradle

@ -28,7 +28,7 @@ dependencies {
implementation(libs.timber)
api project(path: ':AriaAnnotations')
api project(path: ':PublicComponent')
api project(path: ':HttpComponent')
api project(path: ':Http')
}
//apply from: 'bintray-release.gradle'

@ -30,7 +30,7 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(path: ':HttpComponent')
implementation project(path: ':Http')
implementation project(path: ':PublicComponent')
}

@ -18,7 +18,6 @@ package com.arialyy.aria.core
import android.annotation.SuppressLint
import android.content.Context
import com.arialyy.aria.core.service.LifecycleManager
import com.arialyy.aria.core.service.QueueManager
import com.arialyy.aria.core.service.ServiceManager
import kotlinx.coroutines.MainScope
@ -40,10 +39,7 @@ object DuaContext {
fun isService(serviceName: String) = serviceName in serviceArray
fun getServiceManager() = ServiceManager
fun getLifeManager() = LifecycleManager
fun getQueueManger() = QueueManager
}

@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.arialyy.aria.queue;
package com.arialyy.aria.core.inf;
import com.arialyy.aria.core.task.ITask;
import java.util.List;
@ -22,7 +22,7 @@ import java.util.List;
/**
* Created by lyy on 2016/8/14. 任务池
*/
interface IPool<T extends ITask> {
public interface IPool<T extends ITask> {
List<T> getAllTask();

@ -18,9 +18,11 @@ package com.arialyy.aria.core.provider
import android.content.Context
import androidx.startup.Initializer
import com.arialyy.aria.core.DuaContext
import com.arialyy.aria.core.inf.IComponentInit
import com.arialyy.aria.core.service.DbService
import timber.log.Timber
import timber.log.Timber.DebugTree
import java.util.ServiceLoader
class DuaStartupProvider : Initializer<Unit> {
@ -30,6 +32,17 @@ class DuaStartupProvider : Initializer<Unit> {
it.registerService(DuaContext.DB_SERVICE, DbService::class.java)
}
initLog()
initComponent(context)
}
/**
* init all component, [IComponentInit]
*/
private fun initComponent(context: Context) {
val sa = ServiceLoader.load(IComponentInit::class.java, javaClass.classLoader)
sa.forEach {
it.init(context)
}
}
private fun initLog() {

@ -17,6 +17,7 @@
package com.arialyy.aria.queue;
import com.arialyy.aria.core.inf.IEntity;
import com.arialyy.aria.core.inf.IPool;
import com.arialyy.aria.core.inf.ITaskQueue;
import com.arialyy.aria.core.inf.TaskSchedulerType;
import com.arialyy.aria.core.manager.ThreadTaskManager;

@ -16,6 +16,7 @@
package com.arialyy.aria.queue;
import com.arialyy.aria.core.inf.IPool;
import com.arialyy.aria.core.task.ITask;
import java.util.ArrayList;
import java.util.Deque;

@ -16,6 +16,7 @@
package com.arialyy.aria.queue;
import com.arialyy.aria.core.inf.IPool;
import com.arialyy.aria.core.inf.TaskSchedulerType;
import com.arialyy.aria.core.task.ITask;
import java.util.ArrayList;

@ -17,6 +17,7 @@
package com.arialyy.aria.queue;
import android.content.Context;
import androidx.annotation.NonNull;
import com.arialyy.aria.core.AriaConfig;
import com.arialyy.aria.core.task.DownloadTask;

@ -1,6 +1,7 @@
package com.arialyy.aria.queue
import android.content.Context
import com.arialyy.aria.core.DuaContext
import com.arialyy.aria.core.inf.IComponentInit
/**
@ -10,6 +11,7 @@ import com.arialyy.aria.core.inf.IComponentInit
**/
class QueueComponent : IComponentInit {
override fun init(context: Context) {
DuaContext.getServiceManager().registerService(DuaContext.D_QUEUE, DTaskQueue.getInstance())
DuaContext.getServiceManager().registerService(DuaContext.U_QUEUE, UTaskQueue.getInstance())
}
}

@ -34,7 +34,7 @@ dependencyResolutionManagement {
}
include ':app', ':Aria', ':AriaAnnotations', ':AriaCompiler', ':AppFrame', ':HttpComponent', ':M3U8Component', ':SFtpComponent',
include ':app', ':Aria', ':AriaAnnotations', ':AriaCompiler', ':AppFrame', ':Http', ':M3U8Component', ':SFtpComponent',
':FtpComponent', ':PublicComponent'
rootProject.name='Aria'
include ':Queue'

Loading…
Cancel
Save