This is an automated email from the ASF dual-hosted git repository.
yui pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-shenyu.git
The following commit(s) were added to refs/heads/master by this push:
new 841fc73 remove lombok in client module (#1890)
841fc73 is described below
commit 841fc733d473f5ac4003ebd338fc70461d4f1ebf
Author: Kunshuai Zhu <[email protected]>
AuthorDate: Sat Aug 7 07:27:29 2021 -0500
remove lombok in client module (#1890)
---
.../core/shutdown/ShenyuClientShutdownHook.java | 36 ++-
.../dubbo/AlibabaDubboServiceBeanListener.java | 2 -
.../validation/AlibabaDubboClientValidator.java | 12 +-
.../validation/mock/MockValidationParameter.java | 24 +-
.../dubbo/ApacheDubboServiceBeanListener.java | 2 -
.../validation/ApacheDubboClientValidator.java | 13 +-
.../validation/ApacheDubboClientValidatorTest.java | 2 +-
.../dubbo/validation/service/TestService.java | 65 ++++-
.../client/dubbo/common/dto/DubboRpcExt.java | 265 ++++++++++++++++++++-
.../client/grpc/GrpcClientBeanPostProcessor.java | 25 +-
.../shenyu/client/grpc/common/dto/GrpcExt.java | 158 +++++++++++-
.../client/grpc/json/JsonForwardingServerCall.java | 10 +-
.../client/grpc/json/JsonServerCallListener.java | 8 +-
.../grpc/json/JsonServerServiceInterceptor.java | 2 -
.../client/grpc/server/GrpcServerRunner.java | 16 +-
.../springcloud/init/ContextRegisterListener.java | 8 +-
.../init/SpringCloudClientBeanPostProcessor.java | 8 +-
.../springmvc/init/ContextRegisterListener.java | 8 +-
.../init/SpringMvcClientBeanPostProcessor.java | 8 +-
.../motan/MotanServiceBeanPostProcessor.java | 11 +-
.../client/motan/common/dto/MotanRpcExt.java | 127 +++++++++-
.../client/sofa/SofaServiceBeanPostProcessor.java | 10 +-
.../shenyu/client/sofa/common/dto/SofaRpcExt.java | 159 ++++++++++++-
.../client/tars/TarsServiceBeanPostProcessor.java | 11 +-
.../shenyu/client/tars/common/dto/TarsRpcExt.java | 133 ++++++++++-
25 files changed, 1000 insertions(+), 123 deletions(-)
diff --git
a/shenyu-client/shenyu-client-core/src/main/java/org/apache/shenyu/client/core/shutdown/ShenyuClientShutdownHook.java
b/shenyu-client/shenyu-client-core/src/main/java/org/apache/shenyu/client/core/shutdown/ShenyuClientShutdownHook.java
index 2423c9f..94b5c87 100644
---
a/shenyu-client/shenyu-client-core/src/main/java/org/apache/shenyu/client/core/shutdown/ShenyuClientShutdownHook.java
+++
b/shenyu-client/shenyu-client-core/src/main/java/org/apache/shenyu/client/core/shutdown/ShenyuClientShutdownHook.java
@@ -17,13 +17,14 @@
package org.apache.shenyu.client.core.shutdown;
-import lombok.SneakyThrows;
-import lombok.extern.slf4j.Slf4j;
import org.apache.shenyu.register.client.api.ShenyuClientRegisterRepository;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.lang.reflect.Field;
import java.util.IdentityHashMap;
import java.util.Iterator;
+import java.util.Objects;
import java.util.Properties;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -32,9 +33,10 @@ import java.util.concurrent.atomic.AtomicInteger;
/**
* Shenyu client shutdown hook.
*/
-@Slf4j
public class ShenyuClientShutdownHook {
+ private static final Logger LOG =
LoggerFactory.getLogger(ShenyuClientShutdownHook.class);
+
private static String hookNamePrefix = "ShenyuClientShutdownHook";
private static AtomicInteger hookId = new AtomicInteger(0);
@@ -58,7 +60,7 @@ public class ShenyuClientShutdownHook {
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
result.close();
}, name));
- log.info("Add hook {}", name);
+ LOG.info("Add hook {}", name);
ShenyuClientShutdownHook.props = props;
}
@@ -77,18 +79,22 @@ public class ShenyuClientShutdownHook {
* Delay other shutdown hooks thread.
*/
private static class TakeoverOtherHooksThread extends Thread {
- @SneakyThrows
@Override
public void run() {
int shutdownWaitTime =
Integer.parseInt(props.getProperty("shutdownWaitTime", "3000"));
int delayOtherHooksExecTime =
Integer.parseInt(props.getProperty("delayOtherHooksExecTime", "2000"));
- Class<?> clazz =
Class.forName(props.getProperty("applicationShutdownHooksClassName",
"java.lang.ApplicationShutdownHooks"));
- Field field =
clazz.getDeclaredField(props.getProperty("applicationShutdownHooksFieldName",
"hooks"));
- field.setAccessible(true);
- IdentityHashMap<Thread, Thread> hooks = (IdentityHashMap<Thread,
Thread>) field.get(clazz);
+ IdentityHashMap<Thread, Thread> hooks = null;
+ try {
+ Class<?> clazz =
Class.forName(props.getProperty("applicationShutdownHooksClassName",
"java.lang.ApplicationShutdownHooks"));
+ Field field =
clazz.getDeclaredField(props.getProperty("applicationShutdownHooksFieldName",
"hooks"));
+ field.setAccessible(true);
+ hooks = (IdentityHashMap<Thread, Thread>) field.get(clazz);
+ } catch (ClassNotFoundException | NoSuchFieldException |
IllegalAccessException ex) {
+ LOG.error(ex.getMessage(), ex);
+ }
long s = System.currentTimeMillis();
while (System.currentTimeMillis() - s < delayOtherHooksExecTime) {
- for (Iterator<Thread> iterator = hooks.keySet().iterator();
iterator.hasNext();) {
+ for (Iterator<Thread> iterator =
Objects.requireNonNull(hooks).keySet().iterator(); iterator.hasNext();) {
Thread hook = iterator.next();
if (hook.getName().startsWith(hookNamePrefix)) {
continue;
@@ -97,7 +103,7 @@ public class ShenyuClientShutdownHook {
continue;
}
Thread delayHook = new Thread(() -> {
- log.info("sleep {}ms", shutdownWaitTime);
+ LOG.info("sleep {}ms", shutdownWaitTime);
try {
TimeUnit.MILLISECONDS.sleep(shutdownWaitTime);
} catch (InterruptedException ignore) { }
@@ -112,9 +118,13 @@ public class ShenyuClientShutdownHook {
Runtime.getRuntime().addShutdownHook(delayHook);
delayedHooks.put(delayHook, delayHook);
iterator.remove();
- log.info("hook {} will sleep {}ms when it start",
delayHook.getName(), shutdownWaitTime);
+ LOG.info("hook {} will sleep {}ms when it start",
delayHook.getName(), shutdownWaitTime);
+ }
+ try {
+ TimeUnit.MILLISECONDS.sleep(100);
+ } catch (InterruptedException ex) {
+ LOG.error(ex.getMessage(), ex);
}
- TimeUnit.MILLISECONDS.sleep(100);
}
hookNamePrefix = null;
diff --git
a/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/main/java/org/apache/shenyu/client/alibaba/dubbo/AlibabaDubboServiceBeanListener.java
b/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/main/java/org/apache/shenyu/client/alibaba/dubbo/AlibabaDubboServiceBeanListener.java
index eab0691..2e61abc 100644
---
a/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/main/java/org/apache/shenyu/client/alibaba/dubbo/AlibabaDubboServiceBeanListener.java
+++
b/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/main/java/org/apache/shenyu/client/alibaba/dubbo/AlibabaDubboServiceBeanListener.java
@@ -21,7 +21,6 @@ import com.alibaba.dubbo.common.Constants;
import com.alibaba.dubbo.common.utils.StringUtils;
import com.alibaba.dubbo.config.spring.ServiceBean;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
-import lombok.extern.slf4j.Slf4j;
import
org.apache.shenyu.client.core.disruptor.ShenyuClientRegisterEventPublisher;
import org.apache.shenyu.client.dubbo.common.annotation.ShenyuDubboClient;
import org.apache.shenyu.client.dubbo.common.dto.DubboRpcExt;
@@ -48,7 +47,6 @@ import java.util.stream.Collectors;
/**
* The Alibaba Dubbo ServiceBean Listener.
*/
-@Slf4j
@SuppressWarnings("all")
public class AlibabaDubboServiceBeanListener implements
ApplicationListener<ContextRefreshedEvent> {
diff --git
a/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/main/java/org/apache/shenyu/client/alibaba/dubbo/validation/AlibabaDubboClientValidator.java
b/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/main/java/org/apache/shenyu/client/alibaba/dubbo/validation/AlibabaDubboClientValidator.java
index 8bd32ea..457623a 100644
---
a/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/main/java/org/apache/shenyu/client/alibaba/dubbo/validation/AlibabaDubboClientValidator.java
+++
b/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/main/java/org/apache/shenyu/client/alibaba/dubbo/validation/AlibabaDubboClientValidator.java
@@ -44,7 +44,8 @@ import javassist.bytecode.annotation.LongMemberValue;
import javassist.bytecode.annotation.MemberValue;
import javassist.bytecode.annotation.ShortMemberValue;
import javassist.bytecode.annotation.StringMemberValue;
-import lombok.extern.slf4j.Slf4j;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import javax.validation.Constraint;
import javax.validation.ConstraintViolation;
@@ -68,9 +69,10 @@ import java.util.Set;
/**
* The type Alibaba dubbo client validator.
*/
-@Slf4j
public class AlibabaDubboClientValidator implements Validator {
+ private static final Logger LOG =
LoggerFactory.getLogger(AlibabaDubboClientValidator.class);
+
private final Class<?> clazz;
private final javax.validation.Validator validator;
@@ -161,7 +163,7 @@ public class AlibabaDubboClientValidator implements
Validator {
}
return parameterBean;
} catch (Exception e) {
- log.warn(e.getMessage(), e);
+ LOG.warn(e.getMessage(), e);
return null;
}
}
@@ -244,7 +246,7 @@ public class AlibabaDubboClientValidator implements
Validator {
Class<?> methodClass = Class.forName(methodClassName, false,
Thread.currentThread().getContextClassLoader());
groups.add(methodClass);
} catch (ClassNotFoundException e) {
- log.error(e.getMessage(), e);
+ LOG.error(e.getMessage(), e);
}
Set<ConstraintViolation<?>> violations = new HashSet<>();
Method method = clazz.getMethod(methodName, parameterTypes);
@@ -269,7 +271,7 @@ public class AlibabaDubboClientValidator implements
Validator {
}
if (!violations.isEmpty()) {
- log.error("Failed to validate service: " + clazz.getName() + ",
method: " + methodName + ", cause: " + violations);
+ LOG.error("Failed to validate service: " + clazz.getName() + ",
method: " + methodName + ", cause: " + violations);
StringBuilder validateError = new StringBuilder();
violations.forEach(each ->
validateError.append(each.getMessage()).append(","));
throw new ValidationException(validateError.substring(0,
validateError.length() - 1));
diff --git
a/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/test/java/org/apache/shenyu/client/alibaba/dubbo/validation/mock/MockValidationParameter.java
b/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/test/java/org/apache/shenyu/client/alibaba/dubbo/validation/mock/MockValidationParameter.java
index d0375e9..514736f 100644
---
a/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/test/java/org/apache/shenyu/client/alibaba/dubbo/validation/mock/MockValidationParameter.java
+++
b/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/test/java/org/apache/shenyu/client/alibaba/dubbo/validation/mock/MockValidationParameter.java
@@ -17,19 +17,19 @@
package org.apache.shenyu.client.alibaba.dubbo.validation.mock;
-import lombok.Data;
-
import javax.validation.constraints.NotNull;
/**
* Mock ValidationParameter.
*/
-@Data
public class MockValidationParameter {
@NotNull
private String stringParameter;
+ /**
+ * constructor without parameter.
+ */
public MockValidationParameter() {
}
@@ -41,4 +41,22 @@ public class MockValidationParameter {
public MockValidationParameter(final String stringParameter) {
this.stringParameter = stringParameter;
}
+
+ /**
+ * get StringParameter.
+ *
+ * @return stringParameter
+ */
+ public String getStringParameter() {
+ return stringParameter;
+ }
+
+ /**
+ * set stringParameter.
+ *
+ * @param stringParameter the String parameter.
+ */
+ public void setStringParameter(final String stringParameter) {
+ this.stringParameter = stringParameter;
+ }
}
diff --git
a/shenyu-client/shenyu-client-dubbo/shenyu-client-apache-dubbo/src/main/java/org/apache/shenyu/client/apache/dubbo/ApacheDubboServiceBeanListener.java
b/shenyu-client/shenyu-client-dubbo/shenyu-client-apache-dubbo/src/main/java/org/apache/shenyu/client/apache/dubbo/ApacheDubboServiceBeanListener.java
index c0623c6..b453658 100644
---
a/shenyu-client/shenyu-client-dubbo/shenyu-client-apache-dubbo/src/main/java/org/apache/shenyu/client/apache/dubbo/ApacheDubboServiceBeanListener.java
+++
b/shenyu-client/shenyu-client-dubbo/shenyu-client-apache-dubbo/src/main/java/org/apache/shenyu/client/apache/dubbo/ApacheDubboServiceBeanListener.java
@@ -18,7 +18,6 @@
package org.apache.shenyu.client.apache.dubbo;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
-import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.dubbo.common.Constants;
import org.apache.dubbo.config.spring.ServiceBean;
@@ -48,7 +47,6 @@ import java.util.stream.Collectors;
/**
* The Apache Dubbo ServiceBean Listener.
*/
-@Slf4j
@SuppressWarnings("all")
public class ApacheDubboServiceBeanListener implements
ApplicationListener<ContextRefreshedEvent> {
diff --git
a/shenyu-client/shenyu-client-dubbo/shenyu-client-apache-dubbo/src/main/java/org/apache/shenyu/client/apache/dubbo/validation/ApacheDubboClientValidator.java
b/shenyu-client/shenyu-client-dubbo/shenyu-client-apache-dubbo/src/main/java/org/apache/shenyu/client/apache/dubbo/validation/ApacheDubboClientValidator.java
index 619689c..ae15bbe 100644
---
a/shenyu-client/shenyu-client-dubbo/shenyu-client-apache-dubbo/src/main/java/org/apache/shenyu/client/apache/dubbo/validation/ApacheDubboClientValidator.java
+++
b/shenyu-client/shenyu-client-dubbo/shenyu-client-apache-dubbo/src/main/java/org/apache/shenyu/client/apache/dubbo/validation/ApacheDubboClientValidator.java
@@ -38,12 +38,14 @@ import javassist.bytecode.annotation.LongMemberValue;
import javassist.bytecode.annotation.MemberValue;
import javassist.bytecode.annotation.ShortMemberValue;
import javassist.bytecode.annotation.StringMemberValue;
-import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.bytecode.ClassGenerator;
import org.apache.dubbo.common.utils.ReflectUtils;
import org.apache.dubbo.validation.MethodValidated;
import org.apache.dubbo.validation.Validator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import javax.validation.Constraint;
import javax.validation.ConstraintViolation;
import javax.validation.Validation;
@@ -67,9 +69,10 @@ import java.util.concurrent.ConcurrentHashMap;
/**
* ApacheDubboClientValidator.
*/
-@Slf4j
public class ApacheDubboClientValidator implements Validator {
+ private static final Logger LOG =
LoggerFactory.getLogger(ApacheDubboClientValidator.class);
+
private final Class<?> clazz;
private final Map<String, Class<?>> methodClassMap;
@@ -109,7 +112,7 @@ public class ApacheDubboClientValidator implements
Validator {
}
return parameterBean;
} catch (Exception e) {
- log.warn(e.getMessage(), e);
+ LOG.warn(e.getMessage(), e);
return null;
}
}
@@ -130,7 +133,7 @@ public class ApacheDubboClientValidator implements
Validator {
try {
ctClass = pool.getCtClass(parameterClassName);
} catch (NotFoundException neglect) {
- log.error(neglect.getMessage(), neglect);
+ LOG.error(neglect.getMessage(), neglect);
}
if (null == ctClass) {
@@ -279,7 +282,7 @@ public class ApacheDubboClientValidator implements
Validator {
}
if (!violations.isEmpty()) {
- log.error("Failed to validate service: " + clazz.getName() + ",
method: " + methodName + ", cause: " + violations);
+ LOG.error("Failed to validate service: " + clazz.getName() + ",
method: " + methodName + ", cause: " + violations);
StringBuilder validateError = new StringBuilder();
violations.forEach(each ->
validateError.append(each.getMessage()).append(","));
throw new ValidationException(validateError.substring(0,
validateError.length() - 1));
diff --git
a/shenyu-client/shenyu-client-dubbo/shenyu-client-apache-dubbo/src/test/java/org/apache/shenyu/client/apache/dubbo/validation/ApacheDubboClientValidatorTest.java
b/shenyu-client/shenyu-client-dubbo/shenyu-client-apache-dubbo/src/test/java/org/apache/shenyu/client/apache/dubbo/validation/ApacheDubboClientValidatorTest.java
index 80bd351..88212c3 100644
---
a/shenyu-client/shenyu-client-dubbo/shenyu-client-apache-dubbo/src/test/java/org/apache/shenyu/client/apache/dubbo/validation/ApacheDubboClientValidatorTest.java
+++
b/shenyu-client/shenyu-client-dubbo/shenyu-client-apache-dubbo/src/test/java/org/apache/shenyu/client/apache/dubbo/validation/ApacheDubboClientValidatorTest.java
@@ -64,7 +64,7 @@ public final class ApacheDubboClientValidatorTest {
try {
apacheDubboClientValidator.validate("test",
new Class[]{TestService.TestObject.class},
- new
Object[]{TestService.TestObject.builder().age(1).build()});
+ new Object[]{new TestService.TestObject(1)});
} catch (Exception e) {
assertThat("age cannot be null.", is(e.getMessage()));
}
diff --git
a/shenyu-client/shenyu-client-dubbo/shenyu-client-apache-dubbo/src/test/java/org/apache/shenyu/client/apache/dubbo/validation/service/TestService.java
b/shenyu-client/shenyu-client-dubbo/shenyu-client-apache-dubbo/src/test/java/org/apache/shenyu/client/apache/dubbo/validation/service/TestService.java
index 9892974..45e3365 100644
---
a/shenyu-client/shenyu-client-dubbo/shenyu-client-apache-dubbo/src/test/java/org/apache/shenyu/client/apache/dubbo/validation/service/TestService.java
+++
b/shenyu-client/shenyu-client-dubbo/shenyu-client-apache-dubbo/src/test/java/org/apache/shenyu/client/apache/dubbo/validation/service/TestService.java
@@ -17,10 +17,8 @@
package org.apache.shenyu.client.apache.dubbo.validation.service;
-import lombok.Builder;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotNull;
+import java.util.Objects;
/**
* TestService.
@@ -35,11 +33,66 @@ public interface TestService {
*/
String test(TestObject testObject);
- @Data
- @Builder
- @EqualsAndHashCode
class TestObject {
+
@NotNull(message = "age cannot be null.")
private Integer age;
+
+ /**
+ * constructor without parameter.
+ */
+ public TestObject() {
+ }
+
+ /**
+ * constructor with all params.
+ *
+ * @param age age
+ */
+ public TestObject(final Integer age) {
+ this.age = age;
+ }
+
+ /**
+ * get age.
+ *
+ * @return age
+ */
+ public Integer getAge() {
+ return age;
+ }
+
+ /**
+ * set age.
+ *
+ * @param age age
+ */
+ public void setAge(final Integer age) {
+ this.age = age;
+ }
+
+ @Override
+ public boolean equals(final Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ TestObject that = (TestObject) o;
+ return getAge().equals(that.getAge());
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(getAge());
+ }
+
+ @Override
+ public String toString() {
+ return "TestObject{"
+ + "age=" + age
+ + '}';
+ }
}
}
diff --git
a/shenyu-client/shenyu-client-dubbo/shenyu-client-dubbo-common/src/main/java/org/apache/shenyu/client/dubbo/common/dto/DubboRpcExt.java
b/shenyu-client/shenyu-client-dubbo/shenyu-client-dubbo-common/src/main/java/org/apache/shenyu/client/dubbo/common/dto/DubboRpcExt.java
index 7a44a9c..8129cdb 100644
---
a/shenyu-client/shenyu-client-dubbo/shenyu-client-dubbo-common/src/main/java/org/apache/shenyu/client/dubbo/common/dto/DubboRpcExt.java
+++
b/shenyu-client/shenyu-client-dubbo/shenyu-client-dubbo-common/src/main/java/org/apache/shenyu/client/dubbo/common/dto/DubboRpcExt.java
@@ -17,16 +17,11 @@
package org.apache.shenyu.client.dubbo.common.dto;
-import lombok.Builder;
-import lombok.Data;
-
import java.io.Serializable;
/**
* The type Dubbo rpc ext.
*/
-@Data
-@Builder
public class DubboRpcExt implements Serializable {
private static final long serialVersionUID = -1771273152608873279L;
@@ -42,4 +37,264 @@ public class DubboRpcExt implements Serializable {
private Integer timeout;
private String url;
+
+ /**
+ * constructor without parameter.
+ */
+ public DubboRpcExt() {
+ }
+
+ /**
+ * constructor with all parameters.
+ *
+ * @param group group
+ * @param version version
+ * @param loadbalance loadbalance
+ * @param retries retries
+ * @param timeout timeout
+ * @param url url
+ */
+ public DubboRpcExt(final String group, final String version, final String
loadbalance, final Integer retries, final Integer timeout, final String url) {
+ this.group = group;
+ this.version = version;
+ this.loadbalance = loadbalance;
+ this.retries = retries;
+ this.timeout = timeout;
+ this.url = url;
+ }
+
+ /**
+ * get group.
+ *
+ * @return group
+ */
+ public String getGroup() {
+ return group;
+ }
+
+ /**
+ * set group.
+ *
+ * @param group group
+ */
+ public void setGroup(final String group) {
+ this.group = group;
+ }
+
+ /**
+ * get version.
+ *
+ * @return version
+ */
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ * set version.
+ *
+ * @param version version
+ */
+ public void setVersion(final String version) {
+ this.version = version;
+ }
+
+ /**
+ * get loadbalance.
+ *
+ * @return loadbalance
+ */
+ public String getLoadbalance() {
+ return loadbalance;
+ }
+
+ /**
+ * set loadbalance.
+ *
+ * @param loadbalance loadbalance
+ */
+ public void setLoadbalance(final String loadbalance) {
+ this.loadbalance = loadbalance;
+ }
+
+ /**
+ * get retries.
+ *
+ * @return retries
+ */
+ public Integer getRetries() {
+ return retries;
+ }
+
+ /**
+ * set retries.
+ *
+ * @param retries retries
+ */
+ public void setRetries(final Integer retries) {
+ this.retries = retries;
+ }
+
+ /**
+ * get timeout.
+ *
+ * @return timeout
+ */
+ public Integer getTimeout() {
+ return timeout;
+ }
+
+ /**
+ * set timeout.
+ *
+ * @param timeout timeout
+ */
+ public void setTimeout(final Integer timeout) {
+ this.timeout = timeout;
+ }
+
+ /**
+ * get url.
+ *
+ * @return url
+ */
+ public String getUrl() {
+ return url;
+ }
+
+ /**
+ * set url.
+ *
+ * @param url url
+ */
+ public void setUrl(final String url) {
+ this.url = url;
+ }
+
+ @Override
+ public String toString() {
+ return "DubboRpcExt{"
+ + "group='" + group + '\''
+ + ", version='" + version + '\''
+ + ", loadbalance='" + loadbalance + '\''
+ + ", retries=" + retries
+ + ", timeout=" + timeout
+ + ", url='" + url + '\''
+ + '}';
+ }
+
+ /**
+ * get Builder of DubboRpcExt.
+ *
+ * @return the Builder
+ */
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ /**
+ * the Builder of DubboRpcExt.
+ */
+ public static final class Builder {
+
+ private String group;
+
+ private String version;
+
+ private String loadbalance;
+
+ private Integer retries;
+
+ private Integer timeout;
+
+ private String url;
+
+ /**
+ * constructor without parameter.
+ */
+ private Builder() {
+ }
+
+ /**
+ * set group.
+ *
+ * @param group group
+ * @return Builder
+ */
+ public Builder group(final String group) {
+ this.group = group;
+ return this;
+ }
+
+ /**
+ * set version.
+ *
+ * @param version version
+ * @return Builder
+ */
+ public Builder version(final String version) {
+ this.version = version;
+ return this;
+ }
+
+ /**
+ * set loadbalance.
+ *
+ * @param loadbalance loadbalance
+ * @return Builder
+ */
+ public Builder loadbalance(final String loadbalance) {
+ this.loadbalance = loadbalance;
+ return this;
+ }
+
+ /**
+ * set retries.
+ *
+ * @param retries retries
+ * @return Builder
+ */
+ public Builder retries(final Integer retries) {
+ this.retries = retries;
+ return this;
+ }
+
+ /**
+ * set timeout.
+ *
+ * @param timeout timeout
+ * @return Builder
+ */
+ public Builder timeout(final Integer timeout) {
+ this.timeout = timeout;
+ return this;
+ }
+
+ /**
+ * set url.
+ *
+ * @param url url
+ * @return Builder
+ */
+ public Builder url(final String url) {
+ this.url = url;
+ return this;
+ }
+
+ /**
+ * build DubboRpcExt.
+ *
+ * @return DubboRpcExt
+ */
+ public DubboRpcExt build() {
+ DubboRpcExt dubboRpcExt = new DubboRpcExt();
+ dubboRpcExt.setGroup(group);
+ dubboRpcExt.setVersion(version);
+ dubboRpcExt.setLoadbalance(loadbalance);
+ dubboRpcExt.setRetries(retries);
+ dubboRpcExt.setTimeout(timeout);
+ dubboRpcExt.setUrl(url);
+ return dubboRpcExt;
+ }
+ }
}
diff --git
a/shenyu-client/shenyu-client-grpc/src/main/java/org/apache/shenyu/client/grpc/GrpcClientBeanPostProcessor.java
b/shenyu-client/shenyu-client-grpc/src/main/java/org/apache/shenyu/client/grpc/GrpcClientBeanPostProcessor.java
index 9940fef..9945df2 100644
---
a/shenyu-client/shenyu-client-grpc/src/main/java/org/apache/shenyu/client/grpc/GrpcClientBeanPostProcessor.java
+++
b/shenyu-client/shenyu-client-grpc/src/main/java/org/apache/shenyu/client/grpc/GrpcClientBeanPostProcessor.java
@@ -22,8 +22,6 @@ import com.google.common.util.concurrent.ThreadFactoryBuilder;
import io.grpc.BindableService;
import io.grpc.MethodDescriptor;
import io.grpc.ServerServiceDefinition;
-import lombok.Getter;
-import lombok.extern.slf4j.Slf4j;
import
org.apache.shenyu.client.core.disruptor.ShenyuClientRegisterEventPublisher;
import org.apache.shenyu.client.grpc.common.annotation.ShenyuGrpcClient;
import org.apache.shenyu.client.grpc.common.dto.GrpcExt;
@@ -33,6 +31,8 @@ import org.apache.shenyu.common.utils.IpUtils;
import org.apache.shenyu.register.client.api.ShenyuClientRegisterRepository;
import org.apache.shenyu.register.common.config.ShenyuRegisterCenterConfig;
import org.apache.shenyu.register.common.dto.MetaDataRegisterDTO;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.lang.NonNull;
@@ -52,9 +52,10 @@ import java.util.stream.Collectors;
/**
* The type Shenyu grpc client bean post processor.
*/
-@Slf4j
public class GrpcClientBeanPostProcessor implements BeanPostProcessor {
+ private static final Logger LOG =
LoggerFactory.getLogger(GrpcClientBeanPostProcessor.class);
+
private ShenyuClientRegisterEventPublisher publisher =
ShenyuClientRegisterEventPublisher.getInstance();
private final ExecutorService executorService;
@@ -67,7 +68,6 @@ public class GrpcClientBeanPostProcessor implements
BeanPostProcessor {
private final int port;
- @Getter
private List<ServerServiceDefinition> serviceDefinitions =
Lists.newArrayList();
/**
@@ -106,7 +106,7 @@ public class GrpcClientBeanPostProcessor implements
BeanPostProcessor {
try {
clazz = serviceBean.getClass();
} catch (Exception e) {
- log.error("failed to get grpc target class");
+ LOG.error("failed to get grpc target class");
return;
}
Class<?> parent = clazz.getSuperclass();
@@ -118,11 +118,11 @@ public class GrpcClientBeanPostProcessor implements
BeanPostProcessor {
field.setAccessible(true);
packageName = field.get(null).toString();
} catch (Exception e) {
- log.error(String.format("SERVICE_NAME field not found: %s",
classes));
+ LOG.error(String.format("SERVICE_NAME field not found: %s",
classes));
return;
}
if (StringUtils.isEmpty(packageName)) {
- log.error(String.format("grpc SERVICE_NAME can not found: %s",
classes));
+ LOG.error(String.format("grpc SERVICE_NAME can not found: %s",
classes));
return;
}
final Method[] methods =
ReflectionUtils.getUniqueDeclaredMethods(clazz);
@@ -181,7 +181,16 @@ public class GrpcClientBeanPostProcessor implements
BeanPostProcessor {
serviceDefinitions.add(serviceDefinition);
serviceDefinitions.add(jsonDefinition);
} catch (Exception e) {
- log.error("export json generic service is fail", e);
+ LOG.error("export json generic service is fail", e);
}
}
+
+ /**
+ * get serviceDefinitions.
+ *
+ * @return serviceDefinitions
+ */
+ public List<ServerServiceDefinition> getServiceDefinitions() {
+ return serviceDefinitions;
+ }
}
diff --git
a/shenyu-client/shenyu-client-grpc/src/main/java/org/apache/shenyu/client/grpc/common/dto/GrpcExt.java
b/shenyu-client/shenyu-client-grpc/src/main/java/org/apache/shenyu/client/grpc/common/dto/GrpcExt.java
index 16a1621..a225f42 100644
---
a/shenyu-client/shenyu-client-grpc/src/main/java/org/apache/shenyu/client/grpc/common/dto/GrpcExt.java
+++
b/shenyu-client/shenyu-client-grpc/src/main/java/org/apache/shenyu/client/grpc/common/dto/GrpcExt.java
@@ -18,16 +18,12 @@
package org.apache.shenyu.client.grpc.common.dto;
import io.grpc.MethodDescriptor;
-import lombok.Builder;
-import lombok.Data;
import java.io.Serializable;
/**
* The type Grpc ext.
*/
-@Data
-@Builder
public class GrpcExt implements Serializable {
private static final long serialVersionUID = 346053551613199101L;
@@ -38,4 +34,158 @@ public class GrpcExt implements Serializable {
private MethodDescriptor.MethodType methodType;
+ /**
+ * constructor without parameter.
+ */
+ public GrpcExt() {
+ }
+
+ /**
+ * constructor with all parameters.
+ *
+ * @param loadbalance loadbalance
+ * @param timeout timeout
+ * @param methodType methodType
+ */
+ public GrpcExt(final String loadbalance, final Integer timeout, final
MethodDescriptor.MethodType methodType) {
+ this.loadbalance = loadbalance;
+ this.timeout = timeout;
+ this.methodType = methodType;
+ }
+
+ /**
+ * get loadbalance.
+ *
+ * @return loadbalance
+ */
+ public String getLoadbalance() {
+ return loadbalance;
+ }
+
+ /**
+ * set loadbalance.
+ *
+ * @param loadbalance loadbalance
+ */
+ public void setLoadbalance(final String loadbalance) {
+ this.loadbalance = loadbalance;
+ }
+
+ /**
+ * get timeout.
+ *
+ * @return timeout
+ */
+ public Integer getTimeout() {
+ return timeout;
+ }
+
+ /**
+ * set timeout.
+ *
+ * @param timeout timeout
+ */
+ public void setTimeout(final Integer timeout) {
+ this.timeout = timeout;
+ }
+
+ /**
+ * get methodType.
+ *
+ * @return methodType
+ */
+ public MethodDescriptor.MethodType getMethodType() {
+ return methodType;
+ }
+
+ /**
+ * set methodType.
+ *
+ * @param methodType methodType
+ */
+ public void setMethodType(final MethodDescriptor.MethodType methodType) {
+ this.methodType = methodType;
+ }
+
+ @Override
+ public String toString() {
+ return "GrpcExt{"
+ + "loadbalance='" + loadbalance + '\''
+ + ", timeout=" + timeout
+ + ", methodType=" + methodType
+ + '}';
+ }
+
+ /**
+ * get Builder of GrpcExt.
+ *
+ * @return the Builder
+ */
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ /**
+ * the Builder of GrpcExt.
+ */
+ public static final class Builder {
+
+ private String loadbalance;
+
+ private Integer timeout;
+
+ private MethodDescriptor.MethodType methodType;
+
+ /**
+ * constructor without parameter.
+ */
+ private Builder() {
+ }
+
+ /**
+ * set loadbalance.
+ *
+ * @param loadbalance loadbalance
+ * @return Builder
+ */
+ public Builder loadbalance(final String loadbalance) {
+ this.loadbalance = loadbalance;
+ return this;
+ }
+
+ /**
+ * set timeout.
+ *
+ * @param timeout timeout
+ * @return Builder
+ */
+ public Builder timeout(final Integer timeout) {
+ this.timeout = timeout;
+ return this;
+ }
+
+ /**
+ * set methodType.
+ *
+ * @param methodType methodType
+ * @return Builder
+ */
+ public Builder methodType(final MethodDescriptor.MethodType
methodType) {
+ this.methodType = methodType;
+ return this;
+ }
+
+ /**
+ * build GrpcExt.
+ *
+ * @return GrpcExt
+ */
+ public GrpcExt build() {
+ GrpcExt grpcExt = new GrpcExt();
+ grpcExt.setLoadbalance(loadbalance);
+ grpcExt.setTimeout(timeout);
+ grpcExt.setMethodType(methodType);
+ return grpcExt;
+ }
+ }
}
diff --git
a/shenyu-client/shenyu-client-grpc/src/main/java/org/apache/shenyu/client/grpc/json/JsonForwardingServerCall.java
b/shenyu-client/shenyu-client-grpc/src/main/java/org/apache/shenyu/client/grpc/json/JsonForwardingServerCall.java
index 8e7e6af..12585b9 100644
---
a/shenyu-client/shenyu-client-grpc/src/main/java/org/apache/shenyu/client/grpc/json/JsonForwardingServerCall.java
+++
b/shenyu-client/shenyu-client-grpc/src/main/java/org/apache/shenyu/client/grpc/json/JsonForwardingServerCall.java
@@ -26,8 +26,9 @@ import io.grpc.Metadata;
import io.grpc.ServerCall;
import io.grpc.Status;
import io.grpc.MethodDescriptor;
-import lombok.extern.slf4j.Slf4j;
import org.apache.shenyu.protocol.grpc.message.JsonMessage;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Handle response of json generic service.
@@ -35,9 +36,10 @@ import org.apache.shenyu.protocol.grpc.message.JsonMessage;
* @param <R> request message
* @param <P> response message
*/
-@Slf4j
public class JsonForwardingServerCall<R, P> extends ServerCall<R, P> {
+ private static final Logger LOG =
LoggerFactory.getLogger(JsonForwardingServerCall.class);
+
private final ServerCall<P, P> call;
public JsonForwardingServerCall(final ServerCall<P, P> call) {
@@ -61,10 +63,10 @@ public class JsonForwardingServerCall<R, P> extends
ServerCall<R, P> {
.print((MessageOrBuilder) message);
DynamicMessage respMessage =
JsonMessage.buildJsonMessage(jsonFormat);
- log.debug("begin send json response");
+ LOG.debug("begin send json response");
delegate().sendMessage((P) respMessage);
} catch (InvalidProtocolBufferException e) {
- log.error("handle json message is error", e);
+ LOG.error("handle json message is error", e);
throw
Status.INTERNAL.withDescription(e.getMessage()).asRuntimeException();
}
}
diff --git
a/shenyu-client/shenyu-client-grpc/src/main/java/org/apache/shenyu/client/grpc/json/JsonServerCallListener.java
b/shenyu-client/shenyu-client-grpc/src/main/java/org/apache/shenyu/client/grpc/json/JsonServerCallListener.java
index 002a2d2..b7c8596 100644
---
a/shenyu-client/shenyu-client-grpc/src/main/java/org/apache/shenyu/client/grpc/json/JsonServerCallListener.java
+++
b/shenyu-client/shenyu-client-grpc/src/main/java/org/apache/shenyu/client/grpc/json/JsonServerCallListener.java
@@ -24,10 +24,11 @@ import io.grpc.ForwardingServerCallListener;
import io.grpc.ServerCall;
import io.grpc.ServerCall.Listener;
import io.grpc.Status;
-import lombok.extern.slf4j.Slf4j;
import org.apache.shenyu.common.exception.ShenyuException;
import org.apache.shenyu.common.utils.ReflectUtils;
import org.apache.shenyu.protocol.grpc.message.JsonMessage;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.util.Objects;
@@ -37,9 +38,10 @@ import java.util.Objects;
* @param <R> generic request
* @param <P> generic response
*/
-@Slf4j
public class JsonServerCallListener<R, P> extends
ForwardingServerCallListener<R> {
+ private static final Logger LOG =
LoggerFactory.getLogger(JsonServerCallListener.class);
+
private final Listener<R> delegate;
private final ServerCall<R, P> call;
@@ -70,7 +72,7 @@ public class JsonServerCallListener<R, P> extends
ForwardingServerCallListener<R
delegate.onMessage((R) builder.build());
} catch (Exception e) {
- log.error("handle json generic request is error", e);
+ LOG.error("handle json generic request is error", e);
throw
Status.INTERNAL.withDescription(e.getMessage()).asRuntimeException();
}
}
diff --git
a/shenyu-client/shenyu-client-grpc/src/main/java/org/apache/shenyu/client/grpc/json/JsonServerServiceInterceptor.java
b/shenyu-client/shenyu-client-grpc/src/main/java/org/apache/shenyu/client/grpc/json/JsonServerServiceInterceptor.java
index 25c445f..6d468be 100644
---
a/shenyu-client/shenyu-client-grpc/src/main/java/org/apache/shenyu/client/grpc/json/JsonServerServiceInterceptor.java
+++
b/shenyu-client/shenyu-client-grpc/src/main/java/org/apache/shenyu/client/grpc/json/JsonServerServiceInterceptor.java
@@ -25,7 +25,6 @@ import io.grpc.ServiceDescriptor;
import io.grpc.ServerCallHandler;
import io.grpc.ServerCall;
import io.grpc.Metadata;
-import lombok.extern.slf4j.Slf4j;
import org.apache.shenyu.common.exception.ShenyuException;
import org.apache.shenyu.common.utils.ReflectUtils;
import org.apache.shenyu.protocol.grpc.constant.GrpcConstants;
@@ -40,7 +39,6 @@ import java.util.Objects;
/**
* Support json invoke.
*/
-@Slf4j
public class JsonServerServiceInterceptor {
private static Map<String, Class<?>> requestClazzMap =
Maps.newConcurrentMap();
diff --git
a/shenyu-client/shenyu-client-grpc/src/main/java/org/apache/shenyu/client/grpc/server/GrpcServerRunner.java
b/shenyu-client/shenyu-client-grpc/src/main/java/org/apache/shenyu/client/grpc/server/GrpcServerRunner.java
index 2ac440e..21fff4e 100644
---
a/shenyu-client/shenyu-client-grpc/src/main/java/org/apache/shenyu/client/grpc/server/GrpcServerRunner.java
+++
b/shenyu-client/shenyu-client-grpc/src/main/java/org/apache/shenyu/client/grpc/server/GrpcServerRunner.java
@@ -20,8 +20,9 @@ package org.apache.shenyu.client.grpc.server;
import io.grpc.Server;
import io.grpc.ServerBuilder;
import io.grpc.ServerServiceDefinition;
-import lombok.extern.slf4j.Slf4j;
import org.apache.shenyu.client.grpc.GrpcClientBeanPostProcessor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
@@ -31,9 +32,10 @@ import java.util.List;
/**
* Add grpc service and start grpc server.
*/
-@Slf4j
public class GrpcServerRunner implements ApplicationRunner {
+ private static final Logger LOG =
LoggerFactory.getLogger(GrpcServerRunner.class);
+
private final GrpcServerBuilder grpcServerBuilder;
private final GrpcClientBeanPostProcessor grpcClientBeanPostProcessor;
@@ -55,21 +57,21 @@ public class GrpcServerRunner implements ApplicationRunner {
List<ServerServiceDefinition> serviceDefinitions =
grpcClientBeanPostProcessor.getServiceDefinitions();
for (ServerServiceDefinition serviceDefinition : serviceDefinitions) {
serverBuilder.addService(serviceDefinition);
- log.info("{} has been add to grpc server",
serviceDefinition.getServiceDescriptor().getName());
+ LOG.info("{} has been add to grpc server",
serviceDefinition.getServiceDescriptor().getName());
}
try {
Server server = serverBuilder.build().start();
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
- log.info("shutting down grpc server");
+ LOG.info("shutting down grpc server");
server.shutdown();
- log.info("grpc server shut down");
+ LOG.info("grpc server shut down");
}));
- log.info("Grpc server started successfully");
+ LOG.info("Grpc server started successfully");
} catch (IOException e) {
- log.error("Grpc server failed to start", e);
+ LOG.error("Grpc server failed to start", e);
}
}
}
diff --git
a/shenyu-client/shenyu-client-http/shenyu-client-springcloud/src/main/java/org/apache/shenyu/client/springcloud/init/ContextRegisterListener.java
b/shenyu-client/shenyu-client-http/shenyu-client-springcloud/src/main/java/org/apache/shenyu/client/springcloud/init/ContextRegisterListener.java
index 880fe6c..a0be5e2 100644
---
a/shenyu-client/shenyu-client-http/shenyu-client-springcloud/src/main/java/org/apache/shenyu/client/springcloud/init/ContextRegisterListener.java
+++
b/shenyu-client/shenyu-client-http/shenyu-client-springcloud/src/main/java/org/apache/shenyu/client/springcloud/init/ContextRegisterListener.java
@@ -17,7 +17,6 @@
package org.apache.shenyu.client.springcloud.init;
-import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import
org.apache.shenyu.client.core.disruptor.ShenyuClientRegisterEventPublisher;
import org.apache.shenyu.common.enums.RpcTypeEnum;
@@ -25,6 +24,8 @@ import org.apache.shenyu.common.utils.IpUtils;
import org.apache.shenyu.register.client.api.ShenyuClientRegisterRepository;
import org.apache.shenyu.register.common.config.ShenyuRegisterCenterConfig;
import org.apache.shenyu.register.common.dto.MetaDataRegisterDTO;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.core.env.Environment;
@@ -36,9 +37,10 @@ import java.util.concurrent.atomic.AtomicBoolean;
/**
* The type Context register listener.
*/
-@Slf4j
public class ContextRegisterListener implements
ApplicationListener<ContextRefreshedEvent> {
+ private static final Logger LOG =
LoggerFactory.getLogger(ContextRegisterListener.class);
+
private ShenyuClientRegisterEventPublisher publisher =
ShenyuClientRegisterEventPublisher.getInstance();
private final AtomicBoolean registered = new AtomicBoolean(false);
@@ -70,7 +72,7 @@ public class ContextRegisterListener implements
ApplicationListener<ContextRefre
if (StringUtils.isBlank(contextPath) ||
StringUtils.isBlank(registerType)
|| StringUtils.isBlank(serverLists) ||
StringUtils.isBlank(appName)) {
String errorMsg = "spring cloud param must config the
contextPath ,registerType , serverLists and appName";
- log.error(errorMsg);
+ LOG.error(errorMsg);
throw new RuntimeException(errorMsg);
}
this.env = env;
diff --git
a/shenyu-client/shenyu-client-http/shenyu-client-springcloud/src/main/java/org/apache/shenyu/client/springcloud/init/SpringCloudClientBeanPostProcessor.java
b/shenyu-client/shenyu-client-http/shenyu-client-springcloud/src/main/java/org/apache/shenyu/client/springcloud/init/SpringCloudClientBeanPostProcessor.java
index dc6c840..4240282 100644
---
a/shenyu-client/shenyu-client-http/shenyu-client-springcloud/src/main/java/org/apache/shenyu/client/springcloud/init/SpringCloudClientBeanPostProcessor.java
+++
b/shenyu-client/shenyu-client-http/shenyu-client-springcloud/src/main/java/org/apache/shenyu/client/springcloud/init/SpringCloudClientBeanPostProcessor.java
@@ -18,7 +18,6 @@
package org.apache.shenyu.client.springcloud.init;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
-import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import
org.apache.shenyu.client.core.disruptor.ShenyuClientRegisterEventPublisher;
import org.apache.shenyu.client.springcloud.annotation.ShenyuSpringCloudClient;
@@ -26,6 +25,8 @@ import org.apache.shenyu.common.utils.IpUtils;
import org.apache.shenyu.register.client.api.ShenyuClientRegisterRepository;
import org.apache.shenyu.register.common.config.ShenyuRegisterCenterConfig;
import org.apache.shenyu.register.common.dto.MetaDataRegisterDTO;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.core.annotation.AnnotationUtils;
@@ -45,9 +46,10 @@ import java.util.concurrent.Executors;
/**
* The type Shenyu client bean post processor.
*/
-@Slf4j
public class SpringCloudClientBeanPostProcessor implements BeanPostProcessor {
+ private static final Logger LOG =
LoggerFactory.getLogger(SpringCloudClientBeanPostProcessor.class);
+
private ShenyuClientRegisterEventPublisher publisher =
ShenyuClientRegisterEventPublisher.getInstance();
private final ExecutorService executorService;
@@ -77,7 +79,7 @@ public class SpringCloudClientBeanPostProcessor implements
BeanPostProcessor {
String appName = env.getProperty("spring.application.name");
if (StringUtils.isBlank(registerType) ||
StringUtils.isBlank(serverLists) || StringUtils.isBlank(appName)) {
String errorMsg = "spring cloud param must config the registerType
, serverLists and appName";
- log.error(errorMsg);
+ LOG.error(errorMsg);
throw new RuntimeException(errorMsg);
}
executorService = Executors.newSingleThreadExecutor(new
ThreadFactoryBuilder().setNameFormat("shenyu-spring-cloud-client-thread-pool-%d").build());
diff --git
a/shenyu-client/shenyu-client-http/shenyu-client-springmvc/src/main/java/org/apache/shenyu/client/springmvc/init/ContextRegisterListener.java
b/shenyu-client/shenyu-client-http/shenyu-client-springmvc/src/main/java/org/apache/shenyu/client/springmvc/init/ContextRegisterListener.java
index 5d85b62..2631086 100644
---
a/shenyu-client/shenyu-client-http/shenyu-client-springmvc/src/main/java/org/apache/shenyu/client/springmvc/init/ContextRegisterListener.java
+++
b/shenyu-client/shenyu-client-http/shenyu-client-springmvc/src/main/java/org/apache/shenyu/client/springmvc/init/ContextRegisterListener.java
@@ -17,7 +17,6 @@
package org.apache.shenyu.client.springmvc.init;
-import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import
org.apache.shenyu.client.core.disruptor.ShenyuClientRegisterEventPublisher;
import org.apache.shenyu.common.enums.RpcTypeEnum;
@@ -25,6 +24,8 @@ import org.apache.shenyu.common.utils.IpUtils;
import org.apache.shenyu.register.client.api.ShenyuClientRegisterRepository;
import org.apache.shenyu.register.common.config.ShenyuRegisterCenterConfig;
import org.apache.shenyu.register.common.dto.MetaDataRegisterDTO;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.lang.NonNull;
@@ -35,9 +36,10 @@ import java.util.concurrent.atomic.AtomicBoolean;
/**
* The type Context register listener.
*/
-@Slf4j
public class ContextRegisterListener implements
ApplicationListener<ContextRefreshedEvent> {
+ private static final Logger LOG =
LoggerFactory.getLogger(ContextRegisterListener.class);
+
private ShenyuClientRegisterEventPublisher publisher =
ShenyuClientRegisterEventPublisher.getInstance();
private final AtomicBoolean registered = new AtomicBoolean(false);
@@ -69,7 +71,7 @@ public class ContextRegisterListener implements
ApplicationListener<ContextRefre
if (StringUtils.isBlank(contextPath) ||
StringUtils.isBlank(registerType)
|| StringUtils.isBlank(serverLists) || port <= 0) {
String errorMsg = "http register param must config the
contextPath, registerType , serverLists and port must > 0";
- log.error(errorMsg);
+ LOG.error(errorMsg);
throw new RuntimeException(errorMsg);
}
this.appName = props.getProperty("appName");
diff --git
a/shenyu-client/shenyu-client-http/shenyu-client-springmvc/src/main/java/org/apache/shenyu/client/springmvc/init/SpringMvcClientBeanPostProcessor.java
b/shenyu-client/shenyu-client-http/shenyu-client-springmvc/src/main/java/org/apache/shenyu/client/springmvc/init/SpringMvcClientBeanPostProcessor.java
index c653de1..31cce98 100644
---
a/shenyu-client/shenyu-client-http/shenyu-client-springmvc/src/main/java/org/apache/shenyu/client/springmvc/init/SpringMvcClientBeanPostProcessor.java
+++
b/shenyu-client/shenyu-client-http/shenyu-client-springmvc/src/main/java/org/apache/shenyu/client/springmvc/init/SpringMvcClientBeanPostProcessor.java
@@ -18,7 +18,6 @@
package org.apache.shenyu.client.springmvc.init;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
-import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import
org.apache.shenyu.client.core.disruptor.ShenyuClientRegisterEventPublisher;
import org.apache.shenyu.client.springmvc.annotation.ShenyuSpringMvcClient;
@@ -26,6 +25,8 @@ import org.apache.shenyu.common.utils.IpUtils;
import org.apache.shenyu.register.client.api.ShenyuClientRegisterRepository;
import org.apache.shenyu.register.common.config.ShenyuRegisterCenterConfig;
import org.apache.shenyu.register.common.dto.MetaDataRegisterDTO;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.core.annotation.AnnotationUtils;
@@ -43,9 +44,10 @@ import java.util.concurrent.Executors;
/**
* The type Shenyu spring mvc client bean post processor.
*/
-@Slf4j
public class SpringMvcClientBeanPostProcessor implements BeanPostProcessor {
+ private static final Logger LOG =
LoggerFactory.getLogger(SpringMvcClientBeanPostProcessor.class);
+
private final ShenyuClientRegisterEventPublisher publisher =
ShenyuClientRegisterEventPublisher.getInstance();
private final ExecutorService executorService;
@@ -70,7 +72,7 @@ public class SpringMvcClientBeanPostProcessor implements
BeanPostProcessor {
int port = Integer.parseInt(props.getProperty("port"));
if (StringUtils.isBlank(registerType) ||
StringUtils.isBlank(serverLists) || port <= 0) {
String errorMsg = "http register param must config the
registerType , serverLists and port must > 0";
- log.error(errorMsg);
+ LOG.error(errorMsg);
throw new RuntimeException(errorMsg);
}
this.appName = props.getProperty("appName");
diff --git
a/shenyu-client/shenyu-client-motan/src/main/java/org/apache/shenyu/client/motan/MotanServiceBeanPostProcessor.java
b/shenyu-client/shenyu-client-motan/src/main/java/org/apache/shenyu/client/motan/MotanServiceBeanPostProcessor.java
index 008e71c..f38358f 100644
---
a/shenyu-client/shenyu-client-motan/src/main/java/org/apache/shenyu/client/motan/MotanServiceBeanPostProcessor.java
+++
b/shenyu-client/shenyu-client-motan/src/main/java/org/apache/shenyu/client/motan/MotanServiceBeanPostProcessor.java
@@ -20,7 +20,6 @@ package org.apache.shenyu.client.motan;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import com.weibo.api.motan.config.springsupport.BasicServiceConfigBean;
import com.weibo.api.motan.config.springsupport.annotation.MotanService;
-import lombok.SneakyThrows;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
import
org.apache.shenyu.client.core.disruptor.ShenyuClientRegisterEventPublisher;
@@ -100,7 +99,6 @@ public class MotanServiceBeanPostProcessor implements
BeanPostProcessor, Applica
return bean;
}
- @SneakyThrows
private void handler(final Object bean) {
if (group == null) {
group = ((BasicServiceConfigBean)
applicationContext.getBean("baseServiceConfig")).getGroup();
@@ -170,9 +168,7 @@ public class MotanServiceBeanPostProcessor implements
BeanPostProcessor, Applica
params.add(Pair.of(paramTypes[i].getName(), paramNames[i]));
}
}
- return MotanRpcExt.RpcExt.builder().methodName(method.getName())
- .params(params)
- .build();
+ return new MotanRpcExt.RpcExt(method.getName(), params);
}
private String buildRpcExt(final Method[] methods) {
@@ -183,10 +179,7 @@ public class MotanServiceBeanPostProcessor implements
BeanPostProcessor, Applica
list.add(buildRpcExt(method));
}
}
- MotanRpcExt buildList = MotanRpcExt.builder()
- .methodInfo(list)
- .group(group)
- .build();
+ MotanRpcExt buildList = new MotanRpcExt(list, group);
return GsonUtils.getInstance().toJson(buildList);
}
diff --git
a/shenyu-client/shenyu-client-motan/src/main/java/org/apache/shenyu/client/motan/common/dto/MotanRpcExt.java
b/shenyu-client/shenyu-client-motan/src/main/java/org/apache/shenyu/client/motan/common/dto/MotanRpcExt.java
index 630e674..c65deb0 100644
---
a/shenyu-client/shenyu-client-motan/src/main/java/org/apache/shenyu/client/motan/common/dto/MotanRpcExt.java
+++
b/shenyu-client/shenyu-client-motan/src/main/java/org/apache/shenyu/client/motan/common/dto/MotanRpcExt.java
@@ -18,8 +18,6 @@
package org.apache.shenyu.client.motan.common.dto;
-import lombok.Builder;
-import lombok.Data;
import org.apache.commons.lang3.tuple.Pair;
import java.util.List;
@@ -27,8 +25,6 @@ import java.util.List;
/**
* Motan rpc ext.
*/
-@Data
-@Builder
public class MotanRpcExt {
private List<RpcExt> methodInfo;
@@ -36,14 +32,133 @@ public class MotanRpcExt {
private String group;
/**
+ * constructor without params.
+ */
+ public MotanRpcExt() {
+ }
+
+ /**
+ * constructor with all params.
+ *
+ * @param methodInfo methodInfo
+ * @param group group
+ */
+ public MotanRpcExt(final List<RpcExt> methodInfo, final String group) {
+ this.methodInfo = methodInfo;
+ this.group = group;
+ }
+
+ /**
+ * get methodInfo.
+ *
+ * @return methodInfo
+ */
+ public List<RpcExt> getMethodInfo() {
+ return methodInfo;
+ }
+
+ /**
+ * set methodInfo.
+ *
+ * @param methodInfo methodInfo
+ */
+ public void setMethodInfo(final List<RpcExt> methodInfo) {
+ this.methodInfo = methodInfo;
+ }
+
+ /**
+ * get group.
+ *
+ * @return group
+ */
+ public String getGroup() {
+ return group;
+ }
+
+ /**
+ * set group.
+ * @param group group
+ */
+ public void setGroup(final String group) {
+ this.group = group;
+ }
+
+ @Override
+ public String toString() {
+ return "MotanRpcExt{"
+ + "methodInfo=" + methodInfo
+ + ", group='" + group + '\''
+ + '}';
+ }
+
+ /**
* The type Rpc ext.
*/
- @Data
- @Builder
public static class RpcExt {
private String methodName;
private List<Pair<String, String>> params;
+
+ /**
+ * constructor without params.
+ */
+ public RpcExt() {
+ }
+
+ /**
+ * constructor with all params.
+ *
+ * @param methodName methodName
+ * @param params params
+ */
+ public RpcExt(final String methodName, final List<Pair<String,
String>> params) {
+ this.methodName = methodName;
+ this.params = params;
+ }
+
+ /**
+ * get methodName.
+ *
+ * @return methodName
+ */
+ public String getMethodName() {
+ return methodName;
+ }
+
+ /**
+ * set methodName.
+ *
+ * @param methodName methodName
+ */
+ public void setMethodName(final String methodName) {
+ this.methodName = methodName;
+ }
+
+ /**
+ * get params.
+ *
+ * @return params
+ */
+ public List<Pair<String, String>> getParams() {
+ return params;
+ }
+
+ /**
+ * set params.
+ *
+ * @param params params
+ */
+ public void setParams(final List<Pair<String, String>> params) {
+ this.params = params;
+ }
+
+ @Override
+ public String toString() {
+ return "RpcExt{"
+ + "methodName='" + methodName + '\''
+ + ", params=" + params
+ + '}';
+ }
}
}
diff --git
a/shenyu-client/shenyu-client-sofa/src/main/java/org/apache/shenyu/client/sofa/SofaServiceBeanPostProcessor.java
b/shenyu-client/shenyu-client-sofa/src/main/java/org/apache/shenyu/client/sofa/SofaServiceBeanPostProcessor.java
index 44ca7c8..c8ddc53 100644
---
a/shenyu-client/shenyu-client-sofa/src/main/java/org/apache/shenyu/client/sofa/SofaServiceBeanPostProcessor.java
+++
b/shenyu-client/shenyu-client-sofa/src/main/java/org/apache/shenyu/client/sofa/SofaServiceBeanPostProcessor.java
@@ -21,8 +21,6 @@ import com.alipay.sofa.runtime.service.component.Service;
import com.alipay.sofa.runtime.spring.factory.ServiceFactoryBean;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
-import lombok.SneakyThrows;
-import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import
org.apache.shenyu.client.core.disruptor.ShenyuClientRegisterEventPublisher;
import org.apache.shenyu.client.sofa.common.annotation.ShenyuSofaClient;
@@ -32,6 +30,8 @@ import org.apache.shenyu.common.utils.IpUtils;
import org.apache.shenyu.register.client.api.ShenyuClientRegisterRepository;
import org.apache.shenyu.register.common.config.ShenyuRegisterCenterConfig;
import org.apache.shenyu.register.common.dto.MetaDataRegisterDTO;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.aop.support.AopUtils;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;
@@ -48,9 +48,10 @@ import java.util.stream.Collectors;
/**
* The Sofa ServiceBean PostProcessor.
*/
-@Slf4j
public class SofaServiceBeanPostProcessor implements BeanPostProcessor {
+ private static final Logger LOG =
LoggerFactory.getLogger(SofaServiceBeanPostProcessor.class);
+
private ShenyuClientRegisterEventPublisher publisher =
ShenyuClientRegisterEventPublisher.getInstance();
private final ExecutorService executorService;
@@ -86,7 +87,6 @@ public class SofaServiceBeanPostProcessor implements
BeanPostProcessor {
return bean;
}
- @SneakyThrows
private void handler(final ServiceFactoryBean serviceBean) {
Class<?> clazz;
Object targetProxy;
@@ -94,7 +94,7 @@ public class SofaServiceBeanPostProcessor implements
BeanPostProcessor {
targetProxy = ((Service)
Objects.requireNonNull(serviceBean.getObject())).getTarget();
clazz = targetProxy.getClass();
} catch (Exception e) {
- log.error("failed to get sofa target class", e);
+ LOG.error("failed to get sofa target class", e);
return;
}
if (AopUtils.isAopProxy(targetProxy)) {
diff --git
a/shenyu-client/shenyu-client-sofa/src/main/java/org/apache/shenyu/client/sofa/common/dto/SofaRpcExt.java
b/shenyu-client/shenyu-client-sofa/src/main/java/org/apache/shenyu/client/sofa/common/dto/SofaRpcExt.java
index aede079..89b05f9 100644
---
a/shenyu-client/shenyu-client-sofa/src/main/java/org/apache/shenyu/client/sofa/common/dto/SofaRpcExt.java
+++
b/shenyu-client/shenyu-client-sofa/src/main/java/org/apache/shenyu/client/sofa/common/dto/SofaRpcExt.java
@@ -17,14 +17,9 @@
package org.apache.shenyu.client.sofa.common.dto;
-import lombok.Builder;
-import lombok.Data;
-
/**
* The type Sofa rpc ext.
*/
-@Data
-@Builder
public class SofaRpcExt {
private String loadbalance;
@@ -32,4 +27,158 @@ public class SofaRpcExt {
private Integer retries;
private Integer timeout;
+
+ /**
+ * constructor without params.
+ */
+ public SofaRpcExt() {
+ }
+
+ /**
+ * constructor with all params.
+ *
+ * @param loadbalance loadbalance
+ * @param retries retries
+ * @param timeout timeout
+ */
+ public SofaRpcExt(final String loadbalance, final Integer retries, final
Integer timeout) {
+ this.loadbalance = loadbalance;
+ this.retries = retries;
+ this.timeout = timeout;
+ }
+
+ /**
+ * get loadbalance.
+ *
+ * @return loadbalance
+ */
+ public String getLoadbalance() {
+ return loadbalance;
+ }
+
+ /**
+ * set loadbalance.
+ *
+ * @param loadbalance loadbalance
+ */
+ public void setLoadbalance(final String loadbalance) {
+ this.loadbalance = loadbalance;
+ }
+
+ /**
+ * get retries.
+ *
+ * @return retries
+ */
+ public Integer getRetries() {
+ return retries;
+ }
+
+ /**
+ * set retries.
+ *
+ * @param retries retries
+ */
+ public void setRetries(final Integer retries) {
+ this.retries = retries;
+ }
+
+ /**
+ * get timeout.
+ *
+ * @return timeout
+ */
+ public Integer getTimeout() {
+ return timeout;
+ }
+
+ /**
+ * set timeout.
+ *
+ * @param timeout timeout
+ */
+ public void setTimeout(final Integer timeout) {
+ this.timeout = timeout;
+ }
+
+ @Override
+ public String toString() {
+ return "SofaRpcExt{"
+ + "loadbalance='" + loadbalance + '\''
+ + ", retries=" + retries
+ + ", timeout=" + timeout
+ + '}';
+ }
+
+ /**
+ * get the Builder of SofaRpcExt.
+ * @return Builder
+ */
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ /**
+ * the Builder of SofaRpcExt.
+ */
+ public static final class Builder {
+
+ private String loadbalance;
+
+ private Integer retries;
+
+ private Integer timeout;
+
+ /**
+ * constructor without params.
+ */
+ private Builder() {
+ }
+
+ /**
+ * set loadbalance.
+ *
+ * @param loadbalance loadbalance
+ * @return Builder
+ */
+ public Builder loadbalance(final String loadbalance) {
+ this.loadbalance = loadbalance;
+ return this;
+ }
+
+ /**
+ * set retries.
+ *
+ * @param retries retries
+ * @return Builder
+ */
+ public Builder retries(final Integer retries) {
+ this.retries = retries;
+ return this;
+ }
+
+ /**
+ * set timeout.
+ *
+ * @param timeout timeout
+ * @return Builder
+ */
+ public Builder timeout(final Integer timeout) {
+ this.timeout = timeout;
+ return this;
+ }
+
+ /**
+ * build SofaRpcExt.
+ *
+ * @return SofaRpcExt
+ */
+ public SofaRpcExt build() {
+ SofaRpcExt sofaRpcExt = new SofaRpcExt();
+ sofaRpcExt.setLoadbalance(loadbalance);
+ sofaRpcExt.setRetries(retries);
+ sofaRpcExt.setTimeout(timeout);
+ return sofaRpcExt;
+ }
+ }
}
diff --git
a/shenyu-client/shenyu-client-tars/src/main/java/org/apache/shenyu/client/tars/TarsServiceBeanPostProcessor.java
b/shenyu-client/shenyu-client-tars/src/main/java/org/apache/shenyu/client/tars/TarsServiceBeanPostProcessor.java
index bb2726d..16adc75 100644
---
a/shenyu-client/shenyu-client-tars/src/main/java/org/apache/shenyu/client/tars/TarsServiceBeanPostProcessor.java
+++
b/shenyu-client/shenyu-client-tars/src/main/java/org/apache/shenyu/client/tars/TarsServiceBeanPostProcessor.java
@@ -18,7 +18,6 @@
package org.apache.shenyu.client.tars;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
-import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
import
org.apache.shenyu.client.core.disruptor.ShenyuClientRegisterEventPublisher;
@@ -49,7 +48,6 @@ import java.util.stream.Collectors;
/**
* The Tars ServiceBean PostProcessor.
*/
-@Slf4j
public class TarsServiceBeanPostProcessor implements BeanPostProcessor {
private final LocalVariableTableParameterNameDiscoverer
localVariableTableParameterNameDiscoverer = new
LocalVariableTableParameterNameDiscoverer();
@@ -142,10 +140,7 @@ public class TarsServiceBeanPostProcessor implements
BeanPostProcessor {
params.add(Pair.of(paramTypes[i].getName(), paramNames[i]));
}
}
- return TarsRpcExt.RpcExt.builder().methodName(method.getName())
- .params(params)
- .returnType(method.getReturnType().getName())
- .build();
+ return new TarsRpcExt.RpcExt(method.getName(), params,
method.getReturnType().getName());
}
private String buildRpcExt(final Method[] methods) {
@@ -156,9 +151,7 @@ public class TarsServiceBeanPostProcessor implements
BeanPostProcessor {
list.add(buildRpcExt(method));
}
}
- TarsRpcExt buildList = TarsRpcExt.builder()
- .methodInfo(list)
- .build();
+ TarsRpcExt buildList = new TarsRpcExt(list);
return GsonUtils.getInstance().toJson(buildList);
}
}
diff --git
a/shenyu-client/shenyu-client-tars/src/main/java/org/apache/shenyu/client/tars/common/dto/TarsRpcExt.java
b/shenyu-client/shenyu-client-tars/src/main/java/org/apache/shenyu/client/tars/common/dto/TarsRpcExt.java
index 37bd379..d4132b0 100644
---
a/shenyu-client/shenyu-client-tars/src/main/java/org/apache/shenyu/client/tars/common/dto/TarsRpcExt.java
+++
b/shenyu-client/shenyu-client-tars/src/main/java/org/apache/shenyu/client/tars/common/dto/TarsRpcExt.java
@@ -18,23 +18,60 @@
package org.apache.shenyu.client.tars.common.dto;
-import lombok.Builder;
-import lombok.Data;
import org.apache.commons.lang3.tuple.Pair;
import java.util.List;
-@Data
-@Builder
+/**
+ * The type Tars rpc ext.
+ */
public class TarsRpcExt {
private List<RpcExt> methodInfo;
-
+
+ /**
+ * constructor without params.
+ */
+ public TarsRpcExt() {
+ }
+
+ /**
+ * constructor with all params.
+ *
+ * @param methodInfo methodInfo
+ */
+ public TarsRpcExt(final List<RpcExt> methodInfo) {
+ this.methodInfo = methodInfo;
+ }
+
+ /**
+ * get methodInfo.
+ *
+ * @return methodInfo
+ */
+ public List<RpcExt> getMethodInfo() {
+ return methodInfo;
+ }
+
+ /**
+ * set methodInfo.
+ *
+ * @param methodInfo methodInfo
+ */
+ public void setMethodInfo(final List<RpcExt> methodInfo) {
+ this.methodInfo = methodInfo;
+ }
+
+ @Override
+ public String toString() {
+ return "TarsRpcExt{"
+ + "methodInfo=" + methodInfo
+ + '}';
+ }
+
/**
* The type Rpc ext.
*/
- @Data
- @Builder
public static class RpcExt {
private String methodName;
@@ -42,5 +79,87 @@ public class TarsRpcExt {
private List<Pair<String, String>> params;
private String returnType;
+
+ /**
+ * constructor without params.
+ */
+ public RpcExt() {
+ }
+
+ /**
+ * constructor with params.
+ *
+ * @param methodName methodName
+ * @param params params
+ * @param returnType returnType
+ */
+ public RpcExt(final String methodName, final List<Pair<String,
String>> params, final String returnType) {
+ this.methodName = methodName;
+ this.params = params;
+ this.returnType = returnType;
+ }
+
+ /**
+ * get methodName.
+ *
+ * @return methodName
+ */
+ public String getMethodName() {
+ return methodName;
+ }
+
+ /**
+ * set methodName.
+ *
+ * @param methodName methodName
+ */
+ public void setMethodName(final String methodName) {
+ this.methodName = methodName;
+ }
+
+ /**
+ * get params.
+ *
+ * @return params.
+ */
+ public List<Pair<String, String>> getParams() {
+ return params;
+ }
+
+ /**
+ * set params.
+ *
+ * @param params params
+ */
+ public void setParams(final List<Pair<String, String>> params) {
+ this.params = params;
+ }
+
+ /**
+ * get returnType.
+ *
+ * @return returnType
+ */
+ public String getReturnType() {
+ return returnType;
+ }
+
+ /**
+ * set returnType.
+ *
+ * @param returnType returnType
+ */
+ public void setReturnType(final String returnType) {
+ this.returnType = returnType;
+ }
+
+ @Override
+ public String toString() {
+ return "RpcExt{"
+ + "methodName='" + methodName + '\''
+ + ", params=" + params
+ + ", returnType='" + returnType + '\''
+ + '}';
+ }
}
}