All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.wandersnail.common.http.TaskInfo Maven / Gradle / Ivy

There is a newer version: 2.2.1
Show newest version
package cn.wandersnail.common.http;

import java.util.UUID;

import cn.wandersnail.common.http.util.HttpUtils;

/**
 * 任务信息
 * 

* date: 2019/8/23 13:43 * author: zengfansheng */ public class TaskInfo { /** * 唯一标识 */ public final String tag; /** * 请求地址 */ public final String url; /** * 任务状态 */ public State state = State.IDLE; public TaskInfo(String url) { this(UUID.randomUUID().toString(), url); } /** * @param tag 唯一标识 * @param url 请求地址 */ public TaskInfo(String tag, String url) { this.tag = tag; this.url = url; } public String getBaseUrl() { return HttpUtils.getBaseUrl(url); } public void reset() { } public enum State { IDLE, START, ONGOING, COMPLETED, CANCEL, ERROR, PAUSE } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy