源代码备份
This commit is contained in:
1
AriaAnnotations/.gitignore
vendored
Normal file
1
AriaAnnotations/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/build
|
13
AriaAnnotations/bintray-release.gradle
Normal file
13
AriaAnnotations/bintray-release.gradle
Normal file
@ -0,0 +1,13 @@
|
||||
apply plugin: 'com.novoda.bintray-release'
|
||||
publish {
|
||||
// artifactId = 'aria-annotations'
|
||||
// uploadName = 'AriaAnnotations'
|
||||
artifactId = 'annotations'
|
||||
uploadName = 'Annotations'
|
||||
userOrg = rootProject.ext.userOrg
|
||||
groupId = rootProject.ext.groupId
|
||||
publishVersion = rootProject.ext.publishVersion
|
||||
desc = rootProject.ext.desc
|
||||
website = rootProject.ext.website
|
||||
licences = rootProject.ext.licences
|
||||
}
|
19
AriaAnnotations/build.gradle
Normal file
19
AriaAnnotations/build.gradle
Normal file
@ -0,0 +1,19 @@
|
||||
apply plugin: 'java'
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
options.encoding = "UTF-8"
|
||||
}
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_1_7
|
||||
targetCompatibility = JavaVersion.VERSION_1_7
|
||||
|
||||
dependencies {
|
||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
||||
}
|
||||
|
||||
//apply from: 'bintray-release.gradle'
|
||||
|
||||
ext{
|
||||
PUBLISH_ARTIFACT_ID = 'annotations'
|
||||
}
|
||||
apply from: '../gradle/mavenCentral-release.gradle'
|
@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright (C) 2016 AriaLyy(https://github.com/AriaLyy/Aria)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.arialyy.annotations;
|
||||
|
||||
/**
|
||||
* Created by AriaL on 2017/6/14.
|
||||
*/
|
||||
|
||||
public interface AriaConstance {
|
||||
String NO_URL = "";
|
||||
|
||||
/**
|
||||
* 注解方法为普通任务下载
|
||||
*/
|
||||
int DOWNLOAD = 0xa1;
|
||||
|
||||
/**
|
||||
* 注解方法为任务组下载
|
||||
*/
|
||||
int DOWNLOAD_GROUP = 0xa2;
|
||||
|
||||
/**
|
||||
* 注解方法为普通任务上传
|
||||
*/
|
||||
int UPLOAD = 0xb1;
|
||||
|
||||
/**
|
||||
* 注解方法为任务组上传
|
||||
*/
|
||||
int UPLOAD_GROUP = 0xb2;
|
||||
}
|
||||
|
@ -0,0 +1,116 @@
|
||||
/*
|
||||
* Copyright (C) 2016 AriaLyy(https://github.com/AriaLyy/Aria)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.arialyy.annotations;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Created by lyy on 2017/6/6.
|
||||
* Aria下载事件被注解的方法中,参数仅能有一个,参数类型为 com.arialyy.aria.core.download.DownloadTask
|
||||
* <pre>
|
||||
* <code>
|
||||
* {@literal @}Download.onPre
|
||||
* protected void onPre(DownloadTask task) {
|
||||
* mUpdateHandler.obtainMessage(DOWNLOAD_PRE, task.getDownloadEntity().getFileSize()).sendToTarget();
|
||||
* }
|
||||
* </code>
|
||||
* </pre>
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) public @interface Download {
|
||||
|
||||
/**
|
||||
* "@Download.onPre"注解,下载队列已经满了,继续创建新任务,将会回调该方法
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onWait {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* "@Download.onPre"注解,在预处理完成时,Aria会调用该方法
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onPre {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* "@Download.onTaskPre"注解,在任务预处理完成时,Aria会调用该方法
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onTaskPre {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* "@Download.onTaskResume"注解,在任务恢复下载时,Aria会调用该方法
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onTaskResume {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* "@Download.onTaskStart"注解,在任务开始下载时,Aria会调用该方法
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onTaskStart {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* "@Download.onTaskStop"注解,在任务停止时,Aria会调用该方法
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onTaskStop {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* "@Download.onTaskCancel}l注解,在任务取消时,Aria会调用该方法
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onTaskCancel {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* "@Download.onTaskFail)注解,在任务预失败时,Aria会调用该方法
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onTaskFail {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* "@Download.onTaskComplete"注解,在任务完成时,Aria会调用该方法
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onTaskComplete {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* "@Download.onTaskRunning"注解,在任务正在下载,Aria会调用该方法
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onTaskRunning {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* "@Download.onNoSupportBreakPoint"注解,如果该任务不支持断点,Aria会调用该方法
|
||||
*
|
||||
* @deprecated 该注解将在后续版本删除
|
||||
*/
|
||||
@Deprecated
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onNoSupportBreakPoint {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
}
|
@ -0,0 +1,163 @@
|
||||
/*
|
||||
* Copyright (C) 2016 AriaLyy(https://github.com/AriaLyy/Aria)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.arialyy.annotations;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Created by lyy on 2017/6/6.
|
||||
* Aria下载事件被注解的方法中,参数仅能有一个,参数类型为 com.arialyy.aria.core.download.DownloadGroupTask
|
||||
* <pre>
|
||||
* <code>
|
||||
* {@literal @}DownloadGroup.onPre(groupHash)
|
||||
* protected void onPre(DownloadGroupTask task) {
|
||||
* }
|
||||
* </code>
|
||||
* </pre>
|
||||
*
|
||||
* 如果希望获取子任务的状态,可以使用onSub..类的注解
|
||||
* <pre>
|
||||
* <code>
|
||||
* {@literal @}DownloadGroup.onSubPre(groupHash)
|
||||
* protected void onPre(DownloadGroupTask task, String url) {
|
||||
* }
|
||||
* </code>
|
||||
* </pre>
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) public @interface DownloadGroup {
|
||||
|
||||
/**
|
||||
* " @Download.onPre"解,队列已经满了,继续创建新任务,将会回调该方法
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onWait {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* " @DownloadGroup.onPre"解,在预处理完成时,Aria会调用该方法
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onPre {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* " @DownloadGroup.onTaskPre"解,在任务预处理完成时,Aria会调用该方法
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onTaskPre {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* " @DownloadGroup.onTaskResume"解,在任务恢复下载时,Aria会调用该方法
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onTaskResume {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* " @DownloadGroup.onTaskStart"解,在任务开始下载时,Aria会调用该方法
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onTaskStart {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* " @DownloadGroup.onTaskStop"解,在任务停止时,Aria会调用该方法
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onTaskStop {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* " @DownloadGroup.onTaskCancel}l注解,在任务取消时,Aria会调用该方法
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onTaskCancel {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* " @DownloadGroup.onTaskFail)注解,在任务预失败时,Aria会调用该方法
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onTaskFail {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* " @DownloadGroup.onTaskComplete"解,在任务完成时,Aria会调用该方法
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onTaskComplete {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* " @DownloadGroup.onTaskRunning"解,在任务正在下载,Aria会调用该方法
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onTaskRunning {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务组子任务预处理的注解
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onSubTaskPre {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务组子任务开始的注解
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onSubTaskStart {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务组子任务停止的注解
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onSubTaskStop {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务组子任务删除的注解
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onSubTaskCancel {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务组子任务失败的注解
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onSubTaskFail {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务组子任务完成的注解
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onSubTaskComplete {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务组子任务正在执行的注解
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onSubTaskRunning {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright (C) 2016 AriaLyy(https://github.com/AriaLyy/Aria)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.arialyy.annotations;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Created by lyy on 2019/6/25.
|
||||
* M3U8 切片事件
|
||||
* <pre>
|
||||
* <code>
|
||||
* {@literal @}M3U8.onPeerStart
|
||||
* protected void onPeerStart(String m3u8Url, String peerPath, int peerIndex) {
|
||||
* ...
|
||||
* }
|
||||
* </code>
|
||||
* </pre>
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) public @interface M3U8 {
|
||||
|
||||
/**
|
||||
* "@M3U8.onPeerStart"注解,切片开始下载
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onPeerStart {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* "@M3U8.onPeerFail注解,切片下载失败
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onPeerFail {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* "@M3U8.onPeersComplete"注解,切片下载完成
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onPeerComplete {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright (C) 2016 AriaLyy(https://github.com/AriaLyy/Aria)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.arialyy.annotations;
|
||||
|
||||
/**
|
||||
* Created by lyy on 2017/7/10.
|
||||
* 任务类型枚举
|
||||
*/
|
||||
public enum TaskEnum {
|
||||
DOWNLOAD("com.arialyy.aria.core.task", "DownloadTask", "$$DownloadListenerProxy",
|
||||
"AptNormalTaskListener"),
|
||||
DOWNLOAD_GROUP("com.arialyy.aria.core.task", "DownloadGroupTask",
|
||||
"$$DownloadGroupListenerProxy", "AptNormalTaskListener"),
|
||||
DOWNLOAD_GROUP_SUB("com.arialyy.aria.core.task", "DownloadGroupTask",
|
||||
"$$DGSubListenerProxy", "AptSubTaskListener"),
|
||||
UPLOAD("com.arialyy.aria.core.task", "UploadTask", "$$UploadListenerProxy",
|
||||
"AptNormalTaskListener"),
|
||||
M3U8_PEER("com.arialyy.aria.core.task", "DownloadTask", "$$M3U8PeerListenerProxy",
|
||||
"AptM3U8PeerTaskListener");
|
||||
|
||||
public String pkg, className, proxySuffix, proxySuperClass;
|
||||
|
||||
/**
|
||||
* @param pkg 包名
|
||||
* @param className 对应到任务类名
|
||||
* @param proxySuffix 事件代理后缀
|
||||
* @param proxySuperClass 代理类的父类
|
||||
*/
|
||||
TaskEnum(String pkg, String className, String proxySuffix, String proxySuperClass) {
|
||||
this.pkg = pkg;
|
||||
this.className = className;
|
||||
this.proxySuffix = proxySuffix;
|
||||
this.proxySuperClass = proxySuperClass;
|
||||
}
|
||||
}
|
@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Copyright (C) 2016 AriaLyy(https://github.com/AriaLyy/Aria)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.arialyy.annotations;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Created by lyy on 2017/6/6.
|
||||
* Aria下载事件被注解的方法中,参数仅能有一个,参数类型为com.arialyy.aria.core.upload.UploadTask
|
||||
* <pre>
|
||||
* <code>
|
||||
* {@literal @}Upload.onPre
|
||||
* protected void onPre(UploadTask task) {
|
||||
* L.d(TAG, "fileSize = " + task.getConvertFileSize());
|
||||
* }
|
||||
* </code>
|
||||
* </pre>
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) public @interface Upload {
|
||||
|
||||
/**
|
||||
* "@Upload.onWait" 注解,队列已经满了,继续创建新任务,将会回调该方法
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onWait {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* "@Upload.onPre"注解,在预处理完成时,Aria会调用该方法
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onPre {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* "@Upload.onTaskResume"注解,在任务恢复下载时,Aria会调用该方法
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onTaskResume {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* "@Upload.onTaskStart"注解,在任务开始下载时,Aria会调用该方法
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onTaskStart {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* "@Upload.onTaskStop"注解,在任务停止时,Aria会调用该方法
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onTaskStop {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* "@Upload.onTaskCancel"注解,在任务取消时,Aria会调用该方法
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onTaskCancel {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* "@Upload.onTaskFail"注解,在任务预失败时,Aria会调用该方法
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onTaskFail {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* "@Upload.onTaskComplete"注解,在任务完成时,Aria会调用该方法
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onTaskComplete {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* "@Upload.onTaskRunning"注解,在任务正在下载,Aria会调用该方法
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onTaskRunning {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
|
||||
/**
|
||||
* "@Upload.onNoSupportBreakPoint"注解,如果该任务不支持断点,Aria会调用该方法
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) @interface onNoSupportBreakPoint {
|
||||
String[] value() default { AriaConstance.NO_URL };
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user