修复重构loader后,http上传失败的问题

This commit is contained in:
laoyuyu
2020-01-08 19:42:16 +08:00
parent 432ae1c145
commit 7c4012c021
28 changed files with 255 additions and 106 deletions

View File

@@ -98,7 +98,8 @@ public class ComponentUtil {
*
* @return 返回下载工具创建失败返回null
*/
public <T extends IUtil> T buildUtil(AbsTaskWrapper wrapper, IEventListener listener) {
public synchronized <T extends IUtil> T buildUtil(AbsTaskWrapper wrapper,
IEventListener listener) {
int requestType = wrapper.getRequestType();
String className = null;
switch (requestType) {
@@ -158,7 +159,7 @@ public class ComponentUtil {
* @param wrapperType 任务类型{@link ITaskWrapper}
* @return 返回事件监听如果创建失败返回null
*/
public <T extends IEventListener> T buildListener(int wrapperType, AbsTask task,
public synchronized <T extends IEventListener> T buildListener(int wrapperType, AbsTask task,
Handler outHandler) {
String className = null, errorStr = "请添加FTP插件";
switch (wrapperType) {
@@ -211,7 +212,8 @@ public class ComponentUtil {
* @param params 任务配置信息参数
* @return 构建失败返回null
*/
public <T extends ITaskOption> T buildTaskOption(Class<T> clazz, TaskOptionParams params) {
public synchronized <T extends ITaskOption> T buildTaskOption(Class<T> clazz,
TaskOptionParams params) {
List<Field> fields = CommonUtil.getAllFields(clazz);
T taskOption = null;
try {