From b2c6dd2db2a6f77760b44e20b07d29bfbb57098e Mon Sep 17 00:00:00 2001 From: Redkale <22250530@qq.com> Date: Mon, 10 Oct 2016 19:19:56 +0800 Subject: [PATCH] --- src/org/redkale/net/sncp/SncpClient.java | 10 +++++----- src/org/redkale/net/sncp/SncpDynServlet.java | 10 +++++----- src/org/redkale/service/DataSourceService.java | 2 +- src/org/redkale/service/{DynCall.java => RpcCall.java} | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) rename src/org/redkale/service/{DynCall.java => RpcCall.java} (86%) diff --git a/src/org/redkale/net/sncp/SncpClient.java b/src/org/redkale/net/sncp/SncpClient.java index c926c5baa..5b5515cef 100644 --- a/src/org/redkale/net/sncp/SncpClient.java +++ b/src/org/redkale/net/sncp/SncpClient.java @@ -20,7 +20,7 @@ import org.redkale.net.*; import static org.redkale.net.sncp.SncpRequest.*; import org.redkale.service.*; import org.redkale.util.*; -import org.redkale.service.DynCall; +import org.redkale.service.RpcCall; /** * @@ -41,7 +41,7 @@ public final class SncpClient { protected final Type[] paramTypes; - protected final Attribute[] paramAttrs; // 为null表示无DynCall处理,index=0固定为null, 其他为参数标记的DynCall回调方法 + protected final Attribute[] paramAttrs; // 为null表示无RpcCall处理,index=0固定为null, 其他为参数标记的RpcCall回调方法 protected final int addressTargetParamIndex; @@ -76,12 +76,12 @@ public final class SncpClient { } } for (Annotation ann : anns[i]) { - if (ann.annotationType() == DynCall.class) { + if (ann.annotationType() == RpcCall.class) { try { - atts[i + 1] = ((DynCall) ann).value().newInstance(); + atts[i + 1] = ((RpcCall) ann).value().newInstance(); hasattr = true; } catch (Exception e) { - logger.log(Level.SEVERE, DynCall.class.getSimpleName() + ".attribute cannot a newInstance for" + method, e); + logger.log(Level.SEVERE, RpcCall.class.getSimpleName() + ".attribute cannot a newInstance for" + method, e); } break; } diff --git a/src/org/redkale/net/sncp/SncpDynServlet.java b/src/org/redkale/net/sncp/SncpDynServlet.java index caad5eb89..7cdcf382d 100644 --- a/src/org/redkale/net/sncp/SncpDynServlet.java +++ b/src/org/redkale/net/sncp/SncpDynServlet.java @@ -21,7 +21,7 @@ import jdk.internal.org.objectweb.asm.Type; import org.redkale.convert.bson.*; import org.redkale.service.*; import org.redkale.util.*; -import org.redkale.service.DynCall; +import org.redkale.service.RpcCall; /** * @@ -141,7 +141,7 @@ public final class SncpDynServlet extends SncpServlet { @Resource protected BsonConvert convert; - protected org.redkale.util.Attribute[] paramAttrs; // 为null表示无DynCall处理,index=0固定为null, 其他为参数标记的DynCall回调方法 + protected org.redkale.util.Attribute[] paramAttrs; // 为null表示无RpcCall处理,index=0固定为null, 其他为参数标记的RpcCall回调方法 protected java.lang.reflect.Type[] paramTypes; //index=0表示返回参数的type, void的返回参数类型为null @@ -405,12 +405,12 @@ public final class SncpDynServlet extends SncpServlet { for (int i = 0; i < anns.length; i++) { if (anns[i].length > 0) { for (Annotation ann : anns[i]) { - if (ann.annotationType() == DynCall.class) { + if (ann.annotationType() == RpcCall.class) { try { - atts[i + 1] = ((DynCall) ann).value().newInstance(); + atts[i + 1] = ((RpcCall) ann).value().newInstance(); hasattr = true; } catch (Exception e) { - logger.log(Level.SEVERE, DynCall.class.getSimpleName() + ".attribute cannot a newInstance for" + method, e); + logger.log(Level.SEVERE, RpcCall.class.getSimpleName() + ".attribute cannot a newInstance for" + method, e); } break; } diff --git a/src/org/redkale/service/DataSourceService.java b/src/org/redkale/service/DataSourceService.java index 6e47e1e7a..bd8794484 100644 --- a/src/org/redkale/service/DataSourceService.java +++ b/src/org/redkale/service/DataSourceService.java @@ -29,7 +29,7 @@ public class DataSourceService implements DataSource, Service, AutoCloseable { private DataSource source; @Override - public void insert(@DynCall(DataCallArrayAttribute.class) T... values) { + public void insert(@RpcCall(DataCallArrayAttribute.class) T... values) { source.insert(values); } diff --git a/src/org/redkale/service/DynCall.java b/src/org/redkale/service/RpcCall.java similarity index 86% rename from src/org/redkale/service/DynCall.java rename to src/org/redkale/service/RpcCall.java index 3697a4e75..69c302cde 100644 --- a/src/org/redkale/service/DynCall.java +++ b/src/org/redkale/service/RpcCall.java @@ -10,7 +10,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; import org.redkale.util.*; /** - * 参数回写, 当Service的方法需要更改参数对象内部的数据时,需要使用DynCall + * 参数回写, 当Service的方法需要更改参数对象内部的数据时,需要使用RpcCall * *

详情见: http://redkale.org * @author zhangjx @@ -19,7 +19,7 @@ import org.redkale.util.*; @Documented @Target({ElementType.PARAMETER}) @Retention(RUNTIME) -public @interface DynCall { +public @interface RpcCall { Class value(); }