Apt 下载事件完成

This commit is contained in:
AriaLyy
2017-06-07 20:15:05 +08:00
parent 8049af34e0
commit 603a21fe43
14 changed files with 261 additions and 197 deletions

View File

@ -21,36 +21,68 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Created by Aria.Lao on 2017/6/6.
* Created by lyy on 2017/6/6.
* Aria下载事件注解
*/
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) public @interface Upload {
/**
* 如果你在方法中添加{@code @Upload.onPre}注解在预处理完成时Aria会调用该方法
*/
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) public @interface onPre {
}
/**
* 如果你在方法中添加{@code @Upload.onTaskPre}注解在任务预处理完成时Aria会调用该方法
*/
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) public @interface onTaskPre {
}
/**
* 如果你在方法中添加{@code @Upload.onTaskResume}注解在任务恢复下载时Aria会调用该方法
*/
//@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) public @interface onTaskResume {
//}
/**
* 如果你在方法中添加{@code @Upload.onTaskStart}注解在任务开始下载时Aria会调用该方法
*/
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) public @interface onTaskStart {
}
/**
* 如果你在方法中添加{@code @Upload.onTaskStop}注解在任务停止时Aria会调用该方法
*/
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) public @interface onTaskStop {
}
/**
* 如果你在方法中添加{@code @Upload.onTaskCancel}l注解在任务取消时Aria会调用该方法
*/
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) public @interface onTaskCancel {
}
/**
* 如果你在方法中添加{@code @Upload.onTaskFail)注解在任务预失败时Aria会调用该方法
*/
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) public @interface onTaskFail {
}
/**
* 如果你在方法中添加{@code @Upload.onTaskComplete}注解在任务完成时Aria会调用该方法
*/
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) public @interface onTaskComplete {
}
/**
* 如果你在方法中添加{@code @Upload.onTaskRunning}注解在任务正在下载Aria会调用该方法
*/
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) public @interface onTaskRunning {
}
/**
* 如果你在方法中添加{@code @Upload.onNoSupportBreakPoint}注解如果该任务不支持断点Aria会调用该方法
*/
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD)
public @interface onNoSupportBreakPoint {
}