添加获取扩展字段的方法

pull/330/head
AriaLyy 8 years ago
parent cd9497aadf
commit 8f9e15e505
  1. 14
      Aria/src/main/java/com/arialyy/aria/core/inf/AbsTarget.java
  2. 67
      aria/src/main/java/com/arialyy/aria/core/scheduler/AbsSchedulerListener.java
  3. 2
      build.gradle

@ -48,6 +48,14 @@ public abstract class AbsTarget<ENTITY extends AbsEntity, TASK_ENTITY extends Ab
return this;
}
/**
* 获取存放的扩展字段
* 设置扩展字段{@link #setExtendField(String)}
*/
public String getExtendField() {
return entity.getStr();
}
/**
* 获取任务状态
*
@ -87,11 +95,7 @@ public abstract class AbsTarget<ENTITY extends AbsEntity, TASK_ENTITY extends Ab
* 删除记录
*/
public void removeRecord() {
if (entity instanceof DownloadEntity) {
((DownloadEntity) entity).deleteData();
} else if (entity instanceof UploadEntity) {
((UploadEntity) entity).deleteData();
}
entity.deleteData();
}
/**

@ -1,67 +0,0 @@
/*
* 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.aria.core.scheduler;
import com.arialyy.aria.core.inf.ITask;
/**
* Created by Aria.Lao on 2017/6/7.
*/
public class AbsSchedulerListener<TASK extends ITask> implements ISchedulerListener<TASK> {
@Override public void onPre(TASK task) {
}
@Override public void onTaskPre(TASK task) {
}
@Override public void onTaskResume(TASK task) {
}
@Override public void onTaskStart(TASK task) {
}
@Override public void onTaskStop(TASK task) {
}
@Override public void onTaskCancel(TASK task) {
}
@Override public void onTaskFail(TASK task) {
}
@Override public void onTaskComplete(TASK task) {
}
@Override public void onTaskRunning(TASK task) {
}
public void onNoSupportBreakPoint(TASK task) {
}
public void setListener(Object obj) {
}
}

@ -37,7 +37,7 @@ ext {
userOrg = 'arialyy'
groupId = 'com.arialyy.aria'
// publishVersion = '0.0.6'
publishVersion = '3.1.7'
publishVersion = '3.1.8'
repoName='maven'
desc = 'android 下载框架'
website = 'https://github.com/AriaLyy/Aria'

Loading…
Cancel
Save