From c26250855f479911c544e3c903cebe89aaf6f9be Mon Sep 17 00:00:00 2001 From: noear Date: Sat, 2 Apr 2022 12:22:03 +0800 Subject: [PATCH] 1.6.36 --- UPDATE_LOG.md | 1 + .../cloud/model/{JobHandlerHolder.java => JobHolder.java} | 4 ++-- .../cloud/extend/water/integration/http/HandlerJob.java | 4 ++-- .../extend/water/service/CloudJobServiceWaterImp.java | 8 ++++---- .../cloud/extend/xxljob/service/CloudJobServiceImpl.java | 4 ++-- solon-parent/pom.xml | 2 +- 6 files changed, 12 insertions(+), 11 deletions(-) rename _extend/solon.cloud/src/main/java/org/noear/solon/cloud/model/{JobHandlerHolder.java => JobHolder.java} (86%) diff --git a/UPDATE_LOG.md b/UPDATE_LOG.md index f6b77a80c2..16a6409fee 100644 --- a/UPDATE_LOG.md +++ b/UPDATE_LOG.md @@ -3,6 +3,7 @@ * 插件 solon.extend.sessionstate.jwt 呼略 ServiceConfigurationError 抛出 * CloudJobHandler * CloudEventHandler +* HttpUtils 增加短处理和长处理的切换支持 #### 1.6.35 * 添加 SocketContext::SessionState 接口支持 diff --git a/_extend/solon.cloud/src/main/java/org/noear/solon/cloud/model/JobHandlerHolder.java b/_extend/solon.cloud/src/main/java/org/noear/solon/cloud/model/JobHolder.java similarity index 86% rename from _extend/solon.cloud/src/main/java/org/noear/solon/cloud/model/JobHandlerHolder.java rename to _extend/solon.cloud/src/main/java/org/noear/solon/cloud/model/JobHolder.java index 2cf466c441..853c9a4f76 100644 --- a/_extend/solon.cloud/src/main/java/org/noear/solon/cloud/model/JobHandlerHolder.java +++ b/_extend/solon.cloud/src/main/java/org/noear/solon/cloud/model/JobHolder.java @@ -9,13 +9,13 @@ * @author noear * @since 1.4 */ -public class JobHandlerHolder implements Handler { +public class JobHolder implements Handler { private final String name; private final String cron7x; private final String description; private final Handler handler; - public JobHandlerHolder(String name, String cron7x, String description, Handler handler) { + public JobHolder(String name, String cron7x, String description, Handler handler) { this.name = name; this.cron7x = cron7x; this.description = description; diff --git a/_plugin_cloud/water-solon-plugin/src/main/java/org/noear/solon/cloud/extend/water/integration/http/HandlerJob.java b/_plugin_cloud/water-solon-plugin/src/main/java/org/noear/solon/cloud/extend/water/integration/http/HandlerJob.java index 161e8d0195..558c55df05 100644 --- a/_plugin_cloud/water-solon-plugin/src/main/java/org/noear/solon/cloud/extend/water/integration/http/HandlerJob.java +++ b/_plugin_cloud/water-solon-plugin/src/main/java/org/noear/solon/cloud/extend/water/integration/http/HandlerJob.java @@ -4,7 +4,7 @@ import org.noear.solon.cloud.CloudClient; import org.noear.solon.cloud.extend.water.WaterProps; import org.noear.solon.cloud.extend.water.service.CloudJobServiceWaterImp; -import org.noear.solon.cloud.model.JobHandlerHolder; +import org.noear.solon.cloud.model.JobHolder; import org.noear.solon.core.event.EventBus; import org.noear.solon.core.handle.Context; import org.noear.solon.core.handle.Handler; @@ -36,7 +36,7 @@ public void handle(Context ctx) throws Throwable { } private void handleDo(Context ctx, String name) { - JobHandlerHolder handlerHolder = CloudJobServiceWaterImp.instance.get(name); + JobHolder handlerHolder = CloudJobServiceWaterImp.instance.get(name); if (handlerHolder == null) { ctx.status(400); diff --git a/_plugin_cloud/water-solon-plugin/src/main/java/org/noear/solon/cloud/extend/water/service/CloudJobServiceWaterImp.java b/_plugin_cloud/water-solon-plugin/src/main/java/org/noear/solon/cloud/extend/water/service/CloudJobServiceWaterImp.java index 61424c0f63..c5febc2756 100644 --- a/_plugin_cloud/water-solon-plugin/src/main/java/org/noear/solon/cloud/extend/water/service/CloudJobServiceWaterImp.java +++ b/_plugin_cloud/water-solon-plugin/src/main/java/org/noear/solon/cloud/extend/water/service/CloudJobServiceWaterImp.java @@ -1,7 +1,7 @@ package org.noear.solon.cloud.extend.water.service; import org.noear.solon.Solon; -import org.noear.solon.cloud.model.JobHandlerHolder; +import org.noear.solon.cloud.model.JobHolder; import org.noear.solon.cloud.service.CloudJobService; import org.noear.solon.core.handle.Handler; import org.noear.solon.core.util.PrintUtil; @@ -24,9 +24,9 @@ public class CloudJobServiceWaterImp implements CloudJobService { public static final CloudJobServiceWaterImp instance = new CloudJobServiceWaterImp(); - public Map jobMap = new LinkedHashMap<>(); + public Map jobMap = new LinkedHashMap<>(); - public JobHandlerHolder get(String name) { + public JobHolder get(String name) { return jobMap.get(name); } @@ -49,7 +49,7 @@ public void push() { @Override public boolean register(String name, String cron7x, String description, Handler handler) { - JobHandlerHolder handlerHolder = new JobHandlerHolder(name, cron7x, description, handler); + JobHolder handlerHolder = new JobHolder(name, cron7x, description, handler); jobMap.put(name, handlerHolder); TagsMDC.tag0("CloudJob"); diff --git a/_plugin_cloud/xxl-job-solon-plugin/src/main/java/org/noear/solon/cloud/extend/xxljob/service/CloudJobServiceImpl.java b/_plugin_cloud/xxl-job-solon-plugin/src/main/java/org/noear/solon/cloud/extend/xxljob/service/CloudJobServiceImpl.java index 0400fc95a5..3bbd038202 100644 --- a/_plugin_cloud/xxl-job-solon-plugin/src/main/java/org/noear/solon/cloud/extend/xxljob/service/CloudJobServiceImpl.java +++ b/_plugin_cloud/xxl-job-solon-plugin/src/main/java/org/noear/solon/cloud/extend/xxljob/service/CloudJobServiceImpl.java @@ -1,7 +1,7 @@ package org.noear.solon.cloud.extend.xxljob.service; import com.xxl.job.core.executor.XxlJobExecutor; -import org.noear.solon.cloud.model.JobHandlerHolder; +import org.noear.solon.cloud.model.JobHolder; import org.noear.solon.cloud.service.CloudJobService; import org.noear.solon.core.handle.Handler; @@ -14,7 +14,7 @@ public class CloudJobServiceImpl implements CloudJobService { @Override public boolean register(String name, String cron7x, String description, Handler handler) { - JobHandlerHolder handlerHolder = new JobHandlerHolder(name, cron7x, description, handler); + JobHolder handlerHolder = new JobHolder(name, cron7x, description, handler); XxlJobExecutor.registJobHandler(name, new CloudJobHanderProxy(handlerHolder)); return true; diff --git a/solon-parent/pom.xml b/solon-parent/pom.xml index 26342d378a..87a6213bff 100644 --- a/solon-parent/pom.xml +++ b/solon-parent/pom.xml @@ -23,7 +23,7 @@ 3.2.16 3.4.19 2.5.9 - 1.1.14 + 1.1.15 1.3.6 1.2.75