You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by xu...@apache.org on 2025/12/08 01:54:10 UTC
(dubbo-go-samples) branch main updated: chore: remove duplicated registry (#990)
This is an automated email from the ASF dual-hosted git repository.
xuetaoli pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/dubbo-go-samples.git
The following commit(s) were added to refs/heads/main by this push:
new a9d9d018 chore: remove duplicated registry (#990)
a9d9d018 is described below
commit a9d9d0182befa869f8bc38ac4736d53205b2d878
Author: zbchi <16...@qq.com>
AuthorDate: Mon Dec 8 09:54:05 2025 +0800
chore: remove duplicated registry (#990)
---
README.md | 1 -
README_CN.md | 1 -
compatibility/registry/all/README.md | 29 -
.../registry/all/nacos/go-client/cmd/client.go | 56 -
.../registry/all/nacos/go-client/conf/dubbogo.yml | 14 -
.../registry/all/nacos/go-server/cmd/server.go | 51 -
.../registry/all/nacos/go-server/conf/dubbogo.yml | 17 -
.../registry/all/zookeeper/go-client/cmd/client.go | 56 -
.../all/zookeeper/go-client/conf/dubbogo.yml | 16 -
.../registry/all/zookeeper/go-server/cmd/server.go | 51 -
.../all/zookeeper/go-server/conf/dubbogo.yml | 17 -
.../servicediscovery/nacos/go-client/cmd/client.go | 56 -
.../nacos/go-client/conf/dubbogo.yml | 14 -
.../servicediscovery/nacos/go-server/cmd/server.go | 51 -
.../nacos/go-server/conf/dubbogo.yml | 17 -
.../zookeeper/go-client/cmd/client.go | 56 -
.../zookeeper/go-client/conf/dubbogo.yml | 16 -
.../zookeeper/go-server/cmd/server.go | 51 -
.../zookeeper/go-server/conf/dubbogo.yml | 17 -
.../org/apache/dubbo/sample/hello/Helloworld.java | 1432 --------------------
.../servicediscovery/zookeeper/java-client/pom.xml | 162 ---
.../servicediscovery/zookeeper/java-client/run.sh | 2 -
.../com/apache/dubbo/sample/basic/ApiConsumer.java | 57 -
.../com/apache/dubbo/sample/basic/IGreeter.java | 31 -
.../java-client/src/main/proto/helloworld.proto | 28 -
.../src/main/resources/log4j.properties | 26 -
.../org/apache/dubbo/sample/hello/Helloworld.java | 1432 --------------------
.../servicediscovery/zookeeper/java-server/pom.xml | 166 ---
.../servicediscovery/zookeeper/java-server/run.sh | 2 -
.../com/apache/dubbo/sample/basic/ApiProvider.java | 46 -
.../com/apache/dubbo/sample/basic/IGreeter.java | 30 -
.../apache/dubbo/sample/basic/IGreeter1Impl.java | 34 -
.../java-server/src/main/proto/helloworld.proto | 28 -
.../src/main/resources/log4j.properties | 26 -
.../all/nacos/tests/integration/greeter_test.go | 44 -
.../all/nacos/tests/integration/main_test.go | 40 -
.../zookeeper/tests/integration/greeter_test.go | 44 -
.../all/zookeeper/tests/integration/main_test.go | 40 -
.../nacos/tests/integration/helloworld_test.go | 46 -
.../nacos/tests/integration/main_test.go | 43 -
.../zookeeper/tests/integration/helloworld_test.go | 46 -
.../zookeeper/tests/integration/main_test.go | 43 -
start_integrate_test.sh | 7 -
43 files changed, 4442 deletions(-)
diff --git a/README.md b/README.md
index 11489e22..0fb005b5 100644
--- a/README.md
+++ b/README.md
@@ -57,7 +57,6 @@ A collection of runnable Dubbo-go examples covering configuration, registries, o
* `compatibility/polaris/limit`: Quickly experience Polaris' service current limiting capabilities in dubbogo
* `compatibility/polaris/registry`: Quickly experience Polaris' service registration and service discovery capabilities in dubbogo
* `compatibility/polaris/router`: Quickly experience Polaris' service routing capabilities in dubbogo
-* `compatibility/registry`: Shows how to use `etcd`/`Nacos`/`Zookeeper` as Dubbo-go registries.
* `compatibility/rpc`: Dubbo protocol communication examples.
* `compatibility/rpc/dubbo`: Dubbo-go 3.0 RPC example between Java and Go.
* `compatibility/rpc/grpc`: Dubbo-go RPC example based on gRPC.
diff --git a/README_CN.md b/README_CN.md
index b33f646b..204eb43b 100644
--- a/README_CN.md
+++ b/README_CN.md
@@ -57,7 +57,6 @@
* `compatibility/polaris/limit`: 在 dubbogo 中快速体验北极星的服务限流能力
* `compatibility/polaris/registry`: 在 dubbogo 中快速体验北极星的服务注册以及服务发现能力
* `compatibility/polaris/router`: 在 dubbogo 中快速体验北极星的服务路由能力
-* `compatibility/registry`:演示将 `etcd` / `Nacos` / `Zookeeper` 作为 Dubbo-go 注册中心的使用方法。
* `compatibility/rpc`:Dubbo 协议通信示例。
* `compatibility/rpc/dubbo`:Dubbo-go 3.0 下 Java 与 Go 的 RPC 示例。
* `compatibility/rpc/grpc`:基于 gRPC 的 Dubbo-go RPC 示例。
diff --git a/compatibility/registry/all/README.md b/compatibility/registry/all/README.md
deleted file mode 100644
index 9aa336c9..00000000
--- a/compatibility/registry/all/README.md
+++ /dev/null
@@ -1,29 +0,0 @@
-# Dubbo Go registry-type support all
-
-| 参数 | 注册方式 |
-|------------|------------|
-| interface | 接口级 |
-| service | 应用级 |
-| all | 应用级 && 接口级 |
-
-
-## 使用方法
-1. 启动 zk/nacos
-
-2. 启动服务端
- 将启动配置修改为: registry-type: all
-```shell
- cd registry/all/go-server
- DUBBO_GO_CONFIG_PATH=registry/all/nacos/go-server/conf/dubbogo.yml && go run server.go
- ```
-
-3. 启动客户端
- 由于服务注册方式支持双注册,客户端使用 service/interface 两种参数均可访问服务端
-```shell
- cd registry/all/go-client
- DUBBO_GO_CONFIG_PATH=registry/all/nacos/go-client/conf/dubbogo.yml && go run client.go
-```
-
-
-
-
diff --git a/compatibility/registry/all/nacos/go-client/cmd/client.go b/compatibility/registry/all/nacos/go-client/cmd/client.go
deleted file mode 100644
index b4bf116f..00000000
--- a/compatibility/registry/all/nacos/go-client/cmd/client.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package main
-
-import (
- "context"
-)
-
-import (
- "dubbo.apache.org/dubbo-go/v3/config"
- _ "dubbo.apache.org/dubbo-go/v3/imports"
-
- "github.com/dubbogo/gost/log/logger"
-)
-
-import (
- "github.com/apache/dubbo-go-samples/compatibility/api"
-)
-
-var grpcGreeterImpl = &api.GreeterClientImpl{}
-
-func init() {
- config.SetConsumerService(grpcGreeterImpl)
-}
-
-// export DUBBO_GO_CONFIG_PATH = PATH_TO_SAMPLES/registry/servicediscovery/zookeeper/go-client/conf/dubbogo.yml
-func main() {
- if err := config.Load(); err != nil {
- panic(err)
- }
-
- logger.Info("start to test dubbo")
- req := &api.HelloRequest{
- Name: "laurence",
- }
- reply, err := grpcGreeterImpl.SayHello(context.Background(), req)
- if err != nil {
- logger.Error(err)
- }
- logger.Infof("client response result: %v\n", reply)
-}
diff --git a/compatibility/registry/all/nacos/go-client/conf/dubbogo.yml b/compatibility/registry/all/nacos/go-client/conf/dubbogo.yml
deleted file mode 100644
index 33f1b37f..00000000
--- a/compatibility/registry/all/nacos/go-client/conf/dubbogo.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-dubbo:
- registries:
- demoZK:
- protocol: nacos
- address: 127.0.0.1:8848
- registry-type: service
- metadata-report:
- protocol: nacos
- address: 127.0.0.1:8848
- consumer:
- references:
- GreeterClientImpl:
- protocol: tri
- interface: com.apache.dubbo.sample.basic.IGreeter # must be compatible with grpc or dubbo-java
\ No newline at end of file
diff --git a/compatibility/registry/all/nacos/go-server/cmd/server.go b/compatibility/registry/all/nacos/go-server/cmd/server.go
deleted file mode 100644
index f069bbd1..00000000
--- a/compatibility/registry/all/nacos/go-server/cmd/server.go
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package main
-
-import (
- "context"
-)
-
-import (
- "dubbo.apache.org/dubbo-go/v3/config"
- _ "dubbo.apache.org/dubbo-go/v3/imports"
-
- "github.com/dubbogo/gost/log/logger"
-)
-
-import (
- "github.com/apache/dubbo-go-samples/compatibility/api"
-)
-
-type GreeterProvider struct {
- api.UnimplementedGreeterServer
-}
-
-func (s *GreeterProvider) SayHello(ctx context.Context, in *api.HelloRequest) (*api.User, error) {
- logger.Infof("Dubbo3 GreeterProvider get user request name = %s\n", in.Name)
- return &api.User{Name: "Hello " + in.Name, Id: "12345", Age: 21}, nil
-}
-
-// export DUBBO_GO_CONFIG_PATH = PATH_TO_SAMPLES/registry/servicediscovery/zookeeper/go-server/conf/dubbogo.yml
-func main() {
- config.SetProviderService(&GreeterProvider{})
- if err := config.Load(); err != nil {
- panic(err)
- }
- select {}
-}
diff --git a/compatibility/registry/all/nacos/go-server/conf/dubbogo.yml b/compatibility/registry/all/nacos/go-server/conf/dubbogo.yml
deleted file mode 100644
index e6823488..00000000
--- a/compatibility/registry/all/nacos/go-server/conf/dubbogo.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-dubbo:
- registries:
- demoZK:
- protocol: nacos
- address: 127.0.0.1:8848
- registry-type: all
- metadata-report:
- protocol: nacos
- address: 127.0.0.1:8848
- protocols:
- triple:
- name: tri
- port: 20000
- provider:
- services:
- GreeterProvider:
- interface: com.apache.dubbo.sample.basic.IGreeter # must be compatible with grpc or dubbo-java
\ No newline at end of file
diff --git a/compatibility/registry/all/zookeeper/go-client/cmd/client.go b/compatibility/registry/all/zookeeper/go-client/cmd/client.go
deleted file mode 100644
index b4bf116f..00000000
--- a/compatibility/registry/all/zookeeper/go-client/cmd/client.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package main
-
-import (
- "context"
-)
-
-import (
- "dubbo.apache.org/dubbo-go/v3/config"
- _ "dubbo.apache.org/dubbo-go/v3/imports"
-
- "github.com/dubbogo/gost/log/logger"
-)
-
-import (
- "github.com/apache/dubbo-go-samples/compatibility/api"
-)
-
-var grpcGreeterImpl = &api.GreeterClientImpl{}
-
-func init() {
- config.SetConsumerService(grpcGreeterImpl)
-}
-
-// export DUBBO_GO_CONFIG_PATH = PATH_TO_SAMPLES/registry/servicediscovery/zookeeper/go-client/conf/dubbogo.yml
-func main() {
- if err := config.Load(); err != nil {
- panic(err)
- }
-
- logger.Info("start to test dubbo")
- req := &api.HelloRequest{
- Name: "laurence",
- }
- reply, err := grpcGreeterImpl.SayHello(context.Background(), req)
- if err != nil {
- logger.Error(err)
- }
- logger.Infof("client response result: %v\n", reply)
-}
diff --git a/compatibility/registry/all/zookeeper/go-client/conf/dubbogo.yml b/compatibility/registry/all/zookeeper/go-client/conf/dubbogo.yml
deleted file mode 100644
index 5bc0fae9..00000000
--- a/compatibility/registry/all/zookeeper/go-client/conf/dubbogo.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-dubbo:
- registries:
- demoZK:
- protocol: zookeeper
- address: 127.0.0.1:2181
- registry-type: all
- metadata-report:
- protocol: zookeeper
- address: 127.0.0.1:2181
- consumer:
- registry-ids:
- - demoZK
- references:
- GreeterClientImpl:
- protocol: tri
- interface: com.apache.dubbo.sample.basic.IGreeter # must be compatible with grpc or dubbo-java
\ No newline at end of file
diff --git a/compatibility/registry/all/zookeeper/go-server/cmd/server.go b/compatibility/registry/all/zookeeper/go-server/cmd/server.go
deleted file mode 100644
index f069bbd1..00000000
--- a/compatibility/registry/all/zookeeper/go-server/cmd/server.go
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package main
-
-import (
- "context"
-)
-
-import (
- "dubbo.apache.org/dubbo-go/v3/config"
- _ "dubbo.apache.org/dubbo-go/v3/imports"
-
- "github.com/dubbogo/gost/log/logger"
-)
-
-import (
- "github.com/apache/dubbo-go-samples/compatibility/api"
-)
-
-type GreeterProvider struct {
- api.UnimplementedGreeterServer
-}
-
-func (s *GreeterProvider) SayHello(ctx context.Context, in *api.HelloRequest) (*api.User, error) {
- logger.Infof("Dubbo3 GreeterProvider get user request name = %s\n", in.Name)
- return &api.User{Name: "Hello " + in.Name, Id: "12345", Age: 21}, nil
-}
-
-// export DUBBO_GO_CONFIG_PATH = PATH_TO_SAMPLES/registry/servicediscovery/zookeeper/go-server/conf/dubbogo.yml
-func main() {
- config.SetProviderService(&GreeterProvider{})
- if err := config.Load(); err != nil {
- panic(err)
- }
- select {}
-}
diff --git a/compatibility/registry/all/zookeeper/go-server/conf/dubbogo.yml b/compatibility/registry/all/zookeeper/go-server/conf/dubbogo.yml
deleted file mode 100644
index 458ef444..00000000
--- a/compatibility/registry/all/zookeeper/go-server/conf/dubbogo.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-dubbo:
- registries:
- demoZK:
- protocol: zookeeper
- address: 127.0.0.1:2181
- registry-type: all
- metadata-report:
- protocol: zookeeper
- address: 127.0.0.1:2181
- protocols:
- triple:
- name: tri
- port: 20000
- provider:
- services:
- GreeterProvider:
- interface: com.apache.dubbo.sample.basic.IGreeter # must be compatible with grpc or dubbo-java
\ No newline at end of file
diff --git a/compatibility/registry/servicediscovery/nacos/go-client/cmd/client.go b/compatibility/registry/servicediscovery/nacos/go-client/cmd/client.go
deleted file mode 100644
index b4bf116f..00000000
--- a/compatibility/registry/servicediscovery/nacos/go-client/cmd/client.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package main
-
-import (
- "context"
-)
-
-import (
- "dubbo.apache.org/dubbo-go/v3/config"
- _ "dubbo.apache.org/dubbo-go/v3/imports"
-
- "github.com/dubbogo/gost/log/logger"
-)
-
-import (
- "github.com/apache/dubbo-go-samples/compatibility/api"
-)
-
-var grpcGreeterImpl = &api.GreeterClientImpl{}
-
-func init() {
- config.SetConsumerService(grpcGreeterImpl)
-}
-
-// export DUBBO_GO_CONFIG_PATH = PATH_TO_SAMPLES/registry/servicediscovery/zookeeper/go-client/conf/dubbogo.yml
-func main() {
- if err := config.Load(); err != nil {
- panic(err)
- }
-
- logger.Info("start to test dubbo")
- req := &api.HelloRequest{
- Name: "laurence",
- }
- reply, err := grpcGreeterImpl.SayHello(context.Background(), req)
- if err != nil {
- logger.Error(err)
- }
- logger.Infof("client response result: %v\n", reply)
-}
diff --git a/compatibility/registry/servicediscovery/nacos/go-client/conf/dubbogo.yml b/compatibility/registry/servicediscovery/nacos/go-client/conf/dubbogo.yml
deleted file mode 100644
index 33f1b37f..00000000
--- a/compatibility/registry/servicediscovery/nacos/go-client/conf/dubbogo.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-dubbo:
- registries:
- demoZK:
- protocol: nacos
- address: 127.0.0.1:8848
- registry-type: service
- metadata-report:
- protocol: nacos
- address: 127.0.0.1:8848
- consumer:
- references:
- GreeterClientImpl:
- protocol: tri
- interface: com.apache.dubbo.sample.basic.IGreeter # must be compatible with grpc or dubbo-java
\ No newline at end of file
diff --git a/compatibility/registry/servicediscovery/nacos/go-server/cmd/server.go b/compatibility/registry/servicediscovery/nacos/go-server/cmd/server.go
deleted file mode 100644
index f069bbd1..00000000
--- a/compatibility/registry/servicediscovery/nacos/go-server/cmd/server.go
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package main
-
-import (
- "context"
-)
-
-import (
- "dubbo.apache.org/dubbo-go/v3/config"
- _ "dubbo.apache.org/dubbo-go/v3/imports"
-
- "github.com/dubbogo/gost/log/logger"
-)
-
-import (
- "github.com/apache/dubbo-go-samples/compatibility/api"
-)
-
-type GreeterProvider struct {
- api.UnimplementedGreeterServer
-}
-
-func (s *GreeterProvider) SayHello(ctx context.Context, in *api.HelloRequest) (*api.User, error) {
- logger.Infof("Dubbo3 GreeterProvider get user request name = %s\n", in.Name)
- return &api.User{Name: "Hello " + in.Name, Id: "12345", Age: 21}, nil
-}
-
-// export DUBBO_GO_CONFIG_PATH = PATH_TO_SAMPLES/registry/servicediscovery/zookeeper/go-server/conf/dubbogo.yml
-func main() {
- config.SetProviderService(&GreeterProvider{})
- if err := config.Load(); err != nil {
- panic(err)
- }
- select {}
-}
diff --git a/compatibility/registry/servicediscovery/nacos/go-server/conf/dubbogo.yml b/compatibility/registry/servicediscovery/nacos/go-server/conf/dubbogo.yml
deleted file mode 100644
index 8262ef14..00000000
--- a/compatibility/registry/servicediscovery/nacos/go-server/conf/dubbogo.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-dubbo:
- registries:
- demoZK:
- protocol: nacos
- address: 127.0.0.1:8848
- registry-type: service
- metadata-report:
- protocol: nacos
- address: 127.0.0.1:8848
- protocols:
- triple:
- name: tri
- port: 20000
- provider:
- services:
- GreeterProvider:
- interface: com.apache.dubbo.sample.basic.IGreeter # must be compatible with grpc or dubbo-java
\ No newline at end of file
diff --git a/compatibility/registry/servicediscovery/zookeeper/go-client/cmd/client.go b/compatibility/registry/servicediscovery/zookeeper/go-client/cmd/client.go
deleted file mode 100644
index b4bf116f..00000000
--- a/compatibility/registry/servicediscovery/zookeeper/go-client/cmd/client.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package main
-
-import (
- "context"
-)
-
-import (
- "dubbo.apache.org/dubbo-go/v3/config"
- _ "dubbo.apache.org/dubbo-go/v3/imports"
-
- "github.com/dubbogo/gost/log/logger"
-)
-
-import (
- "github.com/apache/dubbo-go-samples/compatibility/api"
-)
-
-var grpcGreeterImpl = &api.GreeterClientImpl{}
-
-func init() {
- config.SetConsumerService(grpcGreeterImpl)
-}
-
-// export DUBBO_GO_CONFIG_PATH = PATH_TO_SAMPLES/registry/servicediscovery/zookeeper/go-client/conf/dubbogo.yml
-func main() {
- if err := config.Load(); err != nil {
- panic(err)
- }
-
- logger.Info("start to test dubbo")
- req := &api.HelloRequest{
- Name: "laurence",
- }
- reply, err := grpcGreeterImpl.SayHello(context.Background(), req)
- if err != nil {
- logger.Error(err)
- }
- logger.Infof("client response result: %v\n", reply)
-}
diff --git a/compatibility/registry/servicediscovery/zookeeper/go-client/conf/dubbogo.yml b/compatibility/registry/servicediscovery/zookeeper/go-client/conf/dubbogo.yml
deleted file mode 100644
index 0b48ca68..00000000
--- a/compatibility/registry/servicediscovery/zookeeper/go-client/conf/dubbogo.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-dubbo:
- registries:
- demoZK:
- protocol: zookeeper
- address: 127.0.0.1:2181
- registry-type: service
- metadata-report:
- protocol: zookeeper
- address: 127.0.0.1:2181
- consumer:
- registry-ids:
- - demoZK
- references:
- GreeterClientImpl:
- protocol: tri
- interface: com.apache.dubbo.sample.basic.IGreeter # must be compatible with grpc or dubbo-java
\ No newline at end of file
diff --git a/compatibility/registry/servicediscovery/zookeeper/go-server/cmd/server.go b/compatibility/registry/servicediscovery/zookeeper/go-server/cmd/server.go
deleted file mode 100644
index f069bbd1..00000000
--- a/compatibility/registry/servicediscovery/zookeeper/go-server/cmd/server.go
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package main
-
-import (
- "context"
-)
-
-import (
- "dubbo.apache.org/dubbo-go/v3/config"
- _ "dubbo.apache.org/dubbo-go/v3/imports"
-
- "github.com/dubbogo/gost/log/logger"
-)
-
-import (
- "github.com/apache/dubbo-go-samples/compatibility/api"
-)
-
-type GreeterProvider struct {
- api.UnimplementedGreeterServer
-}
-
-func (s *GreeterProvider) SayHello(ctx context.Context, in *api.HelloRequest) (*api.User, error) {
- logger.Infof("Dubbo3 GreeterProvider get user request name = %s\n", in.Name)
- return &api.User{Name: "Hello " + in.Name, Id: "12345", Age: 21}, nil
-}
-
-// export DUBBO_GO_CONFIG_PATH = PATH_TO_SAMPLES/registry/servicediscovery/zookeeper/go-server/conf/dubbogo.yml
-func main() {
- config.SetProviderService(&GreeterProvider{})
- if err := config.Load(); err != nil {
- panic(err)
- }
- select {}
-}
diff --git a/compatibility/registry/servicediscovery/zookeeper/go-server/conf/dubbogo.yml b/compatibility/registry/servicediscovery/zookeeper/go-server/conf/dubbogo.yml
deleted file mode 100644
index 71b2bdcd..00000000
--- a/compatibility/registry/servicediscovery/zookeeper/go-server/conf/dubbogo.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-dubbo:
- registries:
- demoZK:
- protocol: zookeeper
- address: 127.0.0.1:2181
- registry-type: service
- metadata-report:
- protocol: zookeeper
- address: 127.0.0.1:2181
- protocols:
- triple:
- name: tri
- port: 20000
- provider:
- services:
- GreeterProvider:
- interface: com.apache.dubbo.sample.basic.IGreeter # must be compatible with grpc or dubbo-java
\ No newline at end of file
diff --git a/compatibility/registry/servicediscovery/zookeeper/java-client/build/generated/source/proto/main/java/org/apache/dubbo/sample/hello/Helloworld.java b/compatibility/registry/servicediscovery/zookeeper/java-client/build/generated/source/proto/main/java/org/apache/dubbo/sample/hello/Helloworld.java
deleted file mode 100644
index 99758ac1..00000000
--- a/compatibility/registry/servicediscovery/zookeeper/java-client/build/generated/source/proto/main/java/org/apache/dubbo/sample/hello/Helloworld.java
+++ /dev/null
@@ -1,1432 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: helloworld.proto
-
-package org.apache.dubbo.sample.hello;
-
-public final class Helloworld {
- private Helloworld() {}
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistryLite registry) {
- }
-
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistry registry) {
- registerAllExtensions(
- (com.google.protobuf.ExtensionRegistryLite) registry);
- }
- public interface HelloRequestOrBuilder extends
- // @@protoc_insertion_point(interface_extends:helloworld.HelloRequest)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * <code>string name = 1;</code>
- * @return The name.
- */
- java.lang.String getName();
- /**
- * <code>string name = 1;</code>
- * @return The bytes for name.
- */
- com.google.protobuf.ByteString
- getNameBytes();
- }
- /**
- * <pre>
- * The request message containing the user's name.
- * </pre>
- *
- * Protobuf type {@code helloworld.HelloRequest}
- */
- public static final class HelloRequest extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:helloworld.HelloRequest)
- HelloRequestOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use HelloRequest.newBuilder() to construct.
- private HelloRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
- super(builder);
- }
- private HelloRequest() {
- name_ = "";
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new HelloRequest();
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private HelloRequest(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10: {
- java.lang.String s = input.readStringRequireUtf8();
-
- name_ = s;
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.apache.dubbo.sample.hello.Helloworld.internal_static_helloworld_HelloRequest_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.apache.dubbo.sample.hello.Helloworld.internal_static_helloworld_HelloRequest_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.apache.dubbo.sample.hello.Helloworld.HelloRequest.class, org.apache.dubbo.sample.hello.Helloworld.HelloRequest.Builder.class);
- }
-
- public static final int NAME_FIELD_NUMBER = 1;
- private volatile java.lang.Object name_;
- /**
- * <code>string name = 1;</code>
- * @return The name.
- */
- @java.lang.Override
- public java.lang.String getName() {
- java.lang.Object ref = name_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- name_ = s;
- return s;
- }
- }
- /**
- * <code>string name = 1;</code>
- * @return The bytes for name.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getNameBytes() {
- java.lang.Object ref = name_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- name_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- private byte memoizedIsInitialized = -1;
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (!getNameBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
- }
- unknownFields.writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!getNameBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
- }
- size += unknownFields.getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof org.apache.dubbo.sample.hello.Helloworld.HelloRequest)) {
- return super.equals(obj);
- }
- org.apache.dubbo.sample.hello.Helloworld.HelloRequest other = (org.apache.dubbo.sample.hello.Helloworld.HelloRequest) obj;
-
- if (!getName()
- .equals(other.getName())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
- return true;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + NAME_FIELD_NUMBER;
- hash = (53 * hash) + getName().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static org.apache.dubbo.sample.hello.Helloworld.HelloRequest parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.HelloRequest parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.HelloRequest parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.HelloRequest parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.HelloRequest parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.HelloRequest parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.HelloRequest parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.HelloRequest parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.HelloRequest parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.HelloRequest parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.HelloRequest parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.HelloRequest parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @java.lang.Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(org.apache.dubbo.sample.hello.Helloworld.HelloRequest prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @java.lang.Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * <pre>
- * The request message containing the user's name.
- * </pre>
- *
- * Protobuf type {@code helloworld.HelloRequest}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
- // @@protoc_insertion_point(builder_implements:helloworld.HelloRequest)
- org.apache.dubbo.sample.hello.Helloworld.HelloRequestOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.apache.dubbo.sample.hello.Helloworld.internal_static_helloworld_HelloRequest_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.apache.dubbo.sample.hello.Helloworld.internal_static_helloworld_HelloRequest_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.apache.dubbo.sample.hello.Helloworld.HelloRequest.class, org.apache.dubbo.sample.hello.Helloworld.HelloRequest.Builder.class);
- }
-
- // Construct using org.apache.dubbo.sample.hello.Helloworld.HelloRequest.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- }
- }
- @java.lang.Override
- public Builder clear() {
- super.clear();
- name_ = "";
-
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.apache.dubbo.sample.hello.Helloworld.internal_static_helloworld_HelloRequest_descriptor;
- }
-
- @java.lang.Override
- public org.apache.dubbo.sample.hello.Helloworld.HelloRequest getDefaultInstanceForType() {
- return org.apache.dubbo.sample.hello.Helloworld.HelloRequest.getDefaultInstance();
- }
-
- @java.lang.Override
- public org.apache.dubbo.sample.hello.Helloworld.HelloRequest build() {
- org.apache.dubbo.sample.hello.Helloworld.HelloRequest result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public org.apache.dubbo.sample.hello.Helloworld.HelloRequest buildPartial() {
- org.apache.dubbo.sample.hello.Helloworld.HelloRequest result = new org.apache.dubbo.sample.hello.Helloworld.HelloRequest(this);
- result.name_ = name_;
- onBuilt();
- return result;
- }
-
- @java.lang.Override
- public Builder clone() {
- return super.clone();
- }
- @java.lang.Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.setField(field, value);
- }
- @java.lang.Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @java.lang.Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @java.lang.Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, java.lang.Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @java.lang.Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.addRepeatedField(field, value);
- }
- @java.lang.Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.apache.dubbo.sample.hello.Helloworld.HelloRequest) {
- return mergeFrom((org.apache.dubbo.sample.hello.Helloworld.HelloRequest)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.apache.dubbo.sample.hello.Helloworld.HelloRequest other) {
- if (other == org.apache.dubbo.sample.hello.Helloworld.HelloRequest.getDefaultInstance()) return this;
- if (!other.getName().isEmpty()) {
- name_ = other.name_;
- onChanged();
- }
- this.mergeUnknownFields(other.unknownFields);
- onChanged();
- return this;
- }
-
- @java.lang.Override
- public final boolean isInitialized() {
- return true;
- }
-
- @java.lang.Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- org.apache.dubbo.sample.hello.Helloworld.HelloRequest parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.apache.dubbo.sample.hello.Helloworld.HelloRequest) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private java.lang.Object name_ = "";
- /**
- * <code>string name = 1;</code>
- * @return The name.
- */
- public java.lang.String getName() {
- java.lang.Object ref = name_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- name_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * <code>string name = 1;</code>
- * @return The bytes for name.
- */
- public com.google.protobuf.ByteString
- getNameBytes() {
- java.lang.Object ref = name_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- name_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * <code>string name = 1;</code>
- * @param value The name to set.
- * @return This builder for chaining.
- */
- public Builder setName(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- name_ = value;
- onChanged();
- return this;
- }
- /**
- * <code>string name = 1;</code>
- * @return This builder for chaining.
- */
- public Builder clearName() {
-
- name_ = getDefaultInstance().getName();
- onChanged();
- return this;
- }
- /**
- * <code>string name = 1;</code>
- * @param value The bytes for name to set.
- * @return This builder for chaining.
- */
- public Builder setNameBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- name_ = value;
- onChanged();
- return this;
- }
- @java.lang.Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @java.lang.Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:helloworld.HelloRequest)
- }
-
- // @@protoc_insertion_point(class_scope:helloworld.HelloRequest)
- private static final org.apache.dubbo.sample.hello.Helloworld.HelloRequest DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new org.apache.dubbo.sample.hello.Helloworld.HelloRequest();
- }
-
- public static org.apache.dubbo.sample.hello.Helloworld.HelloRequest getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser<HelloRequest>
- PARSER = new com.google.protobuf.AbstractParser<HelloRequest>() {
- @java.lang.Override
- public HelloRequest parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new HelloRequest(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser<HelloRequest> parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser<HelloRequest> getParserForType() {
- return PARSER;
- }
-
- @java.lang.Override
- public org.apache.dubbo.sample.hello.Helloworld.HelloRequest getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface UserOrBuilder extends
- // @@protoc_insertion_point(interface_extends:helloworld.User)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * <code>string name = 1;</code>
- * @return The name.
- */
- java.lang.String getName();
- /**
- * <code>string name = 1;</code>
- * @return The bytes for name.
- */
- com.google.protobuf.ByteString
- getNameBytes();
-
- /**
- * <code>string id = 2;</code>
- * @return The id.
- */
- java.lang.String getId();
- /**
- * <code>string id = 2;</code>
- * @return The bytes for id.
- */
- com.google.protobuf.ByteString
- getIdBytes();
-
- /**
- * <code>int32 age = 3;</code>
- * @return The age.
- */
- int getAge();
- }
- /**
- * <pre>
- * The response message containing the greetings
- * </pre>
- *
- * Protobuf type {@code helloworld.User}
- */
- public static final class User extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:helloworld.User)
- UserOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use User.newBuilder() to construct.
- private User(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
- super(builder);
- }
- private User() {
- name_ = "";
- id_ = "";
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new User();
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private User(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10: {
- java.lang.String s = input.readStringRequireUtf8();
-
- name_ = s;
- break;
- }
- case 18: {
- java.lang.String s = input.readStringRequireUtf8();
-
- id_ = s;
- break;
- }
- case 24: {
-
- age_ = input.readInt32();
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.apache.dubbo.sample.hello.Helloworld.internal_static_helloworld_User_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.apache.dubbo.sample.hello.Helloworld.internal_static_helloworld_User_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.apache.dubbo.sample.hello.Helloworld.User.class, org.apache.dubbo.sample.hello.Helloworld.User.Builder.class);
- }
-
- public static final int NAME_FIELD_NUMBER = 1;
- private volatile java.lang.Object name_;
- /**
- * <code>string name = 1;</code>
- * @return The name.
- */
- @java.lang.Override
- public java.lang.String getName() {
- java.lang.Object ref = name_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- name_ = s;
- return s;
- }
- }
- /**
- * <code>string name = 1;</code>
- * @return The bytes for name.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getNameBytes() {
- java.lang.Object ref = name_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- name_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int ID_FIELD_NUMBER = 2;
- private volatile java.lang.Object id_;
- /**
- * <code>string id = 2;</code>
- * @return The id.
- */
- @java.lang.Override
- public java.lang.String getId() {
- java.lang.Object ref = id_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- id_ = s;
- return s;
- }
- }
- /**
- * <code>string id = 2;</code>
- * @return The bytes for id.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getIdBytes() {
- java.lang.Object ref = id_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- id_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int AGE_FIELD_NUMBER = 3;
- private int age_;
- /**
- * <code>int32 age = 3;</code>
- * @return The age.
- */
- @java.lang.Override
- public int getAge() {
- return age_;
- }
-
- private byte memoizedIsInitialized = -1;
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (!getNameBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
- }
- if (!getIdBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_);
- }
- if (age_ != 0) {
- output.writeInt32(3, age_);
- }
- unknownFields.writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!getNameBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
- }
- if (!getIdBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_);
- }
- if (age_ != 0) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(3, age_);
- }
- size += unknownFields.getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof org.apache.dubbo.sample.hello.Helloworld.User)) {
- return super.equals(obj);
- }
- org.apache.dubbo.sample.hello.Helloworld.User other = (org.apache.dubbo.sample.hello.Helloworld.User) obj;
-
- if (!getName()
- .equals(other.getName())) return false;
- if (!getId()
- .equals(other.getId())) return false;
- if (getAge()
- != other.getAge()) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
- return true;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + NAME_FIELD_NUMBER;
- hash = (53 * hash) + getName().hashCode();
- hash = (37 * hash) + ID_FIELD_NUMBER;
- hash = (53 * hash) + getId().hashCode();
- hash = (37 * hash) + AGE_FIELD_NUMBER;
- hash = (53 * hash) + getAge();
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static org.apache.dubbo.sample.hello.Helloworld.User parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.User parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.User parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.User parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.User parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.User parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.User parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.User parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.User parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.User parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.User parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.User parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @java.lang.Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(org.apache.dubbo.sample.hello.Helloworld.User prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @java.lang.Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * <pre>
- * The response message containing the greetings
- * </pre>
- *
- * Protobuf type {@code helloworld.User}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
- // @@protoc_insertion_point(builder_implements:helloworld.User)
- org.apache.dubbo.sample.hello.Helloworld.UserOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.apache.dubbo.sample.hello.Helloworld.internal_static_helloworld_User_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.apache.dubbo.sample.hello.Helloworld.internal_static_helloworld_User_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.apache.dubbo.sample.hello.Helloworld.User.class, org.apache.dubbo.sample.hello.Helloworld.User.Builder.class);
- }
-
- // Construct using org.apache.dubbo.sample.hello.Helloworld.User.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- }
- }
- @java.lang.Override
- public Builder clear() {
- super.clear();
- name_ = "";
-
- id_ = "";
-
- age_ = 0;
-
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.apache.dubbo.sample.hello.Helloworld.internal_static_helloworld_User_descriptor;
- }
-
- @java.lang.Override
- public org.apache.dubbo.sample.hello.Helloworld.User getDefaultInstanceForType() {
- return org.apache.dubbo.sample.hello.Helloworld.User.getDefaultInstance();
- }
-
- @java.lang.Override
- public org.apache.dubbo.sample.hello.Helloworld.User build() {
- org.apache.dubbo.sample.hello.Helloworld.User result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public org.apache.dubbo.sample.hello.Helloworld.User buildPartial() {
- org.apache.dubbo.sample.hello.Helloworld.User result = new org.apache.dubbo.sample.hello.Helloworld.User(this);
- result.name_ = name_;
- result.id_ = id_;
- result.age_ = age_;
- onBuilt();
- return result;
- }
-
- @java.lang.Override
- public Builder clone() {
- return super.clone();
- }
- @java.lang.Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.setField(field, value);
- }
- @java.lang.Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @java.lang.Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @java.lang.Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, java.lang.Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @java.lang.Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.addRepeatedField(field, value);
- }
- @java.lang.Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.apache.dubbo.sample.hello.Helloworld.User) {
- return mergeFrom((org.apache.dubbo.sample.hello.Helloworld.User)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.apache.dubbo.sample.hello.Helloworld.User other) {
- if (other == org.apache.dubbo.sample.hello.Helloworld.User.getDefaultInstance()) return this;
- if (!other.getName().isEmpty()) {
- name_ = other.name_;
- onChanged();
- }
- if (!other.getId().isEmpty()) {
- id_ = other.id_;
- onChanged();
- }
- if (other.getAge() != 0) {
- setAge(other.getAge());
- }
- this.mergeUnknownFields(other.unknownFields);
- onChanged();
- return this;
- }
-
- @java.lang.Override
- public final boolean isInitialized() {
- return true;
- }
-
- @java.lang.Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- org.apache.dubbo.sample.hello.Helloworld.User parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.apache.dubbo.sample.hello.Helloworld.User) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private java.lang.Object name_ = "";
- /**
- * <code>string name = 1;</code>
- * @return The name.
- */
- public java.lang.String getName() {
- java.lang.Object ref = name_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- name_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * <code>string name = 1;</code>
- * @return The bytes for name.
- */
- public com.google.protobuf.ByteString
- getNameBytes() {
- java.lang.Object ref = name_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- name_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * <code>string name = 1;</code>
- * @param value The name to set.
- * @return This builder for chaining.
- */
- public Builder setName(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- name_ = value;
- onChanged();
- return this;
- }
- /**
- * <code>string name = 1;</code>
- * @return This builder for chaining.
- */
- public Builder clearName() {
-
- name_ = getDefaultInstance().getName();
- onChanged();
- return this;
- }
- /**
- * <code>string name = 1;</code>
- * @param value The bytes for name to set.
- * @return This builder for chaining.
- */
- public Builder setNameBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- name_ = value;
- onChanged();
- return this;
- }
-
- private java.lang.Object id_ = "";
- /**
- * <code>string id = 2;</code>
- * @return The id.
- */
- public java.lang.String getId() {
- java.lang.Object ref = id_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- id_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * <code>string id = 2;</code>
- * @return The bytes for id.
- */
- public com.google.protobuf.ByteString
- getIdBytes() {
- java.lang.Object ref = id_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- id_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * <code>string id = 2;</code>
- * @param value The id to set.
- * @return This builder for chaining.
- */
- public Builder setId(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- id_ = value;
- onChanged();
- return this;
- }
- /**
- * <code>string id = 2;</code>
- * @return This builder for chaining.
- */
- public Builder clearId() {
-
- id_ = getDefaultInstance().getId();
- onChanged();
- return this;
- }
- /**
- * <code>string id = 2;</code>
- * @param value The bytes for id to set.
- * @return This builder for chaining.
- */
- public Builder setIdBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- id_ = value;
- onChanged();
- return this;
- }
-
- private int age_ ;
- /**
- * <code>int32 age = 3;</code>
- * @return The age.
- */
- @java.lang.Override
- public int getAge() {
- return age_;
- }
- /**
- * <code>int32 age = 3;</code>
- * @param value The age to set.
- * @return This builder for chaining.
- */
- public Builder setAge(int value) {
-
- age_ = value;
- onChanged();
- return this;
- }
- /**
- * <code>int32 age = 3;</code>
- * @return This builder for chaining.
- */
- public Builder clearAge() {
-
- age_ = 0;
- onChanged();
- return this;
- }
- @java.lang.Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @java.lang.Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:helloworld.User)
- }
-
- // @@protoc_insertion_point(class_scope:helloworld.User)
- private static final org.apache.dubbo.sample.hello.Helloworld.User DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new org.apache.dubbo.sample.hello.Helloworld.User();
- }
-
- public static org.apache.dubbo.sample.hello.Helloworld.User getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser<User>
- PARSER = new com.google.protobuf.AbstractParser<User>() {
- @java.lang.Override
- public User parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new User(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser<User> parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser<User> getParserForType() {
- return PARSER;
- }
-
- @java.lang.Override
- public org.apache.dubbo.sample.hello.Helloworld.User getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_helloworld_HelloRequest_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_helloworld_HelloRequest_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_helloworld_User_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_helloworld_User_fieldAccessorTable;
-
- public static com.google.protobuf.Descriptors.FileDescriptor
- getDescriptor() {
- return descriptor;
- }
- private static com.google.protobuf.Descriptors.FileDescriptor
- descriptor;
- static {
- java.lang.String[] descriptorData = {
- "\n\020helloworld.proto\022\nhelloworld\"\034\n\014HelloR" +
- "equest\022\014\n\004name\030\001 \001(\t\"-\n\004User\022\014\n\004name\030\001 \001" +
- "(\t\022\n\n\002id\030\002 \001(\t\022\013\n\003age\030\003 \001(\005B\037\n\035org.apach" +
- "e.dubbo.sample.hellob\006proto3"
- };
- descriptor = com.google.protobuf.Descriptors.FileDescriptor
- .internalBuildGeneratedFileFrom(descriptorData,
- new com.google.protobuf.Descriptors.FileDescriptor[] {
- });
- internal_static_helloworld_HelloRequest_descriptor =
- getDescriptor().getMessageTypes().get(0);
- internal_static_helloworld_HelloRequest_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_helloworld_HelloRequest_descriptor,
- new java.lang.String[] { "Name", });
- internal_static_helloworld_User_descriptor =
- getDescriptor().getMessageTypes().get(1);
- internal_static_helloworld_User_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_helloworld_User_descriptor,
- new java.lang.String[] { "Name", "Id", "Age", });
- }
-
- // @@protoc_insertion_point(outer_class_scope)
-}
diff --git a/compatibility/registry/servicediscovery/zookeeper/java-client/pom.xml b/compatibility/registry/servicediscovery/zookeeper/java-client/pom.xml
deleted file mode 100644
index 4d929a32..00000000
--- a/compatibility/registry/servicediscovery/zookeeper/java-client/pom.xml
+++ /dev/null
@@ -1,162 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>com.apache.dubbogo</groupId>
- <version>1.0-SNAPSHOT</version>
- <artifactId>dubbo-samples-triple-client</artifactId>
-
- <properties>
- <source.level>1.8</source.level>
- <target.level>1.8</target.level>
- <dubbo.version>3.0.13</dubbo.version>
- <junit.version>4.13.1</junit.version>
- <spring-test.version>4.3.16.RELEASE</spring-test.version>
- <maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
- <maven-failsafe-plugin.version>2.21.0</maven-failsafe-plugin.version>
- <spring-boot.version>1.5.13.RELEASE</spring-boot.version>
- <grpc.version>1.19.0</grpc.version>
- <protoc.version>3.7.1</protoc.version>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo</artifactId>
- <version>${dubbo.version}</version>
- </dependency>
- <dependency>
- <groupId>com.google.protobuf</groupId>
- <artifactId>protobuf-java</artifactId>
- <version>3.25.5</version>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-dependencies-zookeeper</artifactId>
- <version>${dubbo.version}</version>
- <type>pom</type>
- <exclusions>
- <exclusion>
- <groupId>org.apache.zookeeper</groupId>
- <artifactId>zookeeper</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.zookeeper</groupId>
- <artifactId>zookeeper</artifactId>
- <version>3.7.2</version>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>${junit.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-test</artifactId>
- <version>${spring-test.version}</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.testcontainers</groupId>
- <artifactId>testcontainers</artifactId>
- <version>1.12.3</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <profiles>
- <!-- For jdk 11 above JavaEE annotation -->
- <profile>
- <id>javax.annotation</id>
- <activation>
- <jdk>[1.11,)</jdk>
- </activation>
- <dependencies>
- <dependency>
- <groupId>javax.annotation</groupId>
- <artifactId>javax.annotation-api</artifactId>
- <version>1.3.2</version>
- </dependency>
- </dependencies>
- </profile>
- </profiles>
-
- <build>
- <extensions>
- <extension>
- <groupId>kr.motd.maven</groupId>
- <artifactId>os-maven-plugin</artifactId>
- <version>1.6.1</version>
- </extension>
- </extensions>
- <plugins>
- <plugin>
- <groupId>org.xolstice.maven.plugins</groupId>
- <artifactId>protobuf-maven-plugin</artifactId>
- <version>0.6.1</version>
- <configuration>
- <protocArtifact>com.google.protobuf:protoc:3.17.3:exe:${os.detected.classifier}</protocArtifact>
- <pluginId>triple-java</pluginId>
- <outputDirectory>build/generated/source/proto/main/java</outputDirectory>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>compile</goal>
- <goal>test-compile</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>${maven-compiler-plugin.version}</version>
- <configuration>
- <source>${source.level}</source>
- <target>${target.level}</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>build/generated/source/proto/main/java</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
-</project>
\ No newline at end of file
diff --git a/compatibility/registry/servicediscovery/zookeeper/java-client/run.sh b/compatibility/registry/servicediscovery/zookeeper/java-client/run.sh
deleted file mode 100644
index 35d815ae..00000000
--- a/compatibility/registry/servicediscovery/zookeeper/java-client/run.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-mvn install -DSkipTests
-mvn exec:java -Dexec.mainClass="com.apache.dubbo.sample.basic.ApiConsumer"
\ No newline at end of file
diff --git a/compatibility/registry/servicediscovery/zookeeper/java-client/src/main/java/com/apache/dubbo/sample/basic/ApiConsumer.java b/compatibility/registry/servicediscovery/zookeeper/java-client/src/main/java/com/apache/dubbo/sample/basic/ApiConsumer.java
deleted file mode 100644
index baf093f7..00000000
--- a/compatibility/registry/servicediscovery/zookeeper/java-client/src/main/java/com/apache/dubbo/sample/basic/ApiConsumer.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.apache.dubbo.sample.basic;
-
-import org.apache.dubbo.common.constants.CommonConstants;
-import org.apache.dubbo.config.ApplicationConfig;
-import org.apache.dubbo.config.ReferenceConfig;
-import org.apache.dubbo.config.RegistryConfig;
-import org.apache.dubbo.sample.hello.Helloworld;
-import org.apache.dubbo.config.bootstrap.DubboBootstrap;
-
-import java.io.IOException;
-import java.util.concurrent.TimeUnit;
-
-public class ApiConsumer {
- public static void main(String[] args) throws InterruptedException, IOException {
- ReferenceConfig<IGreeter> ref = new ReferenceConfig<>();
- ref.setInterface(IGreeter.class);
- ref.setCheck(false);
- ref.setProtocol(CommonConstants.TRIPLE);
- ref.setLazy(true);
- ref.setTimeout(100000);
-
- DubboBootstrap bootstrap = DubboBootstrap.getInstance();
- bootstrap.application(new ApplicationConfig("demo-consumer"))
- .registry(new RegistryConfig("zookeeper://127.0.0.1:2181"))
- .reference(ref)
- .start();
-
- final IGreeter iGreeter = ref.get();
- System.out.println("dubbo ref started");
- Helloworld.HelloRequest req = Helloworld.HelloRequest.newBuilder().setName("laurence").build();
- try {
- final Helloworld.User reply = iGreeter.sayHello(req);
- TimeUnit.SECONDS.sleep(1);
- System.out.println("Reply:" + reply);
- } catch (Throwable t) {
- t.printStackTrace();
- }
- System.in.read();
- }
-}
diff --git a/compatibility/registry/servicediscovery/zookeeper/java-client/src/main/java/com/apache/dubbo/sample/basic/IGreeter.java b/compatibility/registry/servicediscovery/zookeeper/java-client/src/main/java/com/apache/dubbo/sample/basic/IGreeter.java
deleted file mode 100644
index 8722f2c9..00000000
--- a/compatibility/registry/servicediscovery/zookeeper/java-client/src/main/java/com/apache/dubbo/sample/basic/IGreeter.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.apache.dubbo.sample.basic;
-
-
-import org.apache.dubbo.sample.hello.Helloworld;
-
-public interface IGreeter {
- /**
- * <pre>
- * Sends a greeting
- * </pre>
- */
- Helloworld.User sayHello(Helloworld.HelloRequest request);
-
-}
diff --git a/compatibility/registry/servicediscovery/zookeeper/java-client/src/main/proto/helloworld.proto b/compatibility/registry/servicediscovery/zookeeper/java-client/src/main/proto/helloworld.proto
deleted file mode 100644
index ee6ca29b..00000000
--- a/compatibility/registry/servicediscovery/zookeeper/java-client/src/main/proto/helloworld.proto
+++ /dev/null
@@ -1,28 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-syntax = "proto3";
-
-option java_package = "org.apache.dubbo.sample.hello";
-
-package helloworld;
-
-// The request message containing the user's name.
-message HelloRequest {
- string name = 1;
-}
-
-// The response message containing the greetings
-message User {
- string name = 1;
- string id = 2;
- int32 age = 3;
-}
diff --git a/compatibility/registry/servicediscovery/zookeeper/java-client/src/main/resources/log4j.properties b/compatibility/registry/servicediscovery/zookeeper/java-client/src/main/resources/log4j.properties
deleted file mode 100644
index 6b82abab..00000000
--- a/compatibility/registry/servicediscovery/zookeeper/java-client/src/main/resources/log4j.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-
-###set log levels###
-log4j.rootLogger=debug, stdout
-###output to the console###
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.Target=System.out
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=[%d{dd/MM/yy hh:mm:ss:sss z}] %t %5p %c{2}: %m%n
\ No newline at end of file
diff --git a/compatibility/registry/servicediscovery/zookeeper/java-server/build/generated/source/proto/main/java/org/apache/dubbo/sample/hello/Helloworld.java b/compatibility/registry/servicediscovery/zookeeper/java-server/build/generated/source/proto/main/java/org/apache/dubbo/sample/hello/Helloworld.java
deleted file mode 100644
index 99758ac1..00000000
--- a/compatibility/registry/servicediscovery/zookeeper/java-server/build/generated/source/proto/main/java/org/apache/dubbo/sample/hello/Helloworld.java
+++ /dev/null
@@ -1,1432 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: helloworld.proto
-
-package org.apache.dubbo.sample.hello;
-
-public final class Helloworld {
- private Helloworld() {}
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistryLite registry) {
- }
-
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistry registry) {
- registerAllExtensions(
- (com.google.protobuf.ExtensionRegistryLite) registry);
- }
- public interface HelloRequestOrBuilder extends
- // @@protoc_insertion_point(interface_extends:helloworld.HelloRequest)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * <code>string name = 1;</code>
- * @return The name.
- */
- java.lang.String getName();
- /**
- * <code>string name = 1;</code>
- * @return The bytes for name.
- */
- com.google.protobuf.ByteString
- getNameBytes();
- }
- /**
- * <pre>
- * The request message containing the user's name.
- * </pre>
- *
- * Protobuf type {@code helloworld.HelloRequest}
- */
- public static final class HelloRequest extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:helloworld.HelloRequest)
- HelloRequestOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use HelloRequest.newBuilder() to construct.
- private HelloRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
- super(builder);
- }
- private HelloRequest() {
- name_ = "";
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new HelloRequest();
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private HelloRequest(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10: {
- java.lang.String s = input.readStringRequireUtf8();
-
- name_ = s;
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.apache.dubbo.sample.hello.Helloworld.internal_static_helloworld_HelloRequest_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.apache.dubbo.sample.hello.Helloworld.internal_static_helloworld_HelloRequest_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.apache.dubbo.sample.hello.Helloworld.HelloRequest.class, org.apache.dubbo.sample.hello.Helloworld.HelloRequest.Builder.class);
- }
-
- public static final int NAME_FIELD_NUMBER = 1;
- private volatile java.lang.Object name_;
- /**
- * <code>string name = 1;</code>
- * @return The name.
- */
- @java.lang.Override
- public java.lang.String getName() {
- java.lang.Object ref = name_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- name_ = s;
- return s;
- }
- }
- /**
- * <code>string name = 1;</code>
- * @return The bytes for name.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getNameBytes() {
- java.lang.Object ref = name_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- name_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- private byte memoizedIsInitialized = -1;
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (!getNameBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
- }
- unknownFields.writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!getNameBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
- }
- size += unknownFields.getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof org.apache.dubbo.sample.hello.Helloworld.HelloRequest)) {
- return super.equals(obj);
- }
- org.apache.dubbo.sample.hello.Helloworld.HelloRequest other = (org.apache.dubbo.sample.hello.Helloworld.HelloRequest) obj;
-
- if (!getName()
- .equals(other.getName())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
- return true;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + NAME_FIELD_NUMBER;
- hash = (53 * hash) + getName().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static org.apache.dubbo.sample.hello.Helloworld.HelloRequest parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.HelloRequest parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.HelloRequest parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.HelloRequest parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.HelloRequest parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.HelloRequest parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.HelloRequest parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.HelloRequest parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.HelloRequest parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.HelloRequest parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.HelloRequest parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.HelloRequest parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @java.lang.Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(org.apache.dubbo.sample.hello.Helloworld.HelloRequest prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @java.lang.Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * <pre>
- * The request message containing the user's name.
- * </pre>
- *
- * Protobuf type {@code helloworld.HelloRequest}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
- // @@protoc_insertion_point(builder_implements:helloworld.HelloRequest)
- org.apache.dubbo.sample.hello.Helloworld.HelloRequestOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.apache.dubbo.sample.hello.Helloworld.internal_static_helloworld_HelloRequest_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.apache.dubbo.sample.hello.Helloworld.internal_static_helloworld_HelloRequest_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.apache.dubbo.sample.hello.Helloworld.HelloRequest.class, org.apache.dubbo.sample.hello.Helloworld.HelloRequest.Builder.class);
- }
-
- // Construct using org.apache.dubbo.sample.hello.Helloworld.HelloRequest.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- }
- }
- @java.lang.Override
- public Builder clear() {
- super.clear();
- name_ = "";
-
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.apache.dubbo.sample.hello.Helloworld.internal_static_helloworld_HelloRequest_descriptor;
- }
-
- @java.lang.Override
- public org.apache.dubbo.sample.hello.Helloworld.HelloRequest getDefaultInstanceForType() {
- return org.apache.dubbo.sample.hello.Helloworld.HelloRequest.getDefaultInstance();
- }
-
- @java.lang.Override
- public org.apache.dubbo.sample.hello.Helloworld.HelloRequest build() {
- org.apache.dubbo.sample.hello.Helloworld.HelloRequest result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public org.apache.dubbo.sample.hello.Helloworld.HelloRequest buildPartial() {
- org.apache.dubbo.sample.hello.Helloworld.HelloRequest result = new org.apache.dubbo.sample.hello.Helloworld.HelloRequest(this);
- result.name_ = name_;
- onBuilt();
- return result;
- }
-
- @java.lang.Override
- public Builder clone() {
- return super.clone();
- }
- @java.lang.Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.setField(field, value);
- }
- @java.lang.Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @java.lang.Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @java.lang.Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, java.lang.Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @java.lang.Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.addRepeatedField(field, value);
- }
- @java.lang.Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.apache.dubbo.sample.hello.Helloworld.HelloRequest) {
- return mergeFrom((org.apache.dubbo.sample.hello.Helloworld.HelloRequest)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.apache.dubbo.sample.hello.Helloworld.HelloRequest other) {
- if (other == org.apache.dubbo.sample.hello.Helloworld.HelloRequest.getDefaultInstance()) return this;
- if (!other.getName().isEmpty()) {
- name_ = other.name_;
- onChanged();
- }
- this.mergeUnknownFields(other.unknownFields);
- onChanged();
- return this;
- }
-
- @java.lang.Override
- public final boolean isInitialized() {
- return true;
- }
-
- @java.lang.Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- org.apache.dubbo.sample.hello.Helloworld.HelloRequest parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.apache.dubbo.sample.hello.Helloworld.HelloRequest) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private java.lang.Object name_ = "";
- /**
- * <code>string name = 1;</code>
- * @return The name.
- */
- public java.lang.String getName() {
- java.lang.Object ref = name_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- name_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * <code>string name = 1;</code>
- * @return The bytes for name.
- */
- public com.google.protobuf.ByteString
- getNameBytes() {
- java.lang.Object ref = name_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- name_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * <code>string name = 1;</code>
- * @param value The name to set.
- * @return This builder for chaining.
- */
- public Builder setName(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- name_ = value;
- onChanged();
- return this;
- }
- /**
- * <code>string name = 1;</code>
- * @return This builder for chaining.
- */
- public Builder clearName() {
-
- name_ = getDefaultInstance().getName();
- onChanged();
- return this;
- }
- /**
- * <code>string name = 1;</code>
- * @param value The bytes for name to set.
- * @return This builder for chaining.
- */
- public Builder setNameBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- name_ = value;
- onChanged();
- return this;
- }
- @java.lang.Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @java.lang.Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:helloworld.HelloRequest)
- }
-
- // @@protoc_insertion_point(class_scope:helloworld.HelloRequest)
- private static final org.apache.dubbo.sample.hello.Helloworld.HelloRequest DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new org.apache.dubbo.sample.hello.Helloworld.HelloRequest();
- }
-
- public static org.apache.dubbo.sample.hello.Helloworld.HelloRequest getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser<HelloRequest>
- PARSER = new com.google.protobuf.AbstractParser<HelloRequest>() {
- @java.lang.Override
- public HelloRequest parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new HelloRequest(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser<HelloRequest> parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser<HelloRequest> getParserForType() {
- return PARSER;
- }
-
- @java.lang.Override
- public org.apache.dubbo.sample.hello.Helloworld.HelloRequest getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface UserOrBuilder extends
- // @@protoc_insertion_point(interface_extends:helloworld.User)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * <code>string name = 1;</code>
- * @return The name.
- */
- java.lang.String getName();
- /**
- * <code>string name = 1;</code>
- * @return The bytes for name.
- */
- com.google.protobuf.ByteString
- getNameBytes();
-
- /**
- * <code>string id = 2;</code>
- * @return The id.
- */
- java.lang.String getId();
- /**
- * <code>string id = 2;</code>
- * @return The bytes for id.
- */
- com.google.protobuf.ByteString
- getIdBytes();
-
- /**
- * <code>int32 age = 3;</code>
- * @return The age.
- */
- int getAge();
- }
- /**
- * <pre>
- * The response message containing the greetings
- * </pre>
- *
- * Protobuf type {@code helloworld.User}
- */
- public static final class User extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:helloworld.User)
- UserOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use User.newBuilder() to construct.
- private User(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
- super(builder);
- }
- private User() {
- name_ = "";
- id_ = "";
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new User();
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private User(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10: {
- java.lang.String s = input.readStringRequireUtf8();
-
- name_ = s;
- break;
- }
- case 18: {
- java.lang.String s = input.readStringRequireUtf8();
-
- id_ = s;
- break;
- }
- case 24: {
-
- age_ = input.readInt32();
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.apache.dubbo.sample.hello.Helloworld.internal_static_helloworld_User_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.apache.dubbo.sample.hello.Helloworld.internal_static_helloworld_User_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.apache.dubbo.sample.hello.Helloworld.User.class, org.apache.dubbo.sample.hello.Helloworld.User.Builder.class);
- }
-
- public static final int NAME_FIELD_NUMBER = 1;
- private volatile java.lang.Object name_;
- /**
- * <code>string name = 1;</code>
- * @return The name.
- */
- @java.lang.Override
- public java.lang.String getName() {
- java.lang.Object ref = name_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- name_ = s;
- return s;
- }
- }
- /**
- * <code>string name = 1;</code>
- * @return The bytes for name.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getNameBytes() {
- java.lang.Object ref = name_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- name_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int ID_FIELD_NUMBER = 2;
- private volatile java.lang.Object id_;
- /**
- * <code>string id = 2;</code>
- * @return The id.
- */
- @java.lang.Override
- public java.lang.String getId() {
- java.lang.Object ref = id_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- id_ = s;
- return s;
- }
- }
- /**
- * <code>string id = 2;</code>
- * @return The bytes for id.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getIdBytes() {
- java.lang.Object ref = id_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- id_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int AGE_FIELD_NUMBER = 3;
- private int age_;
- /**
- * <code>int32 age = 3;</code>
- * @return The age.
- */
- @java.lang.Override
- public int getAge() {
- return age_;
- }
-
- private byte memoizedIsInitialized = -1;
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (!getNameBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
- }
- if (!getIdBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_);
- }
- if (age_ != 0) {
- output.writeInt32(3, age_);
- }
- unknownFields.writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!getNameBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
- }
- if (!getIdBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_);
- }
- if (age_ != 0) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(3, age_);
- }
- size += unknownFields.getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof org.apache.dubbo.sample.hello.Helloworld.User)) {
- return super.equals(obj);
- }
- org.apache.dubbo.sample.hello.Helloworld.User other = (org.apache.dubbo.sample.hello.Helloworld.User) obj;
-
- if (!getName()
- .equals(other.getName())) return false;
- if (!getId()
- .equals(other.getId())) return false;
- if (getAge()
- != other.getAge()) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
- return true;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + NAME_FIELD_NUMBER;
- hash = (53 * hash) + getName().hashCode();
- hash = (37 * hash) + ID_FIELD_NUMBER;
- hash = (53 * hash) + getId().hashCode();
- hash = (37 * hash) + AGE_FIELD_NUMBER;
- hash = (53 * hash) + getAge();
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static org.apache.dubbo.sample.hello.Helloworld.User parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.User parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.User parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.User parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.User parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.User parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.User parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.User parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.User parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.User parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.User parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.apache.dubbo.sample.hello.Helloworld.User parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @java.lang.Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(org.apache.dubbo.sample.hello.Helloworld.User prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @java.lang.Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * <pre>
- * The response message containing the greetings
- * </pre>
- *
- * Protobuf type {@code helloworld.User}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
- // @@protoc_insertion_point(builder_implements:helloworld.User)
- org.apache.dubbo.sample.hello.Helloworld.UserOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.apache.dubbo.sample.hello.Helloworld.internal_static_helloworld_User_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.apache.dubbo.sample.hello.Helloworld.internal_static_helloworld_User_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.apache.dubbo.sample.hello.Helloworld.User.class, org.apache.dubbo.sample.hello.Helloworld.User.Builder.class);
- }
-
- // Construct using org.apache.dubbo.sample.hello.Helloworld.User.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- }
- }
- @java.lang.Override
- public Builder clear() {
- super.clear();
- name_ = "";
-
- id_ = "";
-
- age_ = 0;
-
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.apache.dubbo.sample.hello.Helloworld.internal_static_helloworld_User_descriptor;
- }
-
- @java.lang.Override
- public org.apache.dubbo.sample.hello.Helloworld.User getDefaultInstanceForType() {
- return org.apache.dubbo.sample.hello.Helloworld.User.getDefaultInstance();
- }
-
- @java.lang.Override
- public org.apache.dubbo.sample.hello.Helloworld.User build() {
- org.apache.dubbo.sample.hello.Helloworld.User result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public org.apache.dubbo.sample.hello.Helloworld.User buildPartial() {
- org.apache.dubbo.sample.hello.Helloworld.User result = new org.apache.dubbo.sample.hello.Helloworld.User(this);
- result.name_ = name_;
- result.id_ = id_;
- result.age_ = age_;
- onBuilt();
- return result;
- }
-
- @java.lang.Override
- public Builder clone() {
- return super.clone();
- }
- @java.lang.Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.setField(field, value);
- }
- @java.lang.Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @java.lang.Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @java.lang.Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, java.lang.Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @java.lang.Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.addRepeatedField(field, value);
- }
- @java.lang.Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.apache.dubbo.sample.hello.Helloworld.User) {
- return mergeFrom((org.apache.dubbo.sample.hello.Helloworld.User)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.apache.dubbo.sample.hello.Helloworld.User other) {
- if (other == org.apache.dubbo.sample.hello.Helloworld.User.getDefaultInstance()) return this;
- if (!other.getName().isEmpty()) {
- name_ = other.name_;
- onChanged();
- }
- if (!other.getId().isEmpty()) {
- id_ = other.id_;
- onChanged();
- }
- if (other.getAge() != 0) {
- setAge(other.getAge());
- }
- this.mergeUnknownFields(other.unknownFields);
- onChanged();
- return this;
- }
-
- @java.lang.Override
- public final boolean isInitialized() {
- return true;
- }
-
- @java.lang.Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- org.apache.dubbo.sample.hello.Helloworld.User parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.apache.dubbo.sample.hello.Helloworld.User) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private java.lang.Object name_ = "";
- /**
- * <code>string name = 1;</code>
- * @return The name.
- */
- public java.lang.String getName() {
- java.lang.Object ref = name_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- name_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * <code>string name = 1;</code>
- * @return The bytes for name.
- */
- public com.google.protobuf.ByteString
- getNameBytes() {
- java.lang.Object ref = name_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- name_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * <code>string name = 1;</code>
- * @param value The name to set.
- * @return This builder for chaining.
- */
- public Builder setName(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- name_ = value;
- onChanged();
- return this;
- }
- /**
- * <code>string name = 1;</code>
- * @return This builder for chaining.
- */
- public Builder clearName() {
-
- name_ = getDefaultInstance().getName();
- onChanged();
- return this;
- }
- /**
- * <code>string name = 1;</code>
- * @param value The bytes for name to set.
- * @return This builder for chaining.
- */
- public Builder setNameBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- name_ = value;
- onChanged();
- return this;
- }
-
- private java.lang.Object id_ = "";
- /**
- * <code>string id = 2;</code>
- * @return The id.
- */
- public java.lang.String getId() {
- java.lang.Object ref = id_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- id_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * <code>string id = 2;</code>
- * @return The bytes for id.
- */
- public com.google.protobuf.ByteString
- getIdBytes() {
- java.lang.Object ref = id_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- id_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * <code>string id = 2;</code>
- * @param value The id to set.
- * @return This builder for chaining.
- */
- public Builder setId(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- id_ = value;
- onChanged();
- return this;
- }
- /**
- * <code>string id = 2;</code>
- * @return This builder for chaining.
- */
- public Builder clearId() {
-
- id_ = getDefaultInstance().getId();
- onChanged();
- return this;
- }
- /**
- * <code>string id = 2;</code>
- * @param value The bytes for id to set.
- * @return This builder for chaining.
- */
- public Builder setIdBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- id_ = value;
- onChanged();
- return this;
- }
-
- private int age_ ;
- /**
- * <code>int32 age = 3;</code>
- * @return The age.
- */
- @java.lang.Override
- public int getAge() {
- return age_;
- }
- /**
- * <code>int32 age = 3;</code>
- * @param value The age to set.
- * @return This builder for chaining.
- */
- public Builder setAge(int value) {
-
- age_ = value;
- onChanged();
- return this;
- }
- /**
- * <code>int32 age = 3;</code>
- * @return This builder for chaining.
- */
- public Builder clearAge() {
-
- age_ = 0;
- onChanged();
- return this;
- }
- @java.lang.Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @java.lang.Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:helloworld.User)
- }
-
- // @@protoc_insertion_point(class_scope:helloworld.User)
- private static final org.apache.dubbo.sample.hello.Helloworld.User DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new org.apache.dubbo.sample.hello.Helloworld.User();
- }
-
- public static org.apache.dubbo.sample.hello.Helloworld.User getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser<User>
- PARSER = new com.google.protobuf.AbstractParser<User>() {
- @java.lang.Override
- public User parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new User(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser<User> parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser<User> getParserForType() {
- return PARSER;
- }
-
- @java.lang.Override
- public org.apache.dubbo.sample.hello.Helloworld.User getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_helloworld_HelloRequest_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_helloworld_HelloRequest_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_helloworld_User_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_helloworld_User_fieldAccessorTable;
-
- public static com.google.protobuf.Descriptors.FileDescriptor
- getDescriptor() {
- return descriptor;
- }
- private static com.google.protobuf.Descriptors.FileDescriptor
- descriptor;
- static {
- java.lang.String[] descriptorData = {
- "\n\020helloworld.proto\022\nhelloworld\"\034\n\014HelloR" +
- "equest\022\014\n\004name\030\001 \001(\t\"-\n\004User\022\014\n\004name\030\001 \001" +
- "(\t\022\n\n\002id\030\002 \001(\t\022\013\n\003age\030\003 \001(\005B\037\n\035org.apach" +
- "e.dubbo.sample.hellob\006proto3"
- };
- descriptor = com.google.protobuf.Descriptors.FileDescriptor
- .internalBuildGeneratedFileFrom(descriptorData,
- new com.google.protobuf.Descriptors.FileDescriptor[] {
- });
- internal_static_helloworld_HelloRequest_descriptor =
- getDescriptor().getMessageTypes().get(0);
- internal_static_helloworld_HelloRequest_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_helloworld_HelloRequest_descriptor,
- new java.lang.String[] { "Name", });
- internal_static_helloworld_User_descriptor =
- getDescriptor().getMessageTypes().get(1);
- internal_static_helloworld_User_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_helloworld_User_descriptor,
- new java.lang.String[] { "Name", "Id", "Age", });
- }
-
- // @@protoc_insertion_point(outer_class_scope)
-}
diff --git a/compatibility/registry/servicediscovery/zookeeper/java-server/pom.xml b/compatibility/registry/servicediscovery/zookeeper/java-server/pom.xml
deleted file mode 100644
index c4b96f6f..00000000
--- a/compatibility/registry/servicediscovery/zookeeper/java-server/pom.xml
+++ /dev/null
@@ -1,166 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <groupId>org.apache.dubbo</groupId>
- <version>1.0-SNAPSHOT</version>
-
- <modelVersion>4.0.0</modelVersion>
-
- <artifactId>dubbo-samples-triple</artifactId>
-
- <properties>
- <source.level>1.8</source.level>
- <target.level>1.8</target.level>
- <dubbo.version>3.0.13</dubbo.version>
- <junit.version>4.12</junit.version>
- <spring-test.version>4.3.16.RELEASE</spring-test.version>
- <maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
- <maven-failsafe-plugin.version>2.21.0</maven-failsafe-plugin.version>
- <spring-boot.version>1.5.13.RELEASE</spring-boot.version>
- <grpc.version>1.19.0</grpc.version>
- <protoc.version>3.7.1</protoc.version>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo</artifactId>
- <version>${dubbo.version}</version>
- </dependency>
- <dependency>
- <groupId>com.google.protobuf</groupId>
- <artifactId>protobuf-java</artifactId>
- <version>3.16.3</version>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-dependencies-zookeeper</artifactId>
- <version>${dubbo.version}</version>
- <type>pom</type>
- <exclusions>
- <exclusion>
- <groupId>org.apache.zookeeper</groupId>
- <artifactId>zookeeper</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.zookeeper</groupId>
- <artifactId>zookeeper</artifactId>
- <version>3.7.2</version>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>${junit.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-test</artifactId>
- <version>${spring-test.version}</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.testcontainers</groupId>
- <artifactId>testcontainers</artifactId>
- <version>1.12.3</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <profiles>
- <!-- For jdk 11 above JavaEE annotation -->
- <profile>
- <id>javax.annotation</id>
- <activation>
- <jdk>[1.11,)</jdk>
- </activation>
- <dependencies>
- <dependency>
- <groupId>javax.annotation</groupId>
- <artifactId>javax.annotation-api</artifactId>
- <version>1.3.2</version>
- </dependency>
- </dependencies>
- </profile>
- </profiles>
-
- <build>
- <defaultGoal>package</defaultGoal>
- <extensions>
- <extension>
- <groupId>kr.motd.maven</groupId>
- <artifactId>os-maven-plugin</artifactId>
- <version>1.6.1</version>
- </extension>
- </extensions>
-
- <plugins>
- <plugin>
- <groupId>org.xolstice.maven.plugins</groupId>
- <artifactId>protobuf-maven-plugin</artifactId>
- <version>0.6.1</version>
- <configuration>
- <protocArtifact>com.google.protobuf:protoc:3.17.3:exe:${os.detected.classifier}</protocArtifact>
- <pluginId>triple-java</pluginId>
- <outputDirectory>build/generated/source/proto/main/java</outputDirectory>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>compile</goal>
- <goal>test-compile</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>${maven-compiler-plugin.version}</version>
- <configuration>
- <source>${source.level}</source>
- <target>${target.level}</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>build/generated/source/proto/main/java</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
-</project>
\ No newline at end of file
diff --git a/compatibility/registry/servicediscovery/zookeeper/java-server/run.sh b/compatibility/registry/servicediscovery/zookeeper/java-server/run.sh
deleted file mode 100644
index 11270399..00000000
--- a/compatibility/registry/servicediscovery/zookeeper/java-server/run.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-mvn install -DSkipTests
-mvn exec:java -Dexec.mainClass="com.apache.dubbo.sample.basic.ApiProvider"
\ No newline at end of file
diff --git a/compatibility/registry/servicediscovery/zookeeper/java-server/src/main/java/com/apache/dubbo/sample/basic/ApiProvider.java b/compatibility/registry/servicediscovery/zookeeper/java-server/src/main/java/com/apache/dubbo/sample/basic/ApiProvider.java
deleted file mode 100644
index 4707e7eb..00000000
--- a/compatibility/registry/servicediscovery/zookeeper/java-server/src/main/java/com/apache/dubbo/sample/basic/ApiProvider.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.apache.dubbo.sample.basic;
-
-import org.apache.dubbo.common.constants.CommonConstants;
-import org.apache.dubbo.config.bootstrap.DubboBootstrap;
-import org.apache.dubbo.config.ApplicationConfig;
-import org.apache.dubbo.config.ProtocolConfig;
-import org.apache.dubbo.config.MetadataReportConfig;
-import org.apache.dubbo.config.RegistryConfig;
-import org.apache.dubbo.config.ServiceConfig;
-import com.apache.dubbo.sample.basic.IGreeter;
-
-public class ApiProvider {
- public static void main(String[] args) {
- ServiceConfig<IGreeter> service = new ServiceConfig<>();
- service.setInterface(IGreeter.class);
- service.setRef(new IGreeter1Impl());
-
- ApplicationConfig applicationConfig = new ApplicationConfig("demo-provider");
- applicationConfig.setProtocol(CommonConstants.TRIPLE);
-
- DubboBootstrap bootstrap = DubboBootstrap.getInstance();
- bootstrap.application(applicationConfig)
- .registry(new RegistryConfig("zookeeper://127.0.0.1:2181"))
- .protocol(new ProtocolConfig(CommonConstants.TRIPLE, 50051))
- .service(service)
- .start()
- .await();
- }
-}
diff --git a/compatibility/registry/servicediscovery/zookeeper/java-server/src/main/java/com/apache/dubbo/sample/basic/IGreeter.java b/compatibility/registry/servicediscovery/zookeeper/java-server/src/main/java/com/apache/dubbo/sample/basic/IGreeter.java
deleted file mode 100644
index e8aa2fe1..00000000
--- a/compatibility/registry/servicediscovery/zookeeper/java-server/src/main/java/com/apache/dubbo/sample/basic/IGreeter.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.apache.dubbo.sample.basic;
-
-import org.apache.dubbo.sample.hello.Helloworld;
-
-public interface IGreeter {
- /**
- * <pre>
- * Sends a greeting
- * </pre>
- */
- Helloworld.User sayHello(Helloworld.HelloRequest request);
-
-}
diff --git a/compatibility/registry/servicediscovery/zookeeper/java-server/src/main/java/com/apache/dubbo/sample/basic/IGreeter1Impl.java b/compatibility/registry/servicediscovery/zookeeper/java-server/src/main/java/com/apache/dubbo/sample/basic/IGreeter1Impl.java
deleted file mode 100644
index dfb1ac80..00000000
--- a/compatibility/registry/servicediscovery/zookeeper/java-server/src/main/java/com/apache/dubbo/sample/basic/IGreeter1Impl.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.apache.dubbo.sample.basic;
-
-
-import org.apache.dubbo.sample.hello.Helloworld.User;
-import org.apache.dubbo.sample.hello.Helloworld.HelloRequest;
-
-public class IGreeter1Impl implements IGreeter {
- @Override
- public User sayHello(HelloRequest request) {
- System.out.println("receiv: " + request);
- User usr = User.newBuilder()
- .setName("hello " + request.getName())
- .setAge(18)
- .setId("12345").build();
- return usr;
- }
-}
diff --git a/compatibility/registry/servicediscovery/zookeeper/java-server/src/main/proto/helloworld.proto b/compatibility/registry/servicediscovery/zookeeper/java-server/src/main/proto/helloworld.proto
deleted file mode 100644
index ee6ca29b..00000000
--- a/compatibility/registry/servicediscovery/zookeeper/java-server/src/main/proto/helloworld.proto
+++ /dev/null
@@ -1,28 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-syntax = "proto3";
-
-option java_package = "org.apache.dubbo.sample.hello";
-
-package helloworld;
-
-// The request message containing the user's name.
-message HelloRequest {
- string name = 1;
-}
-
-// The response message containing the greetings
-message User {
- string name = 1;
- string id = 2;
- int32 age = 3;
-}
diff --git a/compatibility/registry/servicediscovery/zookeeper/java-server/src/main/resources/log4j.properties b/compatibility/registry/servicediscovery/zookeeper/java-server/src/main/resources/log4j.properties
deleted file mode 100644
index 6b82abab..00000000
--- a/compatibility/registry/servicediscovery/zookeeper/java-server/src/main/resources/log4j.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-
-###set log levels###
-log4j.rootLogger=debug, stdout
-###output to the console###
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.Target=System.out
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=[%d{dd/MM/yy hh:mm:ss:sss z}] %t %5p %c{2}: %m%n
\ No newline at end of file
diff --git a/integrate_test/compatibility/registry/all/nacos/tests/integration/greeter_test.go b/integrate_test/compatibility/registry/all/nacos/tests/integration/greeter_test.go
deleted file mode 100644
index 5f0484ac..00000000
--- a/integrate_test/compatibility/registry/all/nacos/tests/integration/greeter_test.go
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package integration
-
-import (
- "context"
- "testing"
-)
-
-import (
- "github.com/stretchr/testify/assert"
-)
-
-import (
- "github.com/apache/dubbo-go-samples/compatibility/api"
-)
-
-func TestGreeter(t *testing.T) {
- req := &api.HelloRequest{
- Name: "dubbo-go",
- }
- reply, err := grpcGreeterImpl.SayHello(context.Background(), req)
- assert.Nil(t, err, nil)
-
- assert.Equal(t, 21, reply.Age)
- assert.Equal(t, "12345", reply.Id)
- assert.Equal(t, "Hello dubbo-go", reply.Name)
-
-}
diff --git a/integrate_test/compatibility/registry/all/nacos/tests/integration/main_test.go b/integrate_test/compatibility/registry/all/nacos/tests/integration/main_test.go
deleted file mode 100644
index f30850b2..00000000
--- a/integrate_test/compatibility/registry/all/nacos/tests/integration/main_test.go
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package integration
-
-import (
- "testing"
-)
-
-import (
- "dubbo.apache.org/dubbo-go/v3/config"
- _ "dubbo.apache.org/dubbo-go/v3/imports"
-)
-
-import (
- "github.com/apache/dubbo-go-samples/compatibility/api"
-)
-
-var grpcGreeterImpl = &api.GreeterClientImpl{}
-
-func TestMain(m *testing.M) {
- config.SetConsumerService(grpcGreeterImpl)
- if err := config.Load(); err != nil {
- panic(err)
- }
-}
diff --git a/integrate_test/compatibility/registry/all/zookeeper/tests/integration/greeter_test.go b/integrate_test/compatibility/registry/all/zookeeper/tests/integration/greeter_test.go
deleted file mode 100644
index 5f0484ac..00000000
--- a/integrate_test/compatibility/registry/all/zookeeper/tests/integration/greeter_test.go
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package integration
-
-import (
- "context"
- "testing"
-)
-
-import (
- "github.com/stretchr/testify/assert"
-)
-
-import (
- "github.com/apache/dubbo-go-samples/compatibility/api"
-)
-
-func TestGreeter(t *testing.T) {
- req := &api.HelloRequest{
- Name: "dubbo-go",
- }
- reply, err := grpcGreeterImpl.SayHello(context.Background(), req)
- assert.Nil(t, err, nil)
-
- assert.Equal(t, 21, reply.Age)
- assert.Equal(t, "12345", reply.Id)
- assert.Equal(t, "Hello dubbo-go", reply.Name)
-
-}
diff --git a/integrate_test/compatibility/registry/all/zookeeper/tests/integration/main_test.go b/integrate_test/compatibility/registry/all/zookeeper/tests/integration/main_test.go
deleted file mode 100644
index f30850b2..00000000
--- a/integrate_test/compatibility/registry/all/zookeeper/tests/integration/main_test.go
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package integration
-
-import (
- "testing"
-)
-
-import (
- "dubbo.apache.org/dubbo-go/v3/config"
- _ "dubbo.apache.org/dubbo-go/v3/imports"
-)
-
-import (
- "github.com/apache/dubbo-go-samples/compatibility/api"
-)
-
-var grpcGreeterImpl = &api.GreeterClientImpl{}
-
-func TestMain(m *testing.M) {
- config.SetConsumerService(grpcGreeterImpl)
- if err := config.Load(); err != nil {
- panic(err)
- }
-}
diff --git a/integrate_test/compatibility/registry/servicediscovery/nacos/tests/integration/helloworld_test.go b/integrate_test/compatibility/registry/servicediscovery/nacos/tests/integration/helloworld_test.go
deleted file mode 100644
index d86c1c52..00000000
--- a/integrate_test/compatibility/registry/servicediscovery/nacos/tests/integration/helloworld_test.go
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package integration
-
-import (
- "context"
- "testing"
-)
-
-import (
- "github.com/stretchr/testify/assert"
-)
-
-import (
- dubbo3pb "github.com/apache/dubbo-go-samples/compatibility/api"
-)
-
-func TestSayHello(t *testing.T) {
- req := &dubbo3pb.HelloRequest{
- Name: "laurence",
- }
-
- ctx := context.Background()
-
- reply, err := greeterProvider.SayHello(ctx, req)
-
- assert.Nil(t, err)
- assert.Equal(t, "Hello laurence", reply.Name)
- assert.Equal(t, "12345", reply.Id)
- assert.Equal(t, int32(21), reply.Age)
-}
diff --git a/integrate_test/compatibility/registry/servicediscovery/nacos/tests/integration/main_test.go b/integrate_test/compatibility/registry/servicediscovery/nacos/tests/integration/main_test.go
deleted file mode 100644
index bf2ef6b2..00000000
--- a/integrate_test/compatibility/registry/servicediscovery/nacos/tests/integration/main_test.go
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package integration
-
-import (
- "os"
- "testing"
-)
-
-import (
- "dubbo.apache.org/dubbo-go/v3/config"
- _ "dubbo.apache.org/dubbo-go/v3/imports"
-)
-
-import (
- dubbo3pb "github.com/apache/dubbo-go-samples/compatibility/api"
-)
-
-var greeterProvider = &dubbo3pb.GreeterClientImpl{}
-
-func TestMain(m *testing.M) {
- config.SetConsumerService(greeterProvider)
- if err := config.Load(); err != nil {
- panic(err)
- }
-
- os.Exit(m.Run())
-}
diff --git a/integrate_test/compatibility/registry/servicediscovery/zookeeper/tests/integration/helloworld_test.go b/integrate_test/compatibility/registry/servicediscovery/zookeeper/tests/integration/helloworld_test.go
deleted file mode 100644
index d86c1c52..00000000
--- a/integrate_test/compatibility/registry/servicediscovery/zookeeper/tests/integration/helloworld_test.go
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package integration
-
-import (
- "context"
- "testing"
-)
-
-import (
- "github.com/stretchr/testify/assert"
-)
-
-import (
- dubbo3pb "github.com/apache/dubbo-go-samples/compatibility/api"
-)
-
-func TestSayHello(t *testing.T) {
- req := &dubbo3pb.HelloRequest{
- Name: "laurence",
- }
-
- ctx := context.Background()
-
- reply, err := greeterProvider.SayHello(ctx, req)
-
- assert.Nil(t, err)
- assert.Equal(t, "Hello laurence", reply.Name)
- assert.Equal(t, "12345", reply.Id)
- assert.Equal(t, int32(21), reply.Age)
-}
diff --git a/integrate_test/compatibility/registry/servicediscovery/zookeeper/tests/integration/main_test.go b/integrate_test/compatibility/registry/servicediscovery/zookeeper/tests/integration/main_test.go
deleted file mode 100644
index bf2ef6b2..00000000
--- a/integrate_test/compatibility/registry/servicediscovery/zookeeper/tests/integration/main_test.go
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package integration
-
-import (
- "os"
- "testing"
-)
-
-import (
- "dubbo.apache.org/dubbo-go/v3/config"
- _ "dubbo.apache.org/dubbo-go/v3/imports"
-)
-
-import (
- dubbo3pb "github.com/apache/dubbo-go-samples/compatibility/api"
-)
-
-var greeterProvider = &dubbo3pb.GreeterClientImpl{}
-
-func TestMain(m *testing.M) {
- config.SetConsumerService(greeterProvider)
- if err := config.Load(); err != nil {
- panic(err)
- }
-
- os.Exit(m.Run())
-}
diff --git a/start_integrate_test.sh b/start_integrate_test.sh
index f1e6004e..d113e3c0 100755
--- a/start_integrate_test.sh
+++ b/start_integrate_test.sh
@@ -92,13 +92,6 @@ array+=("error")
array+=("config_center/nacos")
array+=("config_center/zookeeper")
-# compatibility
-## registry
-array+=("compatibility/registry/servicediscovery/zookeeper")
-array+=("compatibility/registry/servicediscovery/nacos")
-array+=("compatibility/registry/all/zookeeper")
-array+=("compatibility/registry/all/nacos")
-
# config yaml
array+=("config_yaml")
# service_discovery