You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eventmesh.apache.org by mi...@apache.org on 2022/01/12 03:02:52 UTC
[incubator-eventmesh] branch grpc updated: [Issue #417] Grpc Transport Protocol support (#710)
This is an automated email from the ASF dual-hosted git repository.
mikexue pushed a commit to branch grpc
in repository https://gitbox.apache.org/repos/asf/incubator-eventmesh.git
The following commit(s) were added to refs/heads/grpc by this push:
new 22f9930 [Issue #417] Grpc Transport Protocol support (#710)
22f9930 is described below
commit 22f99306ccf529754667d2d074698a36e1ab3a45
Author: jinrongluo <ka...@gmail.com>
AuthorDate: Tue Jan 11 21:17:56 2022 -0500
[Issue #417] Grpc Transport Protocol support (#710)
Grpc Transport Protocol support
---
build.gradle | 7 +
docs/cn/instructions/eventmesh-runtime-protocol.md | 161 ++
docs/en/instructions/eventmesh-runtime-protocol.md | 163 ++
eventmesh-common/build.gradle | 3 +
.../protocol/grpc/common/BatchMessageWrapper.java | 21 +-
.../grpc/common/EventMeshMessageWrapper.java | 21 +-
.../common/protocol/grpc/common/ProtocolKey.java | 42 +
.../common/protocol/grpc/common/StatusCode.java | 69 +
.../common/protocol/grpc/protos/BatchMessage.java | 2573 ++++++++++++++++++++
.../grpc/protos/BatchMessageOrBuilder.java | 83 +
.../protocol/grpc/protos/ConsumerServiceGrpc.java | 435 ++++
.../protocol/grpc/protos/EventMeshMessage.java | 1753 +++++++++++++
.../grpc/protos/EventMeshMessageOrBuilder.java | 143 ++
.../common/protocol/grpc/protos/EventmeshGrpc.java | 252 ++
.../common/protocol/grpc/protos/Heartbeat.java | 2032 ++++++++++++++++
.../protocol/grpc/protos/HeartbeatOrBuilder.java | 92 +
.../protocol/grpc/protos/HeartbeatServiceGrpc.java | 289 +++
.../protocol/grpc/protos/PublisherServiceGrpc.java | 439 ++++
.../common/protocol/grpc/protos/RequestHeader.java | 1930 +++++++++++++++
.../grpc/protos/RequestHeaderOrBuilder.java | 146 ++
.../common/protocol/grpc/protos/Response.java | 787 ++++++
.../protocol/grpc/protos/ResponseOrBuilder.java | 56 +
.../common/protocol/grpc/protos/Subscription.java | 2094 ++++++++++++++++
.../grpc/protos/SubscriptionOrBuilder.java | 83 +
.../common/protocol/http/common/ProtocolKey.java | 2 +
eventmesh-examples/build.gradle | 7 +
.../CloudEventsBatchPublishInstance.java | 87 +
.../cloudevents/CloudEventsPublishInstance.java | 85 +
.../CloudEventsRequestReplyInstance.java | 86 +
.../pub/eventmeshmessage/AsyncPublishInstance.java | 79 +
.../pub/eventmeshmessage/BatchPublishInstance.java | 77 +
.../pub/eventmeshmessage/RequestReplyInstance.java | 77 +
.../grpc/sub/CloudEventsAsyncSubscribe.java | 68 +
.../grpc/sub/EventmeshAsyncSubscribe.java | 68 +
.../grpc/sub/app/SpringBootDemoApplication.java | 17 +-
.../grpc/sub/app/controller/SubController.java | 69 +
.../eventmesh/grpc/sub/app/service/SubService.java | 122 +
.../src/main/resources/application.properties | 3 +-
.../eventmesh-protocol-cloudevents/build.gradle | 1 +
.../cloudevents/CloudEventsProtocolAdaptor.java | 20 +-
.../resolver/grpc/GrpcMessageProtocolResolver.java | 179 ++
.../eventmesh-protocol-grpc/build.gradle | 53 +
.../src/main/proto/eventmesh-client.proto | 137 ++
.../eventmesh-protocol-meshmessage/build.gradle | 1 +
.../meshmessage/MeshMessageProtocolAdaptor.java | 21 +-
.../resolver/grpc/GrpcMessageProtocolResolver.java | 249 ++
eventmesh-runtime/build.gradle | 10 +
eventmesh-runtime/conf/eventmesh.properties | 1 +
.../runtime/boot/EventMeshGrpcServer.java | 197 ++
.../eventmesh/runtime/boot/EventMeshServer.java | 26 +-
.../eventmesh/runtime/boot/EventMeshStartup.java | 5 +-
.../configuration/EventMeshGrpcConfiguration.java | 255 ++
.../runtime/constants/EventMeshConstants.java | 2 +
.../protocol/grpc/consumer/ConsumerManager.java | 222 ++
.../protocol/grpc/consumer/EventMeshConsumer.java | 274 +++
.../consumergroup/ConsumerGroupClient.java | 88 +
.../consumergroup/ConsumerGroupTopicConfig.java | 55 +
.../grpc/consumer/consumergroup/GrpcType.java | 5 +
.../consumer/consumergroup/StreamTopicConfig.java | 124 +
.../consumer/consumergroup/WebhookTopicConfig.java | 111 +
.../processor/BatchPublishMessageProcessor.java | 135 +
.../grpc/processor/HeartbeatProcessor.java | 97 +
.../processor/RequestReplyMessageProcessor.java | 137 ++
.../grpc/processor/SendAsyncMessageProcessor.java | 141 ++
.../grpc/processor/SubscribeProcessor.java | 123 +
.../grpc/processor/SubscribeStreamProcessor.java | 160 ++
.../grpc/processor/UnsubscribeProcessor.java | 94 +
.../protocol/grpc/producer/EventMeshProducer.java | 109 +
.../protocol/grpc/producer/ProducerManager.java | 91 +
.../protocol/grpc/producer/SendMessageContext.java | 152 ++
.../protocol/grpc/push/AbstractPushRequest.java | 167 ++
.../core/protocol/grpc/push/HandleMsgContext.java | 110 +
.../core/protocol/grpc/push/MessageHandler.java | 90 +
.../core/protocol/grpc/push/StreamPushRequest.java | 83 +
.../protocol/grpc/push/WebhookPushRequest.java | 239 ++
.../core/protocol/grpc/retry/DelayRetryable.java | 11 +-
.../core/protocol/grpc/retry/GrpcRetryer.java | 115 +
.../core/protocol/grpc/retry/RetryContext.java | 50 +
.../protocol/grpc/service/ConsumerService.java | 105 +
.../core/protocol/grpc/service/EventEmitter.java | 43 +
.../protocol/grpc/service/HeartbeatService.java | 46 +
.../protocol/grpc/service/ProducerService.java | 91 +
.../core/protocol/grpc/service/ServiceUtils.java | 107 +
.../eventmesh/runtime/client/common/Server.java | 2 +-
eventmesh-sdk-java/build.gradle | 10 +
.../client/grpc/EventMeshGrpcConsumer.java | 237 ++
.../client/grpc/EventMeshGrpcProducer.java | 112 +
.../eventmesh/client/grpc/ReceiveMsgHook.java | 21 +-
.../grpc/config/EventMeshGrpcClientConfig.java | 76 +
.../client/grpc/producer/CloudEventProducer.java | 166 ++
.../client/grpc/util/EventMeshClientUtil.java | 30 +
settings.gradle | 3 +
tool/license/allowed-licenses.txt | 0
93 files changed, 19673 insertions(+), 37 deletions(-)
diff --git a/build.gradle b/build.gradle
index 4f7e7f6..4b5569b 100644
--- a/build.gradle
+++ b/build.gradle
@@ -75,6 +75,8 @@ allprojects {
maxWarnings = 0
configFile = new File("${rootDir}/style/checkStyle.xml")
}
+
+ checkstyleMain.exclude '**/org/apache/eventmesh/client/grpc/protos**'
}
task tar(type: Tar) {
@@ -454,6 +456,11 @@ subprojects {
dependency "io.cloudevents:cloudevents-core:2.2.0"
dependency "io.cloudevents:cloudevents-json-jackson:2.2.0"
+
+ dependency "io.grpc:grpc-protobuf:1.15.0"
+ dependency "io.grpc:grpc-stub:1.15.0"
+ dependency "io.grpc:grpc-netty:1.15.0"
+ dependency "io.grpc:grpc-netty-shaded:1.15.0"
}
}
}
\ No newline at end of file
diff --git a/docs/cn/instructions/eventmesh-runtime-protocol.md b/docs/cn/instructions/eventmesh-runtime-protocol.md
index 01f369b..378c7fc 100644
--- a/docs/cn/instructions/eventmesh-runtime-protocol.md
+++ b/docs/cn/instructions/eventmesh-runtime-protocol.md
@@ -258,3 +258,164 @@ public class LiteMessage {
| 场景 | Server向Client发送消息请求码 | Client回复Server消息响应码 | 说明 |
| ------------------ | ---------------------------- | -------------------------- | ---------------------- |
| 客户端接收异步事件 | HTTP_PUSH_CLIENT_ASYNC(105) | retCode | retCode值为0时代表成功 |
+
+
+## gRPC 协议文档
+
+#### 1. protobuf
+
+在 `eventmesh-protocol-gprc` 模块有 Eventmesh gRPC 客户端的 protobuf 文件. the protobuf 文件路径是 `/src/main/proto/eventmesh-client.proto`.
+
+用gradle build 生成 gRPC 代码在 `/build/generated/source/proto/main`. 生成代码用于 `eventmesh-sdk-java` 模块.
+
+#### 2. gRPC 数据模型
+
+- 消息
+
+以下消息数据模型用于 `publish()`, `requestReply()` 和 `broadcast()` APIs.
+
+```
+message RequestHeader {
+ string env = 1;
+ string region = 2;
+ string idc = 3;
+ string ip = 4;
+ string pid = 5;
+ string sys = 6;
+ string username = 7;
+ string password = 8;
+ string language = 9;
+ string protocolType = 10;
+ string protocolVersion = 11;
+ string protocolDesc = 12;
+}
+
+message EventMeshMessage {
+ RequestHeader header = 1;
+ string producerGroup = 2;
+ string topic = 3;
+ string content = 4;
+ string ttl = 5;
+ string uniqueId = 6;
+ string seqNum = 7;
+ string tag = 8;
+ map<string, string> properties = 9;
+}
+
+message BatchMessage {
+ RequestHeader header = 1;
+ string producerGroup = 2;
+ string topic = 3;
+
+ message MessageItem {
+ string content = 1;
+ string ttl = 2;
+ string uniqueId = 3;
+ string seqNum = 4;
+ string tag = 5;
+ map<string, string> properties = 6;
+ }
+
+ repeated MessageItem messageItem = 4;
+}
+
+message Response {
+ string respCode = 1;
+ string respMsg = 2;
+ string respTime = 3;
+}
+```
+
+- 订阅
+
+以下订阅数据模型用于 `subscribe()` 和 `unsubscribe()` APIs.
+
+```
+message Subscription {
+ RequestHeader header = 1;
+ string consumerGroup = 2;
+
+ message SubscriptionItem {
+ enum SubscriptionMode {
+ CLUSTERING = 0;
+ BROADCASTING = 1;
+ }
+
+ enum SubscriptionType {
+ ASYNC = 0;
+ SYNC = 1;
+ }
+
+ string topic = 1;
+ SubscriptionMode mode = 2;
+ SubscriptionType type = 3;
+ }
+
+ repeated SubscriptionItem subscriptionItems = 3;
+ string url = 4;
+}
+```
+
+- 心跳
+
+以下心跳数据模型用于 `heartbeat()` API.
+
+```
+message Heartbeat {
+ enum ClientType {
+ PUB = 0;
+ SUB = 1;
+ }
+
+ RequestHeader header = 1;
+ ClientType clientType = 2;
+ string producerGroup = 3;
+ string consumerGroup = 4;
+
+ message HeartbeatItem {
+ string topic = 1;
+ string url = 2;
+ }
+
+ repeated HeartbeatItem heartbeatItems = 5;
+}
+```
+
+#### 3. gRPC 服务接口
+
+- 事件生产端服务 APIs
+
+```
+service PublisherService {
+ # 异步事件生产
+ rpc publish(EventMeshMessage) returns (Response);
+
+ # 同步事件生产
+ rpc requestReply(EventMeshMessage) returns (Response);
+
+ # 批量事件生产
+ rpc batchPublish(BatchMessage) returns (Response);
+}
+```
+
+- 事件消费端服务 APIs
+
+```
+service ConsumerService {
+ # 所消费事件通过 HTTP Webhook推送事件
+ rpc subscribe(Subscription) returns (Response);
+
+ # 所消费事件通过 TCP stream推送事件
+ rpc subscribeStream(Subscription) returns (stream EventMeshMessage);
+
+ rpc unsubscribe(Subscription) returns (Response);
+}
+```
+
+- 客户端心跳服务 API
+
+```
+service HeartbeatService {
+ rpc heartbeat(Heartbeat) returns (Response);
+}
+```
\ No newline at end of file
diff --git a/docs/en/instructions/eventmesh-runtime-protocol.md b/docs/en/instructions/eventmesh-runtime-protocol.md
index 9049bff..9b705d3 100644
--- a/docs/en/instructions/eventmesh-runtime-protocol.md
+++ b/docs/en/instructions/eventmesh-runtime-protocol.md
@@ -259,3 +259,166 @@ same with RequestHeader of Heartbeat Msg
| Scene | Server Send | Client Reply | Remark |
| ------------------ | ---------------------------- | -------------------------- | ---------------------- |
| Push async msg to client | HTTP_PUSH_CLIENT_ASYNC(105) | retCode | retCode=0,send success |
+
+## gRPC Protocol Document In Eventmesh-Runtime
+
+#### 1. protobuf
+
+The `eventmesh-protocol-gprc` module contains the protobuf file of the evenmesh client. the protobuf file
+is located as `/src/main/proto/eventmesh-client.proto`.
+
+Run the gradle build to generate the gRPC codes. The generated codes are located at `/build/generated/source/proto/main`.
+
+These generated grpc codes will be used in `eventmesh-sdk-java` module.
+
+#### 2. data models
+
+- message
+
+The following is the message data model, used by `publish()`, `requestReply()` and `broadcast()` APIs.
+
+```
+message RequestHeader {
+ string env = 1;
+ string region = 2;
+ string idc = 3;
+ string ip = 4;
+ string pid = 5;
+ string sys = 6;
+ string username = 7;
+ string password = 8;
+ string language = 9;
+ string protocolType = 10;
+ string protocolVersion = 11;
+ string protocolDesc = 12;
+}
+
+message EventMeshMessage {
+ RequestHeader header = 1;
+ string producerGroup = 2;
+ string topic = 3;
+ string content = 4;
+ string ttl = 5;
+ string uniqueId = 6;
+ string seqNum = 7;
+ string tag = 8;
+ map<string, string> properties = 9;
+}
+
+message BatchMessage {
+ RequestHeader header = 1;
+ string producerGroup = 2;
+ string topic = 3;
+
+ message MessageItem {
+ string content = 1;
+ string ttl = 2;
+ string uniqueId = 3;
+ string seqNum = 4;
+ string tag = 5;
+ map<string, string> properties = 6;
+ }
+
+ repeated MessageItem messageItem = 4;
+}
+
+message Response {
+ string respCode = 1;
+ string respMsg = 2;
+ string respTime = 3;
+}
+```
+
+- subscription
+
+The following data model is used by `subscribe()` and `unsubscribe()` APIs.
+
+```
+message Subscription {
+ RequestHeader header = 1;
+ string consumerGroup = 2;
+
+ message SubscriptionItem {
+ enum SubscriptionMode {
+ CLUSTERING = 0;
+ BROADCASTING = 1;
+ }
+
+ enum SubscriptionType {
+ ASYNC = 0;
+ SYNC = 1;
+ }
+
+ string topic = 1;
+ SubscriptionMode mode = 2;
+ SubscriptionType type = 3;
+ }
+
+ repeated SubscriptionItem subscriptionItems = 3;
+ string url = 4;
+}
+```
+
+- heartbeat
+
+The following data model is used by `heartbeat()` API.
+
+```
+message Heartbeat {
+ enum ClientType {
+ PUB = 0;
+ SUB = 1;
+ }
+
+ RequestHeader header = 1;
+ ClientType clientType = 2;
+ string producerGroup = 3;
+ string consumerGroup = 4;
+
+ message HeartbeatItem {
+ string topic = 1;
+ string url = 2;
+ }
+
+ repeated HeartbeatItem heartbeatItems = 5;
+}
+```
+
+#### 3. service operations
+
+- event publisher service APIs
+
+```
+service PublisherService {
+ # Async event publish
+ rpc publish(EventMeshMessage) returns (Response);
+
+ # Sync event publish
+ rpc requestReply(EventMeshMessage) returns (Response);
+
+ # Batch event publish
+ rpc batchPublish(BatchMessage) returns (Response);
+}
+```
+
+- event consumer service APIs
+
+```
+service ConsumerService {
+ # The subscribed event will be delivered by invoking the webhook url in the Subscription
+ rpc subscribe(Subscription) returns (Response);
+
+ # The subscribed event will be delivered through stream of Message
+ rpc subscribeStream(Subscription) returns (stream EventMeshMessage);
+
+ rpc unsubscribe(Subscription) returns (Response);
+}
+```
+
+- client heartbeat service API
+
+```
+service HeartbeatService {
+ rpc heartbeat(Heartbeat) returns (Response);
+}
+```
\ No newline at end of file
diff --git a/eventmesh-common/build.gradle b/eventmesh-common/build.gradle
index 715ae91..d373fe1 100644
--- a/eventmesh-common/build.gradle
+++ b/eventmesh-common/build.gradle
@@ -38,6 +38,9 @@ dependencies {
implementation "io.netty:netty-all"
+ implementation "io.grpc:grpc-protobuf:1.15.0"
+ implementation "io.grpc:grpc-stub:1.15.0"
+
implementation "com.github.stefanbirkner:system-rules"
compileOnly 'org.projectlombok:lombok:1.18.22'
diff --git a/eventmesh-protocol-plugin/eventmesh-protocol-cloudevents/build.gradle b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/common/BatchMessageWrapper.java
similarity index 62%
copy from eventmesh-protocol-plugin/eventmesh-protocol-cloudevents/build.gradle
copy to eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/common/BatchMessageWrapper.java
index 7f77c3d..011bcb4 100644
--- a/eventmesh-protocol-plugin/eventmesh-protocol-cloudevents/build.gradle
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/common/BatchMessageWrapper.java
@@ -15,11 +15,20 @@
* limitations under the License.
*/
-dependencies {
- implementation project(":eventmesh-protocol-plugin:eventmesh-protocol-api")
- implementation "io.cloudevents:cloudevents-core"
- implementation "com.google.guava:guava"
- implementation "io.cloudevents:cloudevents-json-jackson"
+package org.apache.eventmesh.common.protocol.grpc.common;
- testImplementation "junit:junit"
+import org.apache.eventmesh.common.protocol.ProtocolTransportObject;
+import org.apache.eventmesh.common.protocol.grpc.protos.BatchMessage;
+
+public class BatchMessageWrapper implements ProtocolTransportObject {
+
+ private BatchMessage batchMessage;
+
+ public BatchMessageWrapper(BatchMessage batchMessage) {
+ this.batchMessage = batchMessage;
+ }
+
+ public BatchMessage getMessage() {
+ return batchMessage;
+ }
}
diff --git a/eventmesh-protocol-plugin/eventmesh-protocol-cloudevents/build.gradle b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/common/EventMeshMessageWrapper.java
similarity index 60%
copy from eventmesh-protocol-plugin/eventmesh-protocol-cloudevents/build.gradle
copy to eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/common/EventMeshMessageWrapper.java
index 7f77c3d..07bd66f 100644
--- a/eventmesh-protocol-plugin/eventmesh-protocol-cloudevents/build.gradle
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/common/EventMeshMessageWrapper.java
@@ -15,11 +15,20 @@
* limitations under the License.
*/
-dependencies {
- implementation project(":eventmesh-protocol-plugin:eventmesh-protocol-api")
- implementation "io.cloudevents:cloudevents-core"
- implementation "com.google.guava:guava"
- implementation "io.cloudevents:cloudevents-json-jackson"
+package org.apache.eventmesh.common.protocol.grpc.common;
- testImplementation "junit:junit"
+import org.apache.eventmesh.common.protocol.ProtocolTransportObject;
+import org.apache.eventmesh.common.protocol.grpc.protos.EventMeshMessage;
+
+public class EventMeshMessageWrapper implements ProtocolTransportObject {
+
+ private EventMeshMessage eventMeshMessage;
+
+ public EventMeshMessageWrapper(EventMeshMessage eventMeshMessage) {
+ this.eventMeshMessage = eventMeshMessage;
+ }
+
+ public EventMeshMessage getMessage() {
+ return eventMeshMessage;
+ }
}
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/common/ProtocolKey.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/common/ProtocolKey.java
new file mode 100644
index 0000000..0294ce1
--- /dev/null
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/common/ProtocolKey.java
@@ -0,0 +1,42 @@
+/*
+ * 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 org.apache.eventmesh.common.protocol.grpc.common;
+
+public class ProtocolKey {
+
+ public static final String ENV = "env";
+ public static final String IDC = "idc";
+ public static final String SYS = "sys";
+ public static final String PID = "pid";
+ public static final String IP = "ip";
+ public static final String USERNAME = "username";
+ public static final String PASSWD = "passwd";
+ public static final String LANGUAGE = "language";
+
+ public static final String PROTOCOL_TYPE = "protocoltype";
+ public static final String PROTOCOL_VERSION = "protocolversion";
+ public static final String PROTOCOL_DESC = "protocoldesc";
+
+ public static final String SEQ_NUM = "seqnum";
+ public static final String UNIQUE_ID = "uniqueid";
+ public static final String TTL = "ttl";
+ public static final String PRODUCERGROUP = "producergroup";
+ public static final String TAG = "tag";
+
+ public static final String CONTENT_TYPE = "contenttype";
+}
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/common/StatusCode.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/common/StatusCode.java
new file mode 100644
index 0000000..a252964
--- /dev/null
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/common/StatusCode.java
@@ -0,0 +1,69 @@
+/*
+ * 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 org.apache.eventmesh.common.protocol.grpc.common;
+
+public enum StatusCode {
+
+ SUCCESS("0", "success"),
+ OVERLOAD("1", "eventMesh overload, try later, "),
+ EVENTMESH_REQUESTCODE_INVALID("2", "requestCode can't be null, or must be number, "),
+ EVENTMESH_SEND_SYNC_MSG_ERR("3", "eventMesh send rr msg err, "),
+ EVENTMESH_WAITING_RR_MSG_ERR("4", "eventMesh waiting rr msg err, "),
+ EVENTMESH_PROTOCOL_HEADER_ERR("6", "eventMesh protocol[header] err, "),
+ EVENTMESH_PROTOCOL_BODY_ERR("7", "eventMesh protocol[body] err, "),
+ EVENTMESH_STOP("8", "eventMesh will stop or had stopped, "),
+ EVENTMESH_REJECT_BY_PROCESSOR_ERROR("9", "eventMesh reject by processor error, "),
+ EVENTMESH_BATCH_PUBLISH_ERR("10", "eventMesh batch publish messages error, "),
+ EVENTMESH_SEND_BATCHLOG_MSG_ERR("17", "eventMesh send batchlog msg err, "),
+ EVENTMESH_BATCH_SPEED_OVER_LIMIT_ERR("11", "eventMesh batch msg speed over the limit, "),
+ EVENTMESH_PACKAGE_MSG_ERR("12", "eventMesh package msg err, "),
+ EVENTMESH_GROUP_PRODUCER_STOPED_ERR("13", "eventMesh group producer stopped, "),
+ EVENTMESH_SEND_ASYNC_MSG_ERR("14", "eventMesh send async msg err, "),
+ EVENTMESH_REPLY_MSG_ERR("15", "eventMesh reply msg err, "),
+ EVENTMESH_RUNTIME_ERR("16", "eventMesh runtime err, "),
+ EVENTMESH_SUBSCRIBE_ERR("17", "eventMesh subscribe err"),
+ EVENTMESH_UNSUBSCRIBE_ERR("18", "eventMesh unsubscribe err"),
+ EVENTMESH_HEARTBEAT_ERR("19", "eventMesh heartbeat err"),
+ EVENTMESH_ACL_ERR("20", "eventMesh acl err"),
+ EVENTMESH_SEND_MESSAGE_SPEED_OVER_LIMIT_ERR("21", "eventMesh send message speed over the limit err.");
+
+ private String retCode;
+
+ private String errMsg;
+
+ StatusCode(String retCode, String errMsg) {
+ this.retCode = retCode;
+ this.errMsg = errMsg;
+ }
+
+ public String getRetCode() {
+ return retCode;
+ }
+
+ public void setRetCode(String retCode) {
+ this.retCode = retCode;
+ }
+
+ public String getErrMsg() {
+ return errMsg;
+ }
+
+ public void setErrMsg(String errMsg) {
+ this.errMsg = errMsg;
+ }
+}
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/BatchMessage.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/BatchMessage.java
new file mode 100644
index 0000000..d74a616
--- /dev/null
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/BatchMessage.java
@@ -0,0 +1,2573 @@
+/*
+ * 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.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: eventmesh-client.proto
+
+package org.apache.eventmesh.common.protocol.grpc.protos;
+
+/**
+ * Protobuf type {@code eventmesh.common.protocol.grpc.BatchMessage}
+ */
+public final class BatchMessage extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:eventmesh.common.protocol.grpc.BatchMessage)
+ BatchMessageOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use BatchMessage.newBuilder() to construct.
+ private BatchMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
+ super(builder);
+ }
+ private BatchMessage() {
+ producerGroup_ = "";
+ topic_ = "";
+ messageItem_ = java.util.Collections.emptyList();
+ }
+
+ @Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private BatchMessage(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ 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;
+ default: {
+ if (!parseUnknownFieldProto3(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ RequestHeader.Builder subBuilder = null;
+ if (header_ != null) {
+ subBuilder = header_.toBuilder();
+ }
+ header_ = input.readMessage(RequestHeader.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(header_);
+ header_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ case 18: {
+ String s = input.readStringRequireUtf8();
+
+ producerGroup_ = s;
+ break;
+ }
+ case 26: {
+ String s = input.readStringRequireUtf8();
+
+ topic_ = s;
+ break;
+ }
+ case 34: {
+ if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
+ messageItem_ = new java.util.ArrayList<MessageItem>();
+ mutable_bitField0_ |= 0x00000008;
+ }
+ messageItem_.add(
+ input.readMessage(MessageItem.parser(), extensionRegistry));
+ 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 {
+ if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
+ messageItem_ = java.util.Collections.unmodifiableList(messageItem_);
+ }
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_BatchMessage_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_BatchMessage_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ BatchMessage.class, Builder.class);
+ }
+
+ public interface MessageItemOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:eventmesh.common.protocol.grpc.BatchMessage.MessageItem)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * <code>string content = 1;</code>
+ */
+ String getContent();
+ /**
+ * <code>string content = 1;</code>
+ */
+ com.google.protobuf.ByteString
+ getContentBytes();
+
+ /**
+ * <code>string ttl = 2;</code>
+ */
+ String getTtl();
+ /**
+ * <code>string ttl = 2;</code>
+ */
+ com.google.protobuf.ByteString
+ getTtlBytes();
+
+ /**
+ * <code>string uniqueId = 3;</code>
+ */
+ String getUniqueId();
+ /**
+ * <code>string uniqueId = 3;</code>
+ */
+ com.google.protobuf.ByteString
+ getUniqueIdBytes();
+
+ /**
+ * <code>string seqNum = 4;</code>
+ */
+ String getSeqNum();
+ /**
+ * <code>string seqNum = 4;</code>
+ */
+ com.google.protobuf.ByteString
+ getSeqNumBytes();
+
+ /**
+ * <code>string tag = 5;</code>
+ */
+ String getTag();
+ /**
+ * <code>string tag = 5;</code>
+ */
+ com.google.protobuf.ByteString
+ getTagBytes();
+
+ /**
+ * <code>map<string, string> properties = 6;</code>
+ */
+ int getPropertiesCount();
+ /**
+ * <code>map<string, string> properties = 6;</code>
+ */
+ boolean containsProperties(
+ String key);
+ /**
+ * Use {@link #getPropertiesMap()} instead.
+ */
+ @Deprecated
+ java.util.Map<String, String>
+ getProperties();
+ /**
+ * <code>map<string, string> properties = 6;</code>
+ */
+ java.util.Map<String, String>
+ getPropertiesMap();
+ /**
+ * <code>map<string, string> properties = 6;</code>
+ */
+
+ String getPropertiesOrDefault(
+ String key,
+ String defaultValue);
+ /**
+ * <code>map<string, string> properties = 6;</code>
+ */
+
+ String getPropertiesOrThrow(
+ String key);
+ }
+ /**
+ * Protobuf type {@code eventmesh.common.protocol.grpc.BatchMessage.MessageItem}
+ */
+ public static final class MessageItem extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:eventmesh.common.protocol.grpc.BatchMessage.MessageItem)
+ MessageItemOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use MessageItem.newBuilder() to construct.
+ private MessageItem(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
+ super(builder);
+ }
+ private MessageItem() {
+ content_ = "";
+ ttl_ = "";
+ uniqueId_ = "";
+ seqNum_ = "";
+ tag_ = "";
+ }
+
+ @Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private MessageItem(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ 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;
+ default: {
+ if (!parseUnknownFieldProto3(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ String s = input.readStringRequireUtf8();
+
+ content_ = s;
+ break;
+ }
+ case 18: {
+ String s = input.readStringRequireUtf8();
+
+ ttl_ = s;
+ break;
+ }
+ case 26: {
+ String s = input.readStringRequireUtf8();
+
+ uniqueId_ = s;
+ break;
+ }
+ case 34: {
+ String s = input.readStringRequireUtf8();
+
+ seqNum_ = s;
+ break;
+ }
+ case 42: {
+ String s = input.readStringRequireUtf8();
+
+ tag_ = s;
+ break;
+ }
+ case 50: {
+ if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
+ properties_ = com.google.protobuf.MapField.newMapField(
+ PropertiesDefaultEntryHolder.defaultEntry);
+ mutable_bitField0_ |= 0x00000020;
+ }
+ com.google.protobuf.MapEntry<String, String>
+ properties__ = input.readMessage(
+ PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
+ properties_.getMutableMap().put(
+ properties__.getKey(), properties__.getValue());
+ 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 EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_BatchMessage_MessageItem_descriptor;
+ }
+
+ @SuppressWarnings({"rawtypes"})
+ protected com.google.protobuf.MapField internalGetMapField(
+ int number) {
+ switch (number) {
+ case 6:
+ return internalGetProperties();
+ default:
+ throw new RuntimeException(
+ "Invalid map field number: " + number);
+ }
+ }
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_BatchMessage_MessageItem_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ MessageItem.class, Builder.class);
+ }
+
+ private int bitField0_;
+ public static final int CONTENT_FIELD_NUMBER = 1;
+ private volatile Object content_;
+ /**
+ * <code>string content = 1;</code>
+ */
+ public String getContent() {
+ Object ref = content_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ content_ = s;
+ return s;
+ }
+ }
+ /**
+ * <code>string content = 1;</code>
+ */
+ public com.google.protobuf.ByteString
+ getContentBytes() {
+ Object ref = content_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ content_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TTL_FIELD_NUMBER = 2;
+ private volatile Object ttl_;
+ /**
+ * <code>string ttl = 2;</code>
+ */
+ public String getTtl() {
+ Object ref = ttl_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ ttl_ = s;
+ return s;
+ }
+ }
+ /**
+ * <code>string ttl = 2;</code>
+ */
+ public com.google.protobuf.ByteString
+ getTtlBytes() {
+ Object ref = ttl_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ ttl_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int UNIQUEID_FIELD_NUMBER = 3;
+ private volatile Object uniqueId_;
+ /**
+ * <code>string uniqueId = 3;</code>
+ */
+ public String getUniqueId() {
+ Object ref = uniqueId_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ uniqueId_ = s;
+ return s;
+ }
+ }
+ /**
+ * <code>string uniqueId = 3;</code>
+ */
+ public com.google.protobuf.ByteString
+ getUniqueIdBytes() {
+ Object ref = uniqueId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ uniqueId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SEQNUM_FIELD_NUMBER = 4;
+ private volatile Object seqNum_;
+ /**
+ * <code>string seqNum = 4;</code>
+ */
+ public String getSeqNum() {
+ Object ref = seqNum_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ seqNum_ = s;
+ return s;
+ }
+ }
+ /**
+ * <code>string seqNum = 4;</code>
+ */
+ public com.google.protobuf.ByteString
+ getSeqNumBytes() {
+ Object ref = seqNum_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ seqNum_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TAG_FIELD_NUMBER = 5;
+ private volatile Object tag_;
+ /**
+ * <code>string tag = 5;</code>
+ */
+ public String getTag() {
+ Object ref = tag_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ tag_ = s;
+ return s;
+ }
+ }
+ /**
+ * <code>string tag = 5;</code>
+ */
+ public com.google.protobuf.ByteString
+ getTagBytes() {
+ Object ref = tag_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ tag_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PROPERTIES_FIELD_NUMBER = 6;
+ private static final class PropertiesDefaultEntryHolder {
+ static final com.google.protobuf.MapEntry<
+ String, String> defaultEntry =
+ com.google.protobuf.MapEntry
+ .<String, String>newDefaultInstance(
+ EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_BatchMessage_MessageItem_PropertiesEntry_descriptor,
+ com.google.protobuf.WireFormat.FieldType.STRING,
+ "",
+ com.google.protobuf.WireFormat.FieldType.STRING,
+ "");
+ }
+ private com.google.protobuf.MapField<
+ String, String> properties_;
+ private com.google.protobuf.MapField<String, String>
+ internalGetProperties() {
+ if (properties_ == null) {
+ return com.google.protobuf.MapField.emptyMapField(
+ PropertiesDefaultEntryHolder.defaultEntry);
+ }
+ return properties_;
+ }
+
+ public int getPropertiesCount() {
+ return internalGetProperties().getMap().size();
+ }
+ /**
+ * <code>map<string, string> properties = 6;</code>
+ */
+
+ public boolean containsProperties(
+ String key) {
+ if (key == null) { throw new NullPointerException(); }
+ return internalGetProperties().getMap().containsKey(key);
+ }
+ /**
+ * Use {@link #getPropertiesMap()} instead.
+ */
+ @Deprecated
+ public java.util.Map<String, String> getProperties() {
+ return getPropertiesMap();
+ }
+ /**
+ * <code>map<string, string> properties = 6;</code>
+ */
+
+ public java.util.Map<String, String> getPropertiesMap() {
+ return internalGetProperties().getMap();
+ }
+ /**
+ * <code>map<string, string> properties = 6;</code>
+ */
+
+ public String getPropertiesOrDefault(
+ String key,
+ String defaultValue) {
+ if (key == null) { throw new NullPointerException(); }
+ java.util.Map<String, String> map =
+ internalGetProperties().getMap();
+ return map.containsKey(key) ? map.get(key) : defaultValue;
+ }
+ /**
+ * <code>map<string, string> properties = 6;</code>
+ */
+
+ public String getPropertiesOrThrow(
+ String key) {
+ if (key == null) { throw new NullPointerException(); }
+ java.util.Map<String, String> map =
+ internalGetProperties().getMap();
+ if (!map.containsKey(key)) {
+ throw new IllegalArgumentException();
+ }
+ return map.get(key);
+ }
+
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (!getContentBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, content_);
+ }
+ if (!getTtlBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ttl_);
+ }
+ if (!getUniqueIdBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, uniqueId_);
+ }
+ if (!getSeqNumBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, seqNum_);
+ }
+ if (!getTagBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 5, tag_);
+ }
+ com.google.protobuf.GeneratedMessageV3
+ .serializeStringMapTo(
+ output,
+ internalGetProperties(),
+ PropertiesDefaultEntryHolder.defaultEntry,
+ 6);
+ unknownFields.writeTo(output);
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getContentBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, content_);
+ }
+ if (!getTtlBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ttl_);
+ }
+ if (!getUniqueIdBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, uniqueId_);
+ }
+ if (!getSeqNumBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, seqNum_);
+ }
+ if (!getTagBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, tag_);
+ }
+ for (java.util.Map.Entry<String, String> entry
+ : internalGetProperties().getMap().entrySet()) {
+ com.google.protobuf.MapEntry<String, String>
+ properties__ = PropertiesDefaultEntryHolder.defaultEntry.newBuilderForType()
+ .setKey(entry.getKey())
+ .setValue(entry.getValue())
+ .build();
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(6, properties__);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof MessageItem)) {
+ return super.equals(obj);
+ }
+ MessageItem other = (MessageItem) obj;
+
+ boolean result = true;
+ result = result && getContent()
+ .equals(other.getContent());
+ result = result && getTtl()
+ .equals(other.getTtl());
+ result = result && getUniqueId()
+ .equals(other.getUniqueId());
+ result = result && getSeqNum()
+ .equals(other.getSeqNum());
+ result = result && getTag()
+ .equals(other.getTag());
+ result = result && internalGetProperties().equals(
+ other.internalGetProperties());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + CONTENT_FIELD_NUMBER;
+ hash = (53 * hash) + getContent().hashCode();
+ hash = (37 * hash) + TTL_FIELD_NUMBER;
+ hash = (53 * hash) + getTtl().hashCode();
+ hash = (37 * hash) + UNIQUEID_FIELD_NUMBER;
+ hash = (53 * hash) + getUniqueId().hashCode();
+ hash = (37 * hash) + SEQNUM_FIELD_NUMBER;
+ hash = (53 * hash) + getSeqNum().hashCode();
+ hash = (37 * hash) + TAG_FIELD_NUMBER;
+ hash = (53 * hash) + getTag().hashCode();
+ if (!internalGetProperties().getMap().isEmpty()) {
+ hash = (37 * hash) + PROPERTIES_FIELD_NUMBER;
+ hash = (53 * hash) + internalGetProperties().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static MessageItem parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static MessageItem parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static MessageItem parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static MessageItem parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static MessageItem parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static MessageItem parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static MessageItem parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static MessageItem 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 MessageItem parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static MessageItem 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 MessageItem parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static MessageItem parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(MessageItem prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(
+ BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code eventmesh.common.protocol.grpc.BatchMessage.MessageItem}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
+ // @@protoc_insertion_point(builder_implements:eventmesh.common.protocol.grpc.BatchMessage.MessageItem)
+ MessageItemOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_BatchMessage_MessageItem_descriptor;
+ }
+
+ @SuppressWarnings({"rawtypes"})
+ protected com.google.protobuf.MapField internalGetMapField(
+ int number) {
+ switch (number) {
+ case 6:
+ return internalGetProperties();
+ default:
+ throw new RuntimeException(
+ "Invalid map field number: " + number);
+ }
+ }
+ @SuppressWarnings({"rawtypes"})
+ protected com.google.protobuf.MapField internalGetMutableMapField(
+ int number) {
+ switch (number) {
+ case 6:
+ return internalGetMutableProperties();
+ default:
+ throw new RuntimeException(
+ "Invalid map field number: " + number);
+ }
+ }
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_BatchMessage_MessageItem_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ MessageItem.class, Builder.class);
+ }
+
+ // Construct using org.apache.eventmesh.common.protocol.grpc.protos.BatchMessage.MessageItem.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
+ }
+ }
+ public Builder clear() {
+ super.clear();
+ content_ = "";
+
+ ttl_ = "";
+
+ uniqueId_ = "";
+
+ seqNum_ = "";
+
+ tag_ = "";
+
+ internalGetMutableProperties().clear();
+ return this;
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_BatchMessage_MessageItem_descriptor;
+ }
+
+ public MessageItem getDefaultInstanceForType() {
+ return MessageItem.getDefaultInstance();
+ }
+
+ public MessageItem build() {
+ MessageItem result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public MessageItem buildPartial() {
+ MessageItem result = new MessageItem(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ result.content_ = content_;
+ result.ttl_ = ttl_;
+ result.uniqueId_ = uniqueId_;
+ result.seqNum_ = seqNum_;
+ result.tag_ = tag_;
+ result.properties_ = internalGetProperties();
+ result.properties_.makeImmutable();
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder clone() {
+ return (Builder) super.clone();
+ }
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ Object value) {
+ return (Builder) super.setField(field, value);
+ }
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return (Builder) super.clearField(field);
+ }
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return (Builder) super.clearOneof(oneof);
+ }
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, Object value) {
+ return (Builder) super.setRepeatedField(field, index, value);
+ }
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ Object value) {
+ return (Builder) super.addRepeatedField(field, value);
+ }
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof MessageItem) {
+ return mergeFrom((MessageItem)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(MessageItem other) {
+ if (other == MessageItem.getDefaultInstance()) return this;
+ if (!other.getContent().isEmpty()) {
+ content_ = other.content_;
+ onChanged();
+ }
+ if (!other.getTtl().isEmpty()) {
+ ttl_ = other.ttl_;
+ onChanged();
+ }
+ if (!other.getUniqueId().isEmpty()) {
+ uniqueId_ = other.uniqueId_;
+ onChanged();
+ }
+ if (!other.getSeqNum().isEmpty()) {
+ seqNum_ = other.seqNum_;
+ onChanged();
+ }
+ if (!other.getTag().isEmpty()) {
+ tag_ = other.tag_;
+ onChanged();
+ }
+ internalGetMutableProperties().mergeFrom(
+ other.internalGetProperties());
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ MessageItem parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (MessageItem) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ private Object content_ = "";
+ /**
+ * <code>string content = 1;</code>
+ */
+ public String getContent() {
+ Object ref = content_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ content_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+ /**
+ * <code>string content = 1;</code>
+ */
+ public com.google.protobuf.ByteString
+ getContentBytes() {
+ Object ref = content_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ content_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>string content = 1;</code>
+ */
+ public Builder setContent(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ content_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string content = 1;</code>
+ */
+ public Builder clearContent() {
+
+ content_ = getDefaultInstance().getContent();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string content = 1;</code>
+ */
+ public Builder setContentBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ content_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object ttl_ = "";
+ /**
+ * <code>string ttl = 2;</code>
+ */
+ public String getTtl() {
+ Object ref = ttl_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ ttl_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+ /**
+ * <code>string ttl = 2;</code>
+ */
+ public com.google.protobuf.ByteString
+ getTtlBytes() {
+ Object ref = ttl_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ ttl_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>string ttl = 2;</code>
+ */
+ public Builder setTtl(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ ttl_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string ttl = 2;</code>
+ */
+ public Builder clearTtl() {
+
+ ttl_ = getDefaultInstance().getTtl();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string ttl = 2;</code>
+ */
+ public Builder setTtlBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ ttl_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object uniqueId_ = "";
+ /**
+ * <code>string uniqueId = 3;</code>
+ */
+ public String getUniqueId() {
+ Object ref = uniqueId_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ uniqueId_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+ /**
+ * <code>string uniqueId = 3;</code>
+ */
+ public com.google.protobuf.ByteString
+ getUniqueIdBytes() {
+ Object ref = uniqueId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ uniqueId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>string uniqueId = 3;</code>
+ */
+ public Builder setUniqueId(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ uniqueId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string uniqueId = 3;</code>
+ */
+ public Builder clearUniqueId() {
+
+ uniqueId_ = getDefaultInstance().getUniqueId();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string uniqueId = 3;</code>
+ */
+ public Builder setUniqueIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ uniqueId_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object seqNum_ = "";
+ /**
+ * <code>string seqNum = 4;</code>
+ */
+ public String getSeqNum() {
+ Object ref = seqNum_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ seqNum_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+ /**
+ * <code>string seqNum = 4;</code>
+ */
+ public com.google.protobuf.ByteString
+ getSeqNumBytes() {
+ Object ref = seqNum_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ seqNum_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>string seqNum = 4;</code>
+ */
+ public Builder setSeqNum(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ seqNum_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string seqNum = 4;</code>
+ */
+ public Builder clearSeqNum() {
+
+ seqNum_ = getDefaultInstance().getSeqNum();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string seqNum = 4;</code>
+ */
+ public Builder setSeqNumBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ seqNum_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object tag_ = "";
+ /**
+ * <code>string tag = 5;</code>
+ */
+ public String getTag() {
+ Object ref = tag_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ tag_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+ /**
+ * <code>string tag = 5;</code>
+ */
+ public com.google.protobuf.ByteString
+ getTagBytes() {
+ Object ref = tag_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ tag_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>string tag = 5;</code>
+ */
+ public Builder setTag(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ tag_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string tag = 5;</code>
+ */
+ public Builder clearTag() {
+
+ tag_ = getDefaultInstance().getTag();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string tag = 5;</code>
+ */
+ public Builder setTagBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ tag_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.MapField<
+ String, String> properties_;
+ private com.google.protobuf.MapField<String, String>
+ internalGetProperties() {
+ if (properties_ == null) {
+ return com.google.protobuf.MapField.emptyMapField(
+ PropertiesDefaultEntryHolder.defaultEntry);
+ }
+ return properties_;
+ }
+ private com.google.protobuf.MapField<String, String>
+ internalGetMutableProperties() {
+ onChanged();;
+ if (properties_ == null) {
+ properties_ = com.google.protobuf.MapField.newMapField(
+ PropertiesDefaultEntryHolder.defaultEntry);
+ }
+ if (!properties_.isMutable()) {
+ properties_ = properties_.copy();
+ }
+ return properties_;
+ }
+
+ public int getPropertiesCount() {
+ return internalGetProperties().getMap().size();
+ }
+ /**
+ * <code>map<string, string> properties = 6;</code>
+ */
+
+ public boolean containsProperties(
+ String key) {
+ if (key == null) { throw new NullPointerException(); }
+ return internalGetProperties().getMap().containsKey(key);
+ }
+ /**
+ * Use {@link #getPropertiesMap()} instead.
+ */
+ @Deprecated
+ public java.util.Map<String, String> getProperties() {
+ return getPropertiesMap();
+ }
+ /**
+ * <code>map<string, string> properties = 6;</code>
+ */
+
+ public java.util.Map<String, String> getPropertiesMap() {
+ return internalGetProperties().getMap();
+ }
+ /**
+ * <code>map<string, string> properties = 6;</code>
+ */
+
+ public String getPropertiesOrDefault(
+ String key,
+ String defaultValue) {
+ if (key == null) { throw new NullPointerException(); }
+ java.util.Map<String, String> map =
+ internalGetProperties().getMap();
+ return map.containsKey(key) ? map.get(key) : defaultValue;
+ }
+ /**
+ * <code>map<string, string> properties = 6;</code>
+ */
+
+ public String getPropertiesOrThrow(
+ String key) {
+ if (key == null) { throw new NullPointerException(); }
+ java.util.Map<String, String> map =
+ internalGetProperties().getMap();
+ if (!map.containsKey(key)) {
+ throw new IllegalArgumentException();
+ }
+ return map.get(key);
+ }
+
+ public Builder clearProperties() {
+ internalGetMutableProperties().getMutableMap()
+ .clear();
+ return this;
+ }
+ /**
+ * <code>map<string, string> properties = 6;</code>
+ */
+
+ public Builder removeProperties(
+ String key) {
+ if (key == null) { throw new NullPointerException(); }
+ internalGetMutableProperties().getMutableMap()
+ .remove(key);
+ return this;
+ }
+ /**
+ * Use alternate mutation accessors instead.
+ */
+ @Deprecated
+ public java.util.Map<String, String>
+ getMutableProperties() {
+ return internalGetMutableProperties().getMutableMap();
+ }
+ /**
+ * <code>map<string, string> properties = 6;</code>
+ */
+ public Builder putProperties(
+ String key,
+ String value) {
+ if (key == null) { throw new NullPointerException(); }
+ if (value == null) { throw new NullPointerException(); }
+ internalGetMutableProperties().getMutableMap()
+ .put(key, value);
+ return this;
+ }
+ /**
+ * <code>map<string, string> properties = 6;</code>
+ */
+
+ public Builder putAllProperties(
+ java.util.Map<String, String> values) {
+ internalGetMutableProperties().getMutableMap()
+ .putAll(values);
+ return this;
+ }
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:eventmesh.common.protocol.grpc.BatchMessage.MessageItem)
+ }
+
+ // @@protoc_insertion_point(class_scope:eventmesh.common.protocol.grpc.BatchMessage.MessageItem)
+ private static final MessageItem DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new MessageItem();
+ }
+
+ public static MessageItem getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser<MessageItem>
+ PARSER = new com.google.protobuf.AbstractParser<MessageItem>() {
+ public MessageItem parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new MessageItem(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser<MessageItem> parser() {
+ return PARSER;
+ }
+
+ @Override
+ public com.google.protobuf.Parser<MessageItem> getParserForType() {
+ return PARSER;
+ }
+
+ public MessageItem getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ private int bitField0_;
+ public static final int HEADER_FIELD_NUMBER = 1;
+ private RequestHeader header_;
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ public boolean hasHeader() {
+ return header_ != null;
+ }
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ public RequestHeader getHeader() {
+ return header_ == null ? RequestHeader.getDefaultInstance() : header_;
+ }
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ public RequestHeaderOrBuilder getHeaderOrBuilder() {
+ return getHeader();
+ }
+
+ public static final int PRODUCERGROUP_FIELD_NUMBER = 2;
+ private volatile Object producerGroup_;
+ /**
+ * <code>string producerGroup = 2;</code>
+ */
+ public String getProducerGroup() {
+ Object ref = producerGroup_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ producerGroup_ = s;
+ return s;
+ }
+ }
+ /**
+ * <code>string producerGroup = 2;</code>
+ */
+ public com.google.protobuf.ByteString
+ getProducerGroupBytes() {
+ Object ref = producerGroup_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ producerGroup_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TOPIC_FIELD_NUMBER = 3;
+ private volatile Object topic_;
+ /**
+ * <code>string topic = 3;</code>
+ */
+ public String getTopic() {
+ Object ref = topic_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ topic_ = s;
+ return s;
+ }
+ }
+ /**
+ * <code>string topic = 3;</code>
+ */
+ public com.google.protobuf.ByteString
+ getTopicBytes() {
+ Object ref = topic_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ topic_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int MESSAGEITEM_FIELD_NUMBER = 4;
+ private java.util.List<MessageItem> messageItem_;
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;</code>
+ */
+ public java.util.List<MessageItem> getMessageItemList() {
+ return messageItem_;
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;</code>
+ */
+ public java.util.List<? extends MessageItemOrBuilder>
+ getMessageItemOrBuilderList() {
+ return messageItem_;
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;</code>
+ */
+ public int getMessageItemCount() {
+ return messageItem_.size();
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;</code>
+ */
+ public MessageItem getMessageItem(int index) {
+ return messageItem_.get(index);
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;</code>
+ */
+ public MessageItemOrBuilder getMessageItemOrBuilder(
+ int index) {
+ return messageItem_.get(index);
+ }
+
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (header_ != null) {
+ output.writeMessage(1, getHeader());
+ }
+ if (!getProducerGroupBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, producerGroup_);
+ }
+ if (!getTopicBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, topic_);
+ }
+ for (int i = 0; i < messageItem_.size(); i++) {
+ output.writeMessage(4, messageItem_.get(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (header_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(1, getHeader());
+ }
+ if (!getProducerGroupBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, producerGroup_);
+ }
+ if (!getTopicBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, topic_);
+ }
+ for (int i = 0; i < messageItem_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(4, messageItem_.get(i));
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof BatchMessage)) {
+ return super.equals(obj);
+ }
+ BatchMessage other = (BatchMessage) obj;
+
+ boolean result = true;
+ result = result && (hasHeader() == other.hasHeader());
+ if (hasHeader()) {
+ result = result && getHeader()
+ .equals(other.getHeader());
+ }
+ result = result && getProducerGroup()
+ .equals(other.getProducerGroup());
+ result = result && getTopic()
+ .equals(other.getTopic());
+ result = result && getMessageItemList()
+ .equals(other.getMessageItemList());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasHeader()) {
+ hash = (37 * hash) + HEADER_FIELD_NUMBER;
+ hash = (53 * hash) + getHeader().hashCode();
+ }
+ hash = (37 * hash) + PRODUCERGROUP_FIELD_NUMBER;
+ hash = (53 * hash) + getProducerGroup().hashCode();
+ hash = (37 * hash) + TOPIC_FIELD_NUMBER;
+ hash = (53 * hash) + getTopic().hashCode();
+ if (getMessageItemCount() > 0) {
+ hash = (37 * hash) + MESSAGEITEM_FIELD_NUMBER;
+ hash = (53 * hash) + getMessageItemList().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static BatchMessage parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static BatchMessage parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static BatchMessage parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static BatchMessage parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static BatchMessage parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static BatchMessage parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static BatchMessage parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static BatchMessage 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 BatchMessage parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static BatchMessage 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 BatchMessage parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static BatchMessage parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(BatchMessage prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(
+ BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code eventmesh.common.protocol.grpc.BatchMessage}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
+ // @@protoc_insertion_point(builder_implements:eventmesh.common.protocol.grpc.BatchMessage)
+ BatchMessageOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_BatchMessage_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_BatchMessage_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ BatchMessage.class, Builder.class);
+ }
+
+ // Construct using org.apache.eventmesh.common.protocol.grpc.protos.BatchMessage.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
+ getMessageItemFieldBuilder();
+ }
+ }
+ public Builder clear() {
+ super.clear();
+ if (headerBuilder_ == null) {
+ header_ = null;
+ } else {
+ header_ = null;
+ headerBuilder_ = null;
+ }
+ producerGroup_ = "";
+
+ topic_ = "";
+
+ if (messageItemBuilder_ == null) {
+ messageItem_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000008);
+ } else {
+ messageItemBuilder_.clear();
+ }
+ return this;
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_BatchMessage_descriptor;
+ }
+
+ public BatchMessage getDefaultInstanceForType() {
+ return BatchMessage.getDefaultInstance();
+ }
+
+ public BatchMessage build() {
+ BatchMessage result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public BatchMessage buildPartial() {
+ BatchMessage result = new BatchMessage(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (headerBuilder_ == null) {
+ result.header_ = header_;
+ } else {
+ result.header_ = headerBuilder_.build();
+ }
+ result.producerGroup_ = producerGroup_;
+ result.topic_ = topic_;
+ if (messageItemBuilder_ == null) {
+ if (((bitField0_ & 0x00000008) == 0x00000008)) {
+ messageItem_ = java.util.Collections.unmodifiableList(messageItem_);
+ bitField0_ = (bitField0_ & ~0x00000008);
+ }
+ result.messageItem_ = messageItem_;
+ } else {
+ result.messageItem_ = messageItemBuilder_.build();
+ }
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder clone() {
+ return (Builder) super.clone();
+ }
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ Object value) {
+ return (Builder) super.setField(field, value);
+ }
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return (Builder) super.clearField(field);
+ }
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return (Builder) super.clearOneof(oneof);
+ }
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, Object value) {
+ return (Builder) super.setRepeatedField(field, index, value);
+ }
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ Object value) {
+ return (Builder) super.addRepeatedField(field, value);
+ }
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof BatchMessage) {
+ return mergeFrom((BatchMessage)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(BatchMessage other) {
+ if (other == BatchMessage.getDefaultInstance()) return this;
+ if (other.hasHeader()) {
+ mergeHeader(other.getHeader());
+ }
+ if (!other.getProducerGroup().isEmpty()) {
+ producerGroup_ = other.producerGroup_;
+ onChanged();
+ }
+ if (!other.getTopic().isEmpty()) {
+ topic_ = other.topic_;
+ onChanged();
+ }
+ if (messageItemBuilder_ == null) {
+ if (!other.messageItem_.isEmpty()) {
+ if (messageItem_.isEmpty()) {
+ messageItem_ = other.messageItem_;
+ bitField0_ = (bitField0_ & ~0x00000008);
+ } else {
+ ensureMessageItemIsMutable();
+ messageItem_.addAll(other.messageItem_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.messageItem_.isEmpty()) {
+ if (messageItemBuilder_.isEmpty()) {
+ messageItemBuilder_.dispose();
+ messageItemBuilder_ = null;
+ messageItem_ = other.messageItem_;
+ bitField0_ = (bitField0_ & ~0x00000008);
+ messageItemBuilder_ =
+ com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
+ getMessageItemFieldBuilder() : null;
+ } else {
+ messageItemBuilder_.addAllMessages(other.messageItem_);
+ }
+ }
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ BatchMessage parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (BatchMessage) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ private RequestHeader header_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ RequestHeader, RequestHeader.Builder, RequestHeaderOrBuilder> headerBuilder_;
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ public boolean hasHeader() {
+ return headerBuilder_ != null || header_ != null;
+ }
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ public RequestHeader getHeader() {
+ if (headerBuilder_ == null) {
+ return header_ == null ? RequestHeader.getDefaultInstance() : header_;
+ } else {
+ return headerBuilder_.getMessage();
+ }
+ }
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ public Builder setHeader(RequestHeader value) {
+ if (headerBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ header_ = value;
+ onChanged();
+ } else {
+ headerBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ public Builder setHeader(
+ RequestHeader.Builder builderForValue) {
+ if (headerBuilder_ == null) {
+ header_ = builderForValue.build();
+ onChanged();
+ } else {
+ headerBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ public Builder mergeHeader(RequestHeader value) {
+ if (headerBuilder_ == null) {
+ if (header_ != null) {
+ header_ =
+ RequestHeader.newBuilder(header_).mergeFrom(value).buildPartial();
+ } else {
+ header_ = value;
+ }
+ onChanged();
+ } else {
+ headerBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ public Builder clearHeader() {
+ if (headerBuilder_ == null) {
+ header_ = null;
+ onChanged();
+ } else {
+ header_ = null;
+ headerBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ public RequestHeader.Builder getHeaderBuilder() {
+
+ onChanged();
+ return getHeaderFieldBuilder().getBuilder();
+ }
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ public RequestHeaderOrBuilder getHeaderOrBuilder() {
+ if (headerBuilder_ != null) {
+ return headerBuilder_.getMessageOrBuilder();
+ } else {
+ return header_ == null ?
+ RequestHeader.getDefaultInstance() : header_;
+ }
+ }
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ RequestHeader, RequestHeader.Builder, RequestHeaderOrBuilder>
+ getHeaderFieldBuilder() {
+ if (headerBuilder_ == null) {
+ headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ RequestHeader, RequestHeader.Builder, RequestHeaderOrBuilder>(
+ getHeader(),
+ getParentForChildren(),
+ isClean());
+ header_ = null;
+ }
+ return headerBuilder_;
+ }
+
+ private Object producerGroup_ = "";
+ /**
+ * <code>string producerGroup = 2;</code>
+ */
+ public String getProducerGroup() {
+ Object ref = producerGroup_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ producerGroup_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+ /**
+ * <code>string producerGroup = 2;</code>
+ */
+ public com.google.protobuf.ByteString
+ getProducerGroupBytes() {
+ Object ref = producerGroup_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ producerGroup_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>string producerGroup = 2;</code>
+ */
+ public Builder setProducerGroup(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ producerGroup_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string producerGroup = 2;</code>
+ */
+ public Builder clearProducerGroup() {
+
+ producerGroup_ = getDefaultInstance().getProducerGroup();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string producerGroup = 2;</code>
+ */
+ public Builder setProducerGroupBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ producerGroup_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object topic_ = "";
+ /**
+ * <code>string topic = 3;</code>
+ */
+ public String getTopic() {
+ Object ref = topic_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ topic_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+ /**
+ * <code>string topic = 3;</code>
+ */
+ public com.google.protobuf.ByteString
+ getTopicBytes() {
+ Object ref = topic_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ topic_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>string topic = 3;</code>
+ */
+ public Builder setTopic(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ topic_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string topic = 3;</code>
+ */
+ public Builder clearTopic() {
+
+ topic_ = getDefaultInstance().getTopic();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string topic = 3;</code>
+ */
+ public Builder setTopicBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ topic_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.util.List<MessageItem> messageItem_ =
+ java.util.Collections.emptyList();
+ private void ensureMessageItemIsMutable() {
+ if (!((bitField0_ & 0x00000008) == 0x00000008)) {
+ messageItem_ = new java.util.ArrayList<MessageItem>(messageItem_);
+ bitField0_ |= 0x00000008;
+ }
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ MessageItem, MessageItem.Builder, MessageItemOrBuilder> messageItemBuilder_;
+
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;</code>
+ */
+ public java.util.List<MessageItem> getMessageItemList() {
+ if (messageItemBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(messageItem_);
+ } else {
+ return messageItemBuilder_.getMessageList();
+ }
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;</code>
+ */
+ public int getMessageItemCount() {
+ if (messageItemBuilder_ == null) {
+ return messageItem_.size();
+ } else {
+ return messageItemBuilder_.getCount();
+ }
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;</code>
+ */
+ public MessageItem getMessageItem(int index) {
+ if (messageItemBuilder_ == null) {
+ return messageItem_.get(index);
+ } else {
+ return messageItemBuilder_.getMessage(index);
+ }
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;</code>
+ */
+ public Builder setMessageItem(
+ int index, MessageItem value) {
+ if (messageItemBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureMessageItemIsMutable();
+ messageItem_.set(index, value);
+ onChanged();
+ } else {
+ messageItemBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;</code>
+ */
+ public Builder setMessageItem(
+ int index, MessageItem.Builder builderForValue) {
+ if (messageItemBuilder_ == null) {
+ ensureMessageItemIsMutable();
+ messageItem_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ messageItemBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;</code>
+ */
+ public Builder addMessageItem(MessageItem value) {
+ if (messageItemBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureMessageItemIsMutable();
+ messageItem_.add(value);
+ onChanged();
+ } else {
+ messageItemBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;</code>
+ */
+ public Builder addMessageItem(
+ int index, MessageItem value) {
+ if (messageItemBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureMessageItemIsMutable();
+ messageItem_.add(index, value);
+ onChanged();
+ } else {
+ messageItemBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;</code>
+ */
+ public Builder addMessageItem(
+ MessageItem.Builder builderForValue) {
+ if (messageItemBuilder_ == null) {
+ ensureMessageItemIsMutable();
+ messageItem_.add(builderForValue.build());
+ onChanged();
+ } else {
+ messageItemBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;</code>
+ */
+ public Builder addMessageItem(
+ int index, MessageItem.Builder builderForValue) {
+ if (messageItemBuilder_ == null) {
+ ensureMessageItemIsMutable();
+ messageItem_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ messageItemBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;</code>
+ */
+ public Builder addAllMessageItem(
+ Iterable<? extends MessageItem> values) {
+ if (messageItemBuilder_ == null) {
+ ensureMessageItemIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, messageItem_);
+ onChanged();
+ } else {
+ messageItemBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;</code>
+ */
+ public Builder clearMessageItem() {
+ if (messageItemBuilder_ == null) {
+ messageItem_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000008);
+ onChanged();
+ } else {
+ messageItemBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;</code>
+ */
+ public Builder removeMessageItem(int index) {
+ if (messageItemBuilder_ == null) {
+ ensureMessageItemIsMutable();
+ messageItem_.remove(index);
+ onChanged();
+ } else {
+ messageItemBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;</code>
+ */
+ public MessageItem.Builder getMessageItemBuilder(
+ int index) {
+ return getMessageItemFieldBuilder().getBuilder(index);
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;</code>
+ */
+ public MessageItemOrBuilder getMessageItemOrBuilder(
+ int index) {
+ if (messageItemBuilder_ == null) {
+ return messageItem_.get(index); } else {
+ return messageItemBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;</code>
+ */
+ public java.util.List<? extends MessageItemOrBuilder>
+ getMessageItemOrBuilderList() {
+ if (messageItemBuilder_ != null) {
+ return messageItemBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(messageItem_);
+ }
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;</code>
+ */
+ public MessageItem.Builder addMessageItemBuilder() {
+ return getMessageItemFieldBuilder().addBuilder(
+ MessageItem.getDefaultInstance());
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;</code>
+ */
+ public MessageItem.Builder addMessageItemBuilder(
+ int index) {
+ return getMessageItemFieldBuilder().addBuilder(
+ index, MessageItem.getDefaultInstance());
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;</code>
+ */
+ public java.util.List<MessageItem.Builder>
+ getMessageItemBuilderList() {
+ return getMessageItemFieldBuilder().getBuilderList();
+ }
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ MessageItem, MessageItem.Builder, MessageItemOrBuilder>
+ getMessageItemFieldBuilder() {
+ if (messageItemBuilder_ == null) {
+ messageItemBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
+ MessageItem, MessageItem.Builder, MessageItemOrBuilder>(
+ messageItem_,
+ ((bitField0_ & 0x00000008) == 0x00000008),
+ getParentForChildren(),
+ isClean());
+ messageItem_ = null;
+ }
+ return messageItemBuilder_;
+ }
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:eventmesh.common.protocol.grpc.BatchMessage)
+ }
+
+ // @@protoc_insertion_point(class_scope:eventmesh.common.protocol.grpc.BatchMessage)
+ private static final BatchMessage DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new BatchMessage();
+ }
+
+ public static BatchMessage getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser<BatchMessage>
+ PARSER = new com.google.protobuf.AbstractParser<BatchMessage>() {
+ public BatchMessage parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new BatchMessage(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser<BatchMessage> parser() {
+ return PARSER;
+ }
+
+ @Override
+ public com.google.protobuf.Parser<BatchMessage> getParserForType() {
+ return PARSER;
+ }
+
+ public BatchMessage getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/BatchMessageOrBuilder.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/BatchMessageOrBuilder.java
new file mode 100644
index 0000000..0ab9a2f
--- /dev/null
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/BatchMessageOrBuilder.java
@@ -0,0 +1,83 @@
+/*
+ * 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.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: eventmesh-client.proto
+
+package org.apache.eventmesh.common.protocol.grpc.protos;
+
+public interface BatchMessageOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:eventmesh.common.protocol.grpc.BatchMessage)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ boolean hasHeader();
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ RequestHeader getHeader();
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ RequestHeaderOrBuilder getHeaderOrBuilder();
+
+ /**
+ * <code>string producerGroup = 2;</code>
+ */
+ String getProducerGroup();
+ /**
+ * <code>string producerGroup = 2;</code>
+ */
+ com.google.protobuf.ByteString
+ getProducerGroupBytes();
+
+ /**
+ * <code>string topic = 3;</code>
+ */
+ String getTopic();
+ /**
+ * <code>string topic = 3;</code>
+ */
+ com.google.protobuf.ByteString
+ getTopicBytes();
+
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;</code>
+ */
+ java.util.List<BatchMessage.MessageItem>
+ getMessageItemList();
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;</code>
+ */
+ BatchMessage.MessageItem getMessageItem(int index);
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;</code>
+ */
+ int getMessageItemCount();
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;</code>
+ */
+ java.util.List<? extends BatchMessage.MessageItemOrBuilder>
+ getMessageItemOrBuilderList();
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;</code>
+ */
+ BatchMessage.MessageItemOrBuilder getMessageItemOrBuilder(
+ int index);
+}
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/ConsumerServiceGrpc.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/ConsumerServiceGrpc.java
new file mode 100644
index 0000000..e643a3b
--- /dev/null
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/ConsumerServiceGrpc.java
@@ -0,0 +1,435 @@
+/*
+ * 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 org.apache.eventmesh.common.protocol.grpc.protos;
+
+import static io.grpc.MethodDescriptor.generateFullMethodName;
+import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
+import static io.grpc.stub.ClientCalls.asyncUnaryCall;
+import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
+import static io.grpc.stub.ClientCalls.blockingUnaryCall;
+import static io.grpc.stub.ClientCalls.futureUnaryCall;
+import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
+import static io.grpc.stub.ServerCalls.asyncUnaryCall;
+import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
+
+/**
+ */
+@javax.annotation.Generated(
+ value = "by gRPC proto compiler (version 1.15.0)",
+ comments = "Source: eventmesh-client.proto")
+public final class ConsumerServiceGrpc {
+
+ private ConsumerServiceGrpc() {}
+
+ public static final String SERVICE_NAME = "eventmesh.common.protocol.grpc.ConsumerService";
+
+ // Static method descriptors that strictly reflect the proto.
+ private static volatile io.grpc.MethodDescriptor<Subscription,
+ Response> getSubscribeMethod;
+
+ @io.grpc.stub.annotations.RpcMethod(
+ fullMethodName = SERVICE_NAME + '/' + "subscribe",
+ requestType = Subscription.class,
+ responseType = Response.class,
+ methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+ public static io.grpc.MethodDescriptor<Subscription,
+ Response> getSubscribeMethod() {
+ io.grpc.MethodDescriptor<Subscription, Response> getSubscribeMethod;
+ if ((getSubscribeMethod = ConsumerServiceGrpc.getSubscribeMethod) == null) {
+ synchronized (ConsumerServiceGrpc.class) {
+ if ((getSubscribeMethod = ConsumerServiceGrpc.getSubscribeMethod) == null) {
+ ConsumerServiceGrpc.getSubscribeMethod = getSubscribeMethod =
+ io.grpc.MethodDescriptor.<Subscription, Response>newBuilder()
+ .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(generateFullMethodName(
+ "eventmesh.common.protocol.grpc.ConsumerService", "subscribe"))
+ .setSampledToLocalTracing(true)
+ .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ Subscription.getDefaultInstance()))
+ .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ Response.getDefaultInstance()))
+ .setSchemaDescriptor(new ConsumerServiceMethodDescriptorSupplier("subscribe"))
+ .build();
+ }
+ }
+ }
+ return getSubscribeMethod;
+ }
+
+ private static volatile io.grpc.MethodDescriptor<Subscription,
+ EventMeshMessage> getSubscribeStreamMethod;
+
+ @io.grpc.stub.annotations.RpcMethod(
+ fullMethodName = SERVICE_NAME + '/' + "subscribeStream",
+ requestType = Subscription.class,
+ responseType = EventMeshMessage.class,
+ methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
+ public static io.grpc.MethodDescriptor<Subscription,
+ EventMeshMessage> getSubscribeStreamMethod() {
+ io.grpc.MethodDescriptor<Subscription, EventMeshMessage> getSubscribeStreamMethod;
+ if ((getSubscribeStreamMethod = ConsumerServiceGrpc.getSubscribeStreamMethod) == null) {
+ synchronized (ConsumerServiceGrpc.class) {
+ if ((getSubscribeStreamMethod = ConsumerServiceGrpc.getSubscribeStreamMethod) == null) {
+ ConsumerServiceGrpc.getSubscribeStreamMethod = getSubscribeStreamMethod =
+ io.grpc.MethodDescriptor.<Subscription, EventMeshMessage>newBuilder()
+ .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
+ .setFullMethodName(generateFullMethodName(
+ "eventmesh.common.protocol.grpc.ConsumerService", "subscribeStream"))
+ .setSampledToLocalTracing(true)
+ .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ Subscription.getDefaultInstance()))
+ .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ EventMeshMessage.getDefaultInstance()))
+ .setSchemaDescriptor(new ConsumerServiceMethodDescriptorSupplier("subscribeStream"))
+ .build();
+ }
+ }
+ }
+ return getSubscribeStreamMethod;
+ }
+
+ private static volatile io.grpc.MethodDescriptor<Subscription,
+ Response> getUnsubscribeMethod;
+
+ @io.grpc.stub.annotations.RpcMethod(
+ fullMethodName = SERVICE_NAME + '/' + "unsubscribe",
+ requestType = Subscription.class,
+ responseType = Response.class,
+ methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+ public static io.grpc.MethodDescriptor<Subscription,
+ Response> getUnsubscribeMethod() {
+ io.grpc.MethodDescriptor<Subscription, Response> getUnsubscribeMethod;
+ if ((getUnsubscribeMethod = ConsumerServiceGrpc.getUnsubscribeMethod) == null) {
+ synchronized (ConsumerServiceGrpc.class) {
+ if ((getUnsubscribeMethod = ConsumerServiceGrpc.getUnsubscribeMethod) == null) {
+ ConsumerServiceGrpc.getUnsubscribeMethod = getUnsubscribeMethod =
+ io.grpc.MethodDescriptor.<Subscription, Response>newBuilder()
+ .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(generateFullMethodName(
+ "eventmesh.common.protocol.grpc.ConsumerService", "unsubscribe"))
+ .setSampledToLocalTracing(true)
+ .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ Subscription.getDefaultInstance()))
+ .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ Response.getDefaultInstance()))
+ .setSchemaDescriptor(new ConsumerServiceMethodDescriptorSupplier("unsubscribe"))
+ .build();
+ }
+ }
+ }
+ return getUnsubscribeMethod;
+ }
+
+ /**
+ * Creates a new async stub that supports all call types for the service
+ */
+ public static ConsumerServiceStub newStub(io.grpc.Channel channel) {
+ return new ConsumerServiceStub(channel);
+ }
+
+ /**
+ * Creates a new blocking-style stub that supports unary and streaming output calls on the service
+ */
+ public static ConsumerServiceBlockingStub newBlockingStub(
+ io.grpc.Channel channel) {
+ return new ConsumerServiceBlockingStub(channel);
+ }
+
+ /**
+ * Creates a new ListenableFuture-style stub that supports unary calls on the service
+ */
+ public static ConsumerServiceFutureStub newFutureStub(
+ io.grpc.Channel channel) {
+ return new ConsumerServiceFutureStub(channel);
+ }
+
+ /**
+ */
+ public static abstract class ConsumerServiceImplBase implements io.grpc.BindableService {
+
+ /**
+ */
+ public void subscribe(Subscription request,
+ io.grpc.stub.StreamObserver<Response> responseObserver) {
+ asyncUnimplementedUnaryCall(getSubscribeMethod(), responseObserver);
+ }
+
+ /**
+ */
+ public void subscribeStream(Subscription request,
+ io.grpc.stub.StreamObserver<EventMeshMessage> responseObserver) {
+ asyncUnimplementedUnaryCall(getSubscribeStreamMethod(), responseObserver);
+ }
+
+ /**
+ */
+ public void unsubscribe(Subscription request,
+ io.grpc.stub.StreamObserver<Response> responseObserver) {
+ asyncUnimplementedUnaryCall(getUnsubscribeMethod(), responseObserver);
+ }
+
+ @Override public final io.grpc.ServerServiceDefinition bindService() {
+ return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
+ .addMethod(
+ getSubscribeMethod(),
+ asyncUnaryCall(
+ new MethodHandlers<
+ Subscription,
+ Response>(
+ this, METHODID_SUBSCRIBE)))
+ .addMethod(
+ getSubscribeStreamMethod(),
+ asyncServerStreamingCall(
+ new MethodHandlers<
+ Subscription,
+ EventMeshMessage>(
+ this, METHODID_SUBSCRIBE_STREAM)))
+ .addMethod(
+ getUnsubscribeMethod(),
+ asyncUnaryCall(
+ new MethodHandlers<
+ Subscription,
+ Response>(
+ this, METHODID_UNSUBSCRIBE)))
+ .build();
+ }
+ }
+
+ /**
+ */
+ public static final class ConsumerServiceStub extends io.grpc.stub.AbstractStub<ConsumerServiceStub> {
+ private ConsumerServiceStub(io.grpc.Channel channel) {
+ super(channel);
+ }
+
+ private ConsumerServiceStub(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ super(channel, callOptions);
+ }
+
+ @Override
+ protected ConsumerServiceStub build(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ return new ConsumerServiceStub(channel, callOptions);
+ }
+
+ /**
+ */
+ public void subscribe(Subscription request,
+ io.grpc.stub.StreamObserver<Response> responseObserver) {
+ asyncUnaryCall(
+ getChannel().newCall(getSubscribeMethod(), getCallOptions()), request, responseObserver);
+ }
+
+ /**
+ */
+ public void subscribeStream(Subscription request,
+ io.grpc.stub.StreamObserver<EventMeshMessage> responseObserver) {
+ asyncServerStreamingCall(
+ getChannel().newCall(getSubscribeStreamMethod(), getCallOptions()), request, responseObserver);
+ }
+
+ /**
+ */
+ public void unsubscribe(Subscription request,
+ io.grpc.stub.StreamObserver<Response> responseObserver) {
+ asyncUnaryCall(
+ getChannel().newCall(getUnsubscribeMethod(), getCallOptions()), request, responseObserver);
+ }
+ }
+
+ /**
+ */
+ public static final class ConsumerServiceBlockingStub extends io.grpc.stub.AbstractStub<ConsumerServiceBlockingStub> {
+ private ConsumerServiceBlockingStub(io.grpc.Channel channel) {
+ super(channel);
+ }
+
+ private ConsumerServiceBlockingStub(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ super(channel, callOptions);
+ }
+
+ @Override
+ protected ConsumerServiceBlockingStub build(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ return new ConsumerServiceBlockingStub(channel, callOptions);
+ }
+
+ /**
+ */
+ public Response subscribe(Subscription request) {
+ return blockingUnaryCall(
+ getChannel(), getSubscribeMethod(), getCallOptions(), request);
+ }
+
+ /**
+ */
+ public java.util.Iterator<EventMeshMessage> subscribeStream(
+ Subscription request) {
+ return blockingServerStreamingCall(
+ getChannel(), getSubscribeStreamMethod(), getCallOptions(), request);
+ }
+
+ /**
+ */
+ public Response unsubscribe(Subscription request) {
+ return blockingUnaryCall(
+ getChannel(), getUnsubscribeMethod(), getCallOptions(), request);
+ }
+ }
+
+ /**
+ */
+ public static final class ConsumerServiceFutureStub extends io.grpc.stub.AbstractStub<ConsumerServiceFutureStub> {
+ private ConsumerServiceFutureStub(io.grpc.Channel channel) {
+ super(channel);
+ }
+
+ private ConsumerServiceFutureStub(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ super(channel, callOptions);
+ }
+
+ @Override
+ protected ConsumerServiceFutureStub build(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ return new ConsumerServiceFutureStub(channel, callOptions);
+ }
+
+ /**
+ */
+ public com.google.common.util.concurrent.ListenableFuture<Response> subscribe(
+ Subscription request) {
+ return futureUnaryCall(
+ getChannel().newCall(getSubscribeMethod(), getCallOptions()), request);
+ }
+
+ /**
+ */
+ public com.google.common.util.concurrent.ListenableFuture<Response> unsubscribe(
+ Subscription request) {
+ return futureUnaryCall(
+ getChannel().newCall(getUnsubscribeMethod(), getCallOptions()), request);
+ }
+ }
+
+ private static final int METHODID_SUBSCRIBE = 0;
+ private static final int METHODID_SUBSCRIBE_STREAM = 1;
+ private static final int METHODID_UNSUBSCRIBE = 2;
+
+ private static final class MethodHandlers<Req, Resp> implements
+ io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
+ io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
+ io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
+ io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
+ private final ConsumerServiceImplBase serviceImpl;
+ private final int methodId;
+
+ MethodHandlers(ConsumerServiceImplBase serviceImpl, int methodId) {
+ this.serviceImpl = serviceImpl;
+ this.methodId = methodId;
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
+ switch (methodId) {
+ case METHODID_SUBSCRIBE:
+ serviceImpl.subscribe((Subscription) request,
+ (io.grpc.stub.StreamObserver<Response>) responseObserver);
+ break;
+ case METHODID_SUBSCRIBE_STREAM:
+ serviceImpl.subscribeStream((Subscription) request,
+ (io.grpc.stub.StreamObserver<EventMeshMessage>) responseObserver);
+ break;
+ case METHODID_UNSUBSCRIBE:
+ serviceImpl.unsubscribe((Subscription) request,
+ (io.grpc.stub.StreamObserver<Response>) responseObserver);
+ break;
+ default:
+ throw new AssertionError();
+ }
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public io.grpc.stub.StreamObserver<Req> invoke(
+ io.grpc.stub.StreamObserver<Resp> responseObserver) {
+ switch (methodId) {
+ default:
+ throw new AssertionError();
+ }
+ }
+ }
+
+ private static abstract class ConsumerServiceBaseDescriptorSupplier
+ implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
+ ConsumerServiceBaseDescriptorSupplier() {}
+
+ @Override
+ public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
+ return EventmeshGrpc.getDescriptor();
+ }
+
+ @Override
+ public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
+ return getFileDescriptor().findServiceByName("ConsumerService");
+ }
+ }
+
+ private static final class ConsumerServiceFileDescriptorSupplier
+ extends ConsumerServiceBaseDescriptorSupplier {
+ ConsumerServiceFileDescriptorSupplier() {}
+ }
+
+ private static final class ConsumerServiceMethodDescriptorSupplier
+ extends ConsumerServiceBaseDescriptorSupplier
+ implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
+ private final String methodName;
+
+ ConsumerServiceMethodDescriptorSupplier(String methodName) {
+ this.methodName = methodName;
+ }
+
+ @Override
+ public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
+ return getServiceDescriptor().findMethodByName(methodName);
+ }
+ }
+
+ private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
+
+ public static io.grpc.ServiceDescriptor getServiceDescriptor() {
+ io.grpc.ServiceDescriptor result = serviceDescriptor;
+ if (result == null) {
+ synchronized (ConsumerServiceGrpc.class) {
+ result = serviceDescriptor;
+ if (result == null) {
+ serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
+ .setSchemaDescriptor(new ConsumerServiceFileDescriptorSupplier())
+ .addMethod(getSubscribeMethod())
+ .addMethod(getSubscribeStreamMethod())
+ .addMethod(getUnsubscribeMethod())
+ .build();
+ }
+ }
+ }
+ return result;
+ }
+}
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/EventMeshMessage.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/EventMeshMessage.java
new file mode 100644
index 0000000..8adb119
--- /dev/null
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/EventMeshMessage.java
@@ -0,0 +1,1753 @@
+/*
+ * 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.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: eventmesh-client.proto
+
+package org.apache.eventmesh.common.protocol.grpc.protos;
+
+/**
+ * Protobuf type {@code eventmesh.common.protocol.grpc.EventMeshMessage}
+ */
+public final class EventMeshMessage extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:eventmesh.common.protocol.grpc.EventMeshMessage)
+ EventMeshMessageOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use EventMeshMessage.newBuilder() to construct.
+ private EventMeshMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
+ super(builder);
+ }
+ private EventMeshMessage() {
+ producerGroup_ = "";
+ topic_ = "";
+ content_ = "";
+ ttl_ = "";
+ uniqueId_ = "";
+ seqNum_ = "";
+ tag_ = "";
+ }
+
+ @Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private EventMeshMessage(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ 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;
+ default: {
+ if (!parseUnknownFieldProto3(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ RequestHeader.Builder subBuilder = null;
+ if (header_ != null) {
+ subBuilder = header_.toBuilder();
+ }
+ header_ = input.readMessage(RequestHeader.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(header_);
+ header_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ case 18: {
+ String s = input.readStringRequireUtf8();
+
+ producerGroup_ = s;
+ break;
+ }
+ case 26: {
+ String s = input.readStringRequireUtf8();
+
+ topic_ = s;
+ break;
+ }
+ case 34: {
+ String s = input.readStringRequireUtf8();
+
+ content_ = s;
+ break;
+ }
+ case 42: {
+ String s = input.readStringRequireUtf8();
+
+ ttl_ = s;
+ break;
+ }
+ case 50: {
+ String s = input.readStringRequireUtf8();
+
+ uniqueId_ = s;
+ break;
+ }
+ case 58: {
+ String s = input.readStringRequireUtf8();
+
+ seqNum_ = s;
+ break;
+ }
+ case 66: {
+ String s = input.readStringRequireUtf8();
+
+ tag_ = s;
+ break;
+ }
+ case 74: {
+ if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
+ properties_ = com.google.protobuf.MapField.newMapField(
+ PropertiesDefaultEntryHolder.defaultEntry);
+ mutable_bitField0_ |= 0x00000100;
+ }
+ com.google.protobuf.MapEntry<String, String>
+ properties__ = input.readMessage(
+ PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
+ properties_.getMutableMap().put(
+ properties__.getKey(), properties__.getValue());
+ 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 EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_EventMeshMessage_descriptor;
+ }
+
+ @SuppressWarnings({"rawtypes"})
+ protected com.google.protobuf.MapField internalGetMapField(
+ int number) {
+ switch (number) {
+ case 9:
+ return internalGetProperties();
+ default:
+ throw new RuntimeException(
+ "Invalid map field number: " + number);
+ }
+ }
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_EventMeshMessage_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ EventMeshMessage.class, Builder.class);
+ }
+
+ private int bitField0_;
+ public static final int HEADER_FIELD_NUMBER = 1;
+ private RequestHeader header_;
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ public boolean hasHeader() {
+ return header_ != null;
+ }
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ public RequestHeader getHeader() {
+ return header_ == null ? RequestHeader.getDefaultInstance() : header_;
+ }
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ public RequestHeaderOrBuilder getHeaderOrBuilder() {
+ return getHeader();
+ }
+
+ public static final int PRODUCERGROUP_FIELD_NUMBER = 2;
+ private volatile Object producerGroup_;
+ /**
+ * <code>string producerGroup = 2;</code>
+ */
+ public String getProducerGroup() {
+ Object ref = producerGroup_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ producerGroup_ = s;
+ return s;
+ }
+ }
+ /**
+ * <code>string producerGroup = 2;</code>
+ */
+ public com.google.protobuf.ByteString
+ getProducerGroupBytes() {
+ Object ref = producerGroup_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ producerGroup_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TOPIC_FIELD_NUMBER = 3;
+ private volatile Object topic_;
+ /**
+ * <code>string topic = 3;</code>
+ */
+ public String getTopic() {
+ Object ref = topic_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ topic_ = s;
+ return s;
+ }
+ }
+ /**
+ * <code>string topic = 3;</code>
+ */
+ public com.google.protobuf.ByteString
+ getTopicBytes() {
+ Object ref = topic_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ topic_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int CONTENT_FIELD_NUMBER = 4;
+ private volatile Object content_;
+ /**
+ * <code>string content = 4;</code>
+ */
+ public String getContent() {
+ Object ref = content_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ content_ = s;
+ return s;
+ }
+ }
+ /**
+ * <code>string content = 4;</code>
+ */
+ public com.google.protobuf.ByteString
+ getContentBytes() {
+ Object ref = content_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ content_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TTL_FIELD_NUMBER = 5;
+ private volatile Object ttl_;
+ /**
+ * <code>string ttl = 5;</code>
+ */
+ public String getTtl() {
+ Object ref = ttl_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ ttl_ = s;
+ return s;
+ }
+ }
+ /**
+ * <code>string ttl = 5;</code>
+ */
+ public com.google.protobuf.ByteString
+ getTtlBytes() {
+ Object ref = ttl_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ ttl_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int UNIQUEID_FIELD_NUMBER = 6;
+ private volatile Object uniqueId_;
+ /**
+ * <code>string uniqueId = 6;</code>
+ */
+ public String getUniqueId() {
+ Object ref = uniqueId_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ uniqueId_ = s;
+ return s;
+ }
+ }
+ /**
+ * <code>string uniqueId = 6;</code>
+ */
+ public com.google.protobuf.ByteString
+ getUniqueIdBytes() {
+ Object ref = uniqueId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ uniqueId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SEQNUM_FIELD_NUMBER = 7;
+ private volatile Object seqNum_;
+ /**
+ * <code>string seqNum = 7;</code>
+ */
+ public String getSeqNum() {
+ Object ref = seqNum_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ seqNum_ = s;
+ return s;
+ }
+ }
+ /**
+ * <code>string seqNum = 7;</code>
+ */
+ public com.google.protobuf.ByteString
+ getSeqNumBytes() {
+ Object ref = seqNum_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ seqNum_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TAG_FIELD_NUMBER = 8;
+ private volatile Object tag_;
+ /**
+ * <code>string tag = 8;</code>
+ */
+ public String getTag() {
+ Object ref = tag_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ tag_ = s;
+ return s;
+ }
+ }
+ /**
+ * <code>string tag = 8;</code>
+ */
+ public com.google.protobuf.ByteString
+ getTagBytes() {
+ Object ref = tag_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ tag_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PROPERTIES_FIELD_NUMBER = 9;
+ private static final class PropertiesDefaultEntryHolder {
+ static final com.google.protobuf.MapEntry<
+ String, String> defaultEntry =
+ com.google.protobuf.MapEntry
+ .<String, String>newDefaultInstance(
+ EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_EventMeshMessage_PropertiesEntry_descriptor,
+ com.google.protobuf.WireFormat.FieldType.STRING,
+ "",
+ com.google.protobuf.WireFormat.FieldType.STRING,
+ "");
+ }
+ private com.google.protobuf.MapField<
+ String, String> properties_;
+ private com.google.protobuf.MapField<String, String>
+ internalGetProperties() {
+ if (properties_ == null) {
+ return com.google.protobuf.MapField.emptyMapField(
+ PropertiesDefaultEntryHolder.defaultEntry);
+ }
+ return properties_;
+ }
+
+ public int getPropertiesCount() {
+ return internalGetProperties().getMap().size();
+ }
+ /**
+ * <code>map<string, string> properties = 9;</code>
+ */
+
+ public boolean containsProperties(
+ String key) {
+ if (key == null) { throw new NullPointerException(); }
+ return internalGetProperties().getMap().containsKey(key);
+ }
+ /**
+ * Use {@link #getPropertiesMap()} instead.
+ */
+ @Deprecated
+ public java.util.Map<String, String> getProperties() {
+ return getPropertiesMap();
+ }
+ /**
+ * <code>map<string, string> properties = 9;</code>
+ */
+
+ public java.util.Map<String, String> getPropertiesMap() {
+ return internalGetProperties().getMap();
+ }
+ /**
+ * <code>map<string, string> properties = 9;</code>
+ */
+
+ public String getPropertiesOrDefault(
+ String key,
+ String defaultValue) {
+ if (key == null) { throw new NullPointerException(); }
+ java.util.Map<String, String> map =
+ internalGetProperties().getMap();
+ return map.containsKey(key) ? map.get(key) : defaultValue;
+ }
+ /**
+ * <code>map<string, string> properties = 9;</code>
+ */
+
+ public String getPropertiesOrThrow(
+ String key) {
+ if (key == null) { throw new NullPointerException(); }
+ java.util.Map<String, String> map =
+ internalGetProperties().getMap();
+ if (!map.containsKey(key)) {
+ throw new IllegalArgumentException();
+ }
+ return map.get(key);
+ }
+
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (header_ != null) {
+ output.writeMessage(1, getHeader());
+ }
+ if (!getProducerGroupBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, producerGroup_);
+ }
+ if (!getTopicBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, topic_);
+ }
+ if (!getContentBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, content_);
+ }
+ if (!getTtlBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 5, ttl_);
+ }
+ if (!getUniqueIdBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 6, uniqueId_);
+ }
+ if (!getSeqNumBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 7, seqNum_);
+ }
+ if (!getTagBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 8, tag_);
+ }
+ com.google.protobuf.GeneratedMessageV3
+ .serializeStringMapTo(
+ output,
+ internalGetProperties(),
+ PropertiesDefaultEntryHolder.defaultEntry,
+ 9);
+ unknownFields.writeTo(output);
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (header_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(1, getHeader());
+ }
+ if (!getProducerGroupBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, producerGroup_);
+ }
+ if (!getTopicBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, topic_);
+ }
+ if (!getContentBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, content_);
+ }
+ if (!getTtlBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, ttl_);
+ }
+ if (!getUniqueIdBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, uniqueId_);
+ }
+ if (!getSeqNumBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, seqNum_);
+ }
+ if (!getTagBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, tag_);
+ }
+ for (java.util.Map.Entry<String, String> entry
+ : internalGetProperties().getMap().entrySet()) {
+ com.google.protobuf.MapEntry<String, String>
+ properties__ = PropertiesDefaultEntryHolder.defaultEntry.newBuilderForType()
+ .setKey(entry.getKey())
+ .setValue(entry.getValue())
+ .build();
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(9, properties__);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof EventMeshMessage)) {
+ return super.equals(obj);
+ }
+ EventMeshMessage other = (EventMeshMessage) obj;
+
+ boolean result = true;
+ result = result && (hasHeader() == other.hasHeader());
+ if (hasHeader()) {
+ result = result && getHeader()
+ .equals(other.getHeader());
+ }
+ result = result && getProducerGroup()
+ .equals(other.getProducerGroup());
+ result = result && getTopic()
+ .equals(other.getTopic());
+ result = result && getContent()
+ .equals(other.getContent());
+ result = result && getTtl()
+ .equals(other.getTtl());
+ result = result && getUniqueId()
+ .equals(other.getUniqueId());
+ result = result && getSeqNum()
+ .equals(other.getSeqNum());
+ result = result && getTag()
+ .equals(other.getTag());
+ result = result && internalGetProperties().equals(
+ other.internalGetProperties());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasHeader()) {
+ hash = (37 * hash) + HEADER_FIELD_NUMBER;
+ hash = (53 * hash) + getHeader().hashCode();
+ }
+ hash = (37 * hash) + PRODUCERGROUP_FIELD_NUMBER;
+ hash = (53 * hash) + getProducerGroup().hashCode();
+ hash = (37 * hash) + TOPIC_FIELD_NUMBER;
+ hash = (53 * hash) + getTopic().hashCode();
+ hash = (37 * hash) + CONTENT_FIELD_NUMBER;
+ hash = (53 * hash) + getContent().hashCode();
+ hash = (37 * hash) + TTL_FIELD_NUMBER;
+ hash = (53 * hash) + getTtl().hashCode();
+ hash = (37 * hash) + UNIQUEID_FIELD_NUMBER;
+ hash = (53 * hash) + getUniqueId().hashCode();
+ hash = (37 * hash) + SEQNUM_FIELD_NUMBER;
+ hash = (53 * hash) + getSeqNum().hashCode();
+ hash = (37 * hash) + TAG_FIELD_NUMBER;
+ hash = (53 * hash) + getTag().hashCode();
+ if (!internalGetProperties().getMap().isEmpty()) {
+ hash = (37 * hash) + PROPERTIES_FIELD_NUMBER;
+ hash = (53 * hash) + internalGetProperties().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static EventMeshMessage parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static EventMeshMessage parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static EventMeshMessage parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static EventMeshMessage parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static EventMeshMessage parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static EventMeshMessage parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static EventMeshMessage parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static EventMeshMessage 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 EventMeshMessage parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static EventMeshMessage 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 EventMeshMessage parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static EventMeshMessage parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(EventMeshMessage prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(
+ BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code eventmesh.common.protocol.grpc.EventMeshMessage}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
+ // @@protoc_insertion_point(builder_implements:eventmesh.common.protocol.grpc.EventMeshMessage)
+ EventMeshMessageOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_EventMeshMessage_descriptor;
+ }
+
+ @SuppressWarnings({"rawtypes"})
+ protected com.google.protobuf.MapField internalGetMapField(
+ int number) {
+ switch (number) {
+ case 9:
+ return internalGetProperties();
+ default:
+ throw new RuntimeException(
+ "Invalid map field number: " + number);
+ }
+ }
+ @SuppressWarnings({"rawtypes"})
+ protected com.google.protobuf.MapField internalGetMutableMapField(
+ int number) {
+ switch (number) {
+ case 9:
+ return internalGetMutableProperties();
+ default:
+ throw new RuntimeException(
+ "Invalid map field number: " + number);
+ }
+ }
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_EventMeshMessage_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ EventMeshMessage.class, Builder.class);
+ }
+
+ // Construct using org.apache.eventmesh.common.protocol.grpc.protos.EventMeshMessage.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
+ }
+ }
+ public Builder clear() {
+ super.clear();
+ if (headerBuilder_ == null) {
+ header_ = null;
+ } else {
+ header_ = null;
+ headerBuilder_ = null;
+ }
+ producerGroup_ = "";
+
+ topic_ = "";
+
+ content_ = "";
+
+ ttl_ = "";
+
+ uniqueId_ = "";
+
+ seqNum_ = "";
+
+ tag_ = "";
+
+ internalGetMutableProperties().clear();
+ return this;
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_EventMeshMessage_descriptor;
+ }
+
+ public EventMeshMessage getDefaultInstanceForType() {
+ return EventMeshMessage.getDefaultInstance();
+ }
+
+ public EventMeshMessage build() {
+ EventMeshMessage result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public EventMeshMessage buildPartial() {
+ EventMeshMessage result = new EventMeshMessage(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (headerBuilder_ == null) {
+ result.header_ = header_;
+ } else {
+ result.header_ = headerBuilder_.build();
+ }
+ result.producerGroup_ = producerGroup_;
+ result.topic_ = topic_;
+ result.content_ = content_;
+ result.ttl_ = ttl_;
+ result.uniqueId_ = uniqueId_;
+ result.seqNum_ = seqNum_;
+ result.tag_ = tag_;
+ result.properties_ = internalGetProperties();
+ result.properties_.makeImmutable();
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder clone() {
+ return (Builder) super.clone();
+ }
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ Object value) {
+ return (Builder) super.setField(field, value);
+ }
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return (Builder) super.clearField(field);
+ }
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return (Builder) super.clearOneof(oneof);
+ }
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, Object value) {
+ return (Builder) super.setRepeatedField(field, index, value);
+ }
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ Object value) {
+ return (Builder) super.addRepeatedField(field, value);
+ }
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof EventMeshMessage) {
+ return mergeFrom((EventMeshMessage)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(EventMeshMessage other) {
+ if (other == EventMeshMessage.getDefaultInstance()) return this;
+ if (other.hasHeader()) {
+ mergeHeader(other.getHeader());
+ }
+ if (!other.getProducerGroup().isEmpty()) {
+ producerGroup_ = other.producerGroup_;
+ onChanged();
+ }
+ if (!other.getTopic().isEmpty()) {
+ topic_ = other.topic_;
+ onChanged();
+ }
+ if (!other.getContent().isEmpty()) {
+ content_ = other.content_;
+ onChanged();
+ }
+ if (!other.getTtl().isEmpty()) {
+ ttl_ = other.ttl_;
+ onChanged();
+ }
+ if (!other.getUniqueId().isEmpty()) {
+ uniqueId_ = other.uniqueId_;
+ onChanged();
+ }
+ if (!other.getSeqNum().isEmpty()) {
+ seqNum_ = other.seqNum_;
+ onChanged();
+ }
+ if (!other.getTag().isEmpty()) {
+ tag_ = other.tag_;
+ onChanged();
+ }
+ internalGetMutableProperties().mergeFrom(
+ other.internalGetProperties());
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ EventMeshMessage parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (EventMeshMessage) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ private RequestHeader header_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ RequestHeader, RequestHeader.Builder, RequestHeaderOrBuilder> headerBuilder_;
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ public boolean hasHeader() {
+ return headerBuilder_ != null || header_ != null;
+ }
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ public RequestHeader getHeader() {
+ if (headerBuilder_ == null) {
+ return header_ == null ? RequestHeader.getDefaultInstance() : header_;
+ } else {
+ return headerBuilder_.getMessage();
+ }
+ }
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ public Builder setHeader(RequestHeader value) {
+ if (headerBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ header_ = value;
+ onChanged();
+ } else {
+ headerBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ public Builder setHeader(
+ RequestHeader.Builder builderForValue) {
+ if (headerBuilder_ == null) {
+ header_ = builderForValue.build();
+ onChanged();
+ } else {
+ headerBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ public Builder mergeHeader(RequestHeader value) {
+ if (headerBuilder_ == null) {
+ if (header_ != null) {
+ header_ =
+ RequestHeader.newBuilder(header_).mergeFrom(value).buildPartial();
+ } else {
+ header_ = value;
+ }
+ onChanged();
+ } else {
+ headerBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ public Builder clearHeader() {
+ if (headerBuilder_ == null) {
+ header_ = null;
+ onChanged();
+ } else {
+ header_ = null;
+ headerBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ public RequestHeader.Builder getHeaderBuilder() {
+
+ onChanged();
+ return getHeaderFieldBuilder().getBuilder();
+ }
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ public RequestHeaderOrBuilder getHeaderOrBuilder() {
+ if (headerBuilder_ != null) {
+ return headerBuilder_.getMessageOrBuilder();
+ } else {
+ return header_ == null ?
+ RequestHeader.getDefaultInstance() : header_;
+ }
+ }
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ RequestHeader, RequestHeader.Builder, RequestHeaderOrBuilder>
+ getHeaderFieldBuilder() {
+ if (headerBuilder_ == null) {
+ headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ RequestHeader, RequestHeader.Builder, RequestHeaderOrBuilder>(
+ getHeader(),
+ getParentForChildren(),
+ isClean());
+ header_ = null;
+ }
+ return headerBuilder_;
+ }
+
+ private Object producerGroup_ = "";
+ /**
+ * <code>string producerGroup = 2;</code>
+ */
+ public String getProducerGroup() {
+ Object ref = producerGroup_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ producerGroup_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+ /**
+ * <code>string producerGroup = 2;</code>
+ */
+ public com.google.protobuf.ByteString
+ getProducerGroupBytes() {
+ Object ref = producerGroup_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ producerGroup_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>string producerGroup = 2;</code>
+ */
+ public Builder setProducerGroup(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ producerGroup_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string producerGroup = 2;</code>
+ */
+ public Builder clearProducerGroup() {
+
+ producerGroup_ = getDefaultInstance().getProducerGroup();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string producerGroup = 2;</code>
+ */
+ public Builder setProducerGroupBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ producerGroup_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object topic_ = "";
+ /**
+ * <code>string topic = 3;</code>
+ */
+ public String getTopic() {
+ Object ref = topic_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ topic_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+ /**
+ * <code>string topic = 3;</code>
+ */
+ public com.google.protobuf.ByteString
+ getTopicBytes() {
+ Object ref = topic_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ topic_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>string topic = 3;</code>
+ */
+ public Builder setTopic(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ topic_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string topic = 3;</code>
+ */
+ public Builder clearTopic() {
+
+ topic_ = getDefaultInstance().getTopic();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string topic = 3;</code>
+ */
+ public Builder setTopicBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ topic_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object content_ = "";
+ /**
+ * <code>string content = 4;</code>
+ */
+ public String getContent() {
+ Object ref = content_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ content_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+ /**
+ * <code>string content = 4;</code>
+ */
+ public com.google.protobuf.ByteString
+ getContentBytes() {
+ Object ref = content_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ content_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>string content = 4;</code>
+ */
+ public Builder setContent(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ content_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string content = 4;</code>
+ */
+ public Builder clearContent() {
+
+ content_ = getDefaultInstance().getContent();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string content = 4;</code>
+ */
+ public Builder setContentBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ content_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object ttl_ = "";
+ /**
+ * <code>string ttl = 5;</code>
+ */
+ public String getTtl() {
+ Object ref = ttl_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ ttl_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+ /**
+ * <code>string ttl = 5;</code>
+ */
+ public com.google.protobuf.ByteString
+ getTtlBytes() {
+ Object ref = ttl_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ ttl_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>string ttl = 5;</code>
+ */
+ public Builder setTtl(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ ttl_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string ttl = 5;</code>
+ */
+ public Builder clearTtl() {
+
+ ttl_ = getDefaultInstance().getTtl();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string ttl = 5;</code>
+ */
+ public Builder setTtlBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ ttl_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object uniqueId_ = "";
+ /**
+ * <code>string uniqueId = 6;</code>
+ */
+ public String getUniqueId() {
+ Object ref = uniqueId_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ uniqueId_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+ /**
+ * <code>string uniqueId = 6;</code>
+ */
+ public com.google.protobuf.ByteString
+ getUniqueIdBytes() {
+ Object ref = uniqueId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ uniqueId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>string uniqueId = 6;</code>
+ */
+ public Builder setUniqueId(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ uniqueId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string uniqueId = 6;</code>
+ */
+ public Builder clearUniqueId() {
+
+ uniqueId_ = getDefaultInstance().getUniqueId();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string uniqueId = 6;</code>
+ */
+ public Builder setUniqueIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ uniqueId_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object seqNum_ = "";
+ /**
+ * <code>string seqNum = 7;</code>
+ */
+ public String getSeqNum() {
+ Object ref = seqNum_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ seqNum_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+ /**
+ * <code>string seqNum = 7;</code>
+ */
+ public com.google.protobuf.ByteString
+ getSeqNumBytes() {
+ Object ref = seqNum_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ seqNum_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>string seqNum = 7;</code>
+ */
+ public Builder setSeqNum(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ seqNum_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string seqNum = 7;</code>
+ */
+ public Builder clearSeqNum() {
+
+ seqNum_ = getDefaultInstance().getSeqNum();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string seqNum = 7;</code>
+ */
+ public Builder setSeqNumBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ seqNum_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object tag_ = "";
+ /**
+ * <code>string tag = 8;</code>
+ */
+ public String getTag() {
+ Object ref = tag_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ tag_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+ /**
+ * <code>string tag = 8;</code>
+ */
+ public com.google.protobuf.ByteString
+ getTagBytes() {
+ Object ref = tag_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ tag_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>string tag = 8;</code>
+ */
+ public Builder setTag(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ tag_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string tag = 8;</code>
+ */
+ public Builder clearTag() {
+
+ tag_ = getDefaultInstance().getTag();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string tag = 8;</code>
+ */
+ public Builder setTagBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ tag_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.MapField<
+ String, String> properties_;
+ private com.google.protobuf.MapField<String, String>
+ internalGetProperties() {
+ if (properties_ == null) {
+ return com.google.protobuf.MapField.emptyMapField(
+ PropertiesDefaultEntryHolder.defaultEntry);
+ }
+ return properties_;
+ }
+ private com.google.protobuf.MapField<String, String>
+ internalGetMutableProperties() {
+ onChanged();;
+ if (properties_ == null) {
+ properties_ = com.google.protobuf.MapField.newMapField(
+ PropertiesDefaultEntryHolder.defaultEntry);
+ }
+ if (!properties_.isMutable()) {
+ properties_ = properties_.copy();
+ }
+ return properties_;
+ }
+
+ public int getPropertiesCount() {
+ return internalGetProperties().getMap().size();
+ }
+ /**
+ * <code>map<string, string> properties = 9;</code>
+ */
+
+ public boolean containsProperties(
+ String key) {
+ if (key == null) { throw new NullPointerException(); }
+ return internalGetProperties().getMap().containsKey(key);
+ }
+ /**
+ * Use {@link #getPropertiesMap()} instead.
+ */
+ @Deprecated
+ public java.util.Map<String, String> getProperties() {
+ return getPropertiesMap();
+ }
+ /**
+ * <code>map<string, string> properties = 9;</code>
+ */
+
+ public java.util.Map<String, String> getPropertiesMap() {
+ return internalGetProperties().getMap();
+ }
+ /**
+ * <code>map<string, string> properties = 9;</code>
+ */
+
+ public String getPropertiesOrDefault(
+ String key,
+ String defaultValue) {
+ if (key == null) { throw new NullPointerException(); }
+ java.util.Map<String, String> map =
+ internalGetProperties().getMap();
+ return map.containsKey(key) ? map.get(key) : defaultValue;
+ }
+ /**
+ * <code>map<string, string> properties = 9;</code>
+ */
+
+ public String getPropertiesOrThrow(
+ String key) {
+ if (key == null) { throw new NullPointerException(); }
+ java.util.Map<String, String> map =
+ internalGetProperties().getMap();
+ if (!map.containsKey(key)) {
+ throw new IllegalArgumentException();
+ }
+ return map.get(key);
+ }
+
+ public Builder clearProperties() {
+ internalGetMutableProperties().getMutableMap()
+ .clear();
+ return this;
+ }
+ /**
+ * <code>map<string, string> properties = 9;</code>
+ */
+
+ public Builder removeProperties(
+ String key) {
+ if (key == null) { throw new NullPointerException(); }
+ internalGetMutableProperties().getMutableMap()
+ .remove(key);
+ return this;
+ }
+ /**
+ * Use alternate mutation accessors instead.
+ */
+ @Deprecated
+ public java.util.Map<String, String>
+ getMutableProperties() {
+ return internalGetMutableProperties().getMutableMap();
+ }
+ /**
+ * <code>map<string, string> properties = 9;</code>
+ */
+ public Builder putProperties(
+ String key,
+ String value) {
+ if (key == null) { throw new NullPointerException(); }
+ if (value == null) { throw new NullPointerException(); }
+ internalGetMutableProperties().getMutableMap()
+ .put(key, value);
+ return this;
+ }
+ /**
+ * <code>map<string, string> properties = 9;</code>
+ */
+
+ public Builder putAllProperties(
+ java.util.Map<String, String> values) {
+ internalGetMutableProperties().getMutableMap()
+ .putAll(values);
+ return this;
+ }
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:eventmesh.common.protocol.grpc.EventMeshMessage)
+ }
+
+ // @@protoc_insertion_point(class_scope:eventmesh.common.protocol.grpc.EventMeshMessage)
+ private static final EventMeshMessage DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new EventMeshMessage();
+ }
+
+ public static EventMeshMessage getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser<EventMeshMessage>
+ PARSER = new com.google.protobuf.AbstractParser<EventMeshMessage>() {
+ public EventMeshMessage parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new EventMeshMessage(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser<EventMeshMessage> parser() {
+ return PARSER;
+ }
+
+ @Override
+ public com.google.protobuf.Parser<EventMeshMessage> getParserForType() {
+ return PARSER;
+ }
+
+ public EventMeshMessage getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/EventMeshMessageOrBuilder.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/EventMeshMessageOrBuilder.java
new file mode 100644
index 0000000..5439ad1
--- /dev/null
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/EventMeshMessageOrBuilder.java
@@ -0,0 +1,143 @@
+/*
+ * 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.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: eventmesh-client.proto
+
+package org.apache.eventmesh.common.protocol.grpc.protos;
+
+public interface EventMeshMessageOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:eventmesh.common.protocol.grpc.EventMeshMessage)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ boolean hasHeader();
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ RequestHeader getHeader();
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ RequestHeaderOrBuilder getHeaderOrBuilder();
+
+ /**
+ * <code>string producerGroup = 2;</code>
+ */
+ String getProducerGroup();
+ /**
+ * <code>string producerGroup = 2;</code>
+ */
+ com.google.protobuf.ByteString
+ getProducerGroupBytes();
+
+ /**
+ * <code>string topic = 3;</code>
+ */
+ String getTopic();
+ /**
+ * <code>string topic = 3;</code>
+ */
+ com.google.protobuf.ByteString
+ getTopicBytes();
+
+ /**
+ * <code>string content = 4;</code>
+ */
+ String getContent();
+ /**
+ * <code>string content = 4;</code>
+ */
+ com.google.protobuf.ByteString
+ getContentBytes();
+
+ /**
+ * <code>string ttl = 5;</code>
+ */
+ String getTtl();
+ /**
+ * <code>string ttl = 5;</code>
+ */
+ com.google.protobuf.ByteString
+ getTtlBytes();
+
+ /**
+ * <code>string uniqueId = 6;</code>
+ */
+ String getUniqueId();
+ /**
+ * <code>string uniqueId = 6;</code>
+ */
+ com.google.protobuf.ByteString
+ getUniqueIdBytes();
+
+ /**
+ * <code>string seqNum = 7;</code>
+ */
+ String getSeqNum();
+ /**
+ * <code>string seqNum = 7;</code>
+ */
+ com.google.protobuf.ByteString
+ getSeqNumBytes();
+
+ /**
+ * <code>string tag = 8;</code>
+ */
+ String getTag();
+ /**
+ * <code>string tag = 8;</code>
+ */
+ com.google.protobuf.ByteString
+ getTagBytes();
+
+ /**
+ * <code>map<string, string> properties = 9;</code>
+ */
+ int getPropertiesCount();
+ /**
+ * <code>map<string, string> properties = 9;</code>
+ */
+ boolean containsProperties(
+ String key);
+ /**
+ * Use {@link #getPropertiesMap()} instead.
+ */
+ @Deprecated
+ java.util.Map<String, String>
+ getProperties();
+ /**
+ * <code>map<string, string> properties = 9;</code>
+ */
+ java.util.Map<String, String>
+ getPropertiesMap();
+ /**
+ * <code>map<string, string> properties = 9;</code>
+ */
+
+ String getPropertiesOrDefault(
+ String key,
+ String defaultValue);
+ /**
+ * <code>map<string, string> properties = 9;</code>
+ */
+
+ String getPropertiesOrThrow(
+ String key);
+}
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/EventmeshGrpc.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/EventmeshGrpc.java
new file mode 100644
index 0000000..406be5d
--- /dev/null
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/EventmeshGrpc.java
@@ -0,0 +1,252 @@
+/*
+ * 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.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: eventmesh-client.proto
+
+package org.apache.eventmesh.common.protocol.grpc.protos;
+
+public final class EventmeshGrpc {
+ private EventmeshGrpc() {}
+ public static void registerAllExtensions(
+ com.google.protobuf.ExtensionRegistryLite registry) {
+ }
+
+ public static void registerAllExtensions(
+ com.google.protobuf.ExtensionRegistry registry) {
+ registerAllExtensions(
+ (com.google.protobuf.ExtensionRegistryLite) registry);
+ }
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_eventmesh_common_protocol_grpc_RequestHeader_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_eventmesh_common_protocol_grpc_RequestHeader_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_eventmesh_common_protocol_grpc_EventMeshMessage_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_eventmesh_common_protocol_grpc_EventMeshMessage_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_eventmesh_common_protocol_grpc_EventMeshMessage_PropertiesEntry_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_eventmesh_common_protocol_grpc_EventMeshMessage_PropertiesEntry_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_eventmesh_common_protocol_grpc_BatchMessage_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_eventmesh_common_protocol_grpc_BatchMessage_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_eventmesh_common_protocol_grpc_BatchMessage_MessageItem_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_eventmesh_common_protocol_grpc_BatchMessage_MessageItem_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_eventmesh_common_protocol_grpc_BatchMessage_MessageItem_PropertiesEntry_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_eventmesh_common_protocol_grpc_BatchMessage_MessageItem_PropertiesEntry_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_eventmesh_common_protocol_grpc_Response_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_eventmesh_common_protocol_grpc_Response_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_eventmesh_common_protocol_grpc_Subscription_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_eventmesh_common_protocol_grpc_Subscription_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_eventmesh_common_protocol_grpc_Subscription_SubscriptionItem_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_eventmesh_common_protocol_grpc_Subscription_SubscriptionItem_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_eventmesh_common_protocol_grpc_Heartbeat_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_eventmesh_common_protocol_grpc_Heartbeat_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_eventmesh_common_protocol_grpc_Heartbeat_HeartbeatItem_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_eventmesh_common_protocol_grpc_Heartbeat_HeartbeatItem_fieldAccessorTable;
+
+ public static com.google.protobuf.Descriptors.FileDescriptor
+ getDescriptor() {
+ return descriptor;
+ }
+ private static com.google.protobuf.Descriptors.FileDescriptor
+ descriptor;
+ static {
+ String[] descriptorData = {
+ "\n\026eventmesh-client.proto\022\036eventmesh.comm" +
+ "on.protocol.grpc\"\332\001\n\rRequestHeader\022\013\n\003en" +
+ "v\030\001 \001(\t\022\016\n\006region\030\002 \001(\t\022\013\n\003idc\030\003 \001(\t\022\n\n\002" +
+ "ip\030\004 \001(\t\022\013\n\003pid\030\005 \001(\t\022\013\n\003sys\030\006 \001(\t\022\020\n\010us" +
+ "ername\030\007 \001(\t\022\020\n\010password\030\010 \001(\t\022\020\n\010langua" +
+ "ge\030\t \001(\t\022\024\n\014protocolType\030\n \001(\t\022\027\n\017protoc" +
+ "olVersion\030\013 \001(\t\022\024\n\014protocolDesc\030\014 \001(\t\"\315\002" +
+ "\n\020EventMeshMessage\022=\n\006header\030\001 \001(\0132-.eve" +
+ "ntmesh.common.protocol.grpc.RequestHeade" +
+ "r\022\025\n\rproducerGroup\030\002 \001(\t\022\r\n\005topic\030\003 \001(\t\022" +
+ "\017\n\007content\030\004 \001(\t\022\013\n\003ttl\030\005 \001(\t\022\020\n\010uniqueI" +
+ "d\030\006 \001(\t\022\016\n\006seqNum\030\007 \001(\t\022\013\n\003tag\030\010 \001(\t\022T\n\n" +
+ "properties\030\t \003(\0132@.eventmesh.common.prot" +
+ "ocol.grpc.EventMeshMessage.PropertiesEnt" +
+ "ry\0321\n\017PropertiesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005va" +
+ "lue\030\002 \001(\t:\0028\001\"\260\003\n\014BatchMessage\022=\n\006header" +
+ "\030\001 \001(\0132-.eventmesh.common.protocol.grpc." +
+ "RequestHeader\022\025\n\rproducerGroup\030\002 \001(\t\022\r\n\005" +
+ "topic\030\003 \001(\t\022M\n\013messageItem\030\004 \003(\01328.event" +
+ "mesh.common.protocol.grpc.BatchMessage.M" +
+ "essageItem\032\353\001\n\013MessageItem\022\017\n\007content\030\001 " +
+ "\001(\t\022\013\n\003ttl\030\002 \001(\t\022\020\n\010uniqueId\030\003 \001(\t\022\016\n\006se" +
+ "qNum\030\004 \001(\t\022\013\n\003tag\030\005 \001(\t\022\\\n\nproperties\030\006 " +
+ "\003(\0132H.eventmesh.common.protocol.grpc.Bat" +
+ "chMessage.MessageItem.PropertiesEntry\0321\n" +
+ "\017PropertiesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002" +
+ " \001(\t:\0028\001\"?\n\010Response\022\020\n\010respCode\030\001 \001(\t\022\017" +
+ "\n\007respMsg\030\002 \001(\t\022\020\n\010respTime\030\003 \001(\t\"\212\004\n\014Su" +
+ "bscription\022=\n\006header\030\001 \001(\0132-.eventmesh.c" +
+ "ommon.protocol.grpc.RequestHeader\022\025\n\rcon" +
+ "sumerGroup\030\002 \001(\t\022X\n\021subscriptionItems\030\003 " +
+ "\003(\0132=.eventmesh.common.protocol.grpc.Sub" +
+ "scription.SubscriptionItem\022\013\n\003url\030\004 \001(\t\032" +
+ "\274\002\n\020SubscriptionItem\022\r\n\005topic\030\001 \001(\t\022\\\n\004m" +
+ "ode\030\002 \001(\0162N.eventmesh.common.protocol.gr" +
+ "pc.Subscription.SubscriptionItem.Subscri" +
+ "ptionMode\022\\\n\004type\030\003 \001(\0162N.eventmesh.comm" +
+ "on.protocol.grpc.Subscription.Subscripti" +
+ "onItem.SubscriptionType\"4\n\020SubscriptionM" +
+ "ode\022\016\n\nCLUSTERING\020\000\022\020\n\014BROADCASTING\020\001\"\'\n" +
+ "\020SubscriptionType\022\t\n\005ASYNC\020\000\022\010\n\004SYNC\020\001\"\340" +
+ "\002\n\tHeartbeat\022=\n\006header\030\001 \001(\0132-.eventmesh" +
+ ".common.protocol.grpc.RequestHeader\022H\n\nc" +
+ "lientType\030\002 \001(\01624.eventmesh.common.proto" +
+ "col.grpc.Heartbeat.ClientType\022\025\n\rproduce" +
+ "rGroup\030\003 \001(\t\022\025\n\rconsumerGroup\030\004 \001(\t\022O\n\016h" +
+ "eartbeatItems\030\005 \003(\01327.eventmesh.common.p" +
+ "rotocol.grpc.Heartbeat.HeartbeatItem\032+\n\r" +
+ "HeartbeatItem\022\r\n\005topic\030\001 \001(\t\022\013\n\003url\030\002 \001(" +
+ "\t\"\036\n\nClientType\022\007\n\003PUB\020\000\022\007\n\003SUB\020\0012\315\002\n\020Pu" +
+ "blisherService\022e\n\007publish\0220.eventmesh.co" +
+ "mmon.protocol.grpc.EventMeshMessage\032(.ev" +
+ "entmesh.common.protocol.grpc.Response\022j\n" +
+ "\014requestReply\0220.eventmesh.common.protoco" +
+ "l.grpc.EventMeshMessage\032(.eventmesh.comm" +
+ "on.protocol.grpc.Response\022f\n\014batchPublis" +
+ "h\022,.eventmesh.common.protocol.grpc.Batch" +
+ "Message\032(.eventmesh.common.protocol.grpc" +
+ ".Response2\322\002\n\017ConsumerService\022c\n\tsubscri" +
+ "be\022,.eventmesh.common.protocol.grpc.Subs" +
+ "cription\032(.eventmesh.common.protocol.grp" +
+ "c.Response\022s\n\017subscribeStream\022,.eventmes" +
+ "h.common.protocol.grpc.Subscription\0320.ev" +
+ "entmesh.common.protocol.grpc.EventMeshMe" +
+ "ssage0\001\022e\n\013unsubscribe\022,.eventmesh.commo" +
+ "n.protocol.grpc.Subscription\032(.eventmesh" +
+ ".common.protocol.grpc.Response2t\n\020Heartb" +
+ "eatService\022`\n\theartbeat\022).eventmesh.comm" +
+ "on.protocol.grpc.Heartbeat\032(.eventmesh.c" +
+ "ommon.protocol.grpc.ResponseBC\n0org.apac" +
+ "he.eventmesh.common.protocol.grpc.protos" +
+ "B\rEventmeshGrpcP\001b\006proto3"
+ };
+ com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
+ new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
+ public com.google.protobuf.ExtensionRegistry assignDescriptors(
+ com.google.protobuf.Descriptors.FileDescriptor root) {
+ descriptor = root;
+ return null;
+ }
+ };
+ com.google.protobuf.Descriptors.FileDescriptor
+ .internalBuildGeneratedFileFrom(descriptorData,
+ new com.google.protobuf.Descriptors.FileDescriptor[] {
+ }, assigner);
+ internal_static_eventmesh_common_protocol_grpc_RequestHeader_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_eventmesh_common_protocol_grpc_RequestHeader_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_eventmesh_common_protocol_grpc_RequestHeader_descriptor,
+ new String[] { "Env", "Region", "Idc", "Ip", "Pid", "Sys", "Username", "Password", "Language", "ProtocolType", "ProtocolVersion", "ProtocolDesc", });
+ internal_static_eventmesh_common_protocol_grpc_EventMeshMessage_descriptor =
+ getDescriptor().getMessageTypes().get(1);
+ internal_static_eventmesh_common_protocol_grpc_EventMeshMessage_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_eventmesh_common_protocol_grpc_EventMeshMessage_descriptor,
+ new String[] { "Header", "ProducerGroup", "Topic", "Content", "Ttl", "UniqueId", "SeqNum", "Tag", "Properties", });
+ internal_static_eventmesh_common_protocol_grpc_EventMeshMessage_PropertiesEntry_descriptor =
+ internal_static_eventmesh_common_protocol_grpc_EventMeshMessage_descriptor.getNestedTypes().get(0);
+ internal_static_eventmesh_common_protocol_grpc_EventMeshMessage_PropertiesEntry_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_eventmesh_common_protocol_grpc_EventMeshMessage_PropertiesEntry_descriptor,
+ new String[] { "Key", "Value", });
+ internal_static_eventmesh_common_protocol_grpc_BatchMessage_descriptor =
+ getDescriptor().getMessageTypes().get(2);
+ internal_static_eventmesh_common_protocol_grpc_BatchMessage_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_eventmesh_common_protocol_grpc_BatchMessage_descriptor,
+ new String[] { "Header", "ProducerGroup", "Topic", "MessageItem", });
+ internal_static_eventmesh_common_protocol_grpc_BatchMessage_MessageItem_descriptor =
+ internal_static_eventmesh_common_protocol_grpc_BatchMessage_descriptor.getNestedTypes().get(0);
+ internal_static_eventmesh_common_protocol_grpc_BatchMessage_MessageItem_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_eventmesh_common_protocol_grpc_BatchMessage_MessageItem_descriptor,
+ new String[] { "Content", "Ttl", "UniqueId", "SeqNum", "Tag", "Properties", });
+ internal_static_eventmesh_common_protocol_grpc_BatchMessage_MessageItem_PropertiesEntry_descriptor =
+ internal_static_eventmesh_common_protocol_grpc_BatchMessage_MessageItem_descriptor.getNestedTypes().get(0);
+ internal_static_eventmesh_common_protocol_grpc_BatchMessage_MessageItem_PropertiesEntry_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_eventmesh_common_protocol_grpc_BatchMessage_MessageItem_PropertiesEntry_descriptor,
+ new String[] { "Key", "Value", });
+ internal_static_eventmesh_common_protocol_grpc_Response_descriptor =
+ getDescriptor().getMessageTypes().get(3);
+ internal_static_eventmesh_common_protocol_grpc_Response_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_eventmesh_common_protocol_grpc_Response_descriptor,
+ new String[] { "RespCode", "RespMsg", "RespTime", });
+ internal_static_eventmesh_common_protocol_grpc_Subscription_descriptor =
+ getDescriptor().getMessageTypes().get(4);
+ internal_static_eventmesh_common_protocol_grpc_Subscription_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_eventmesh_common_protocol_grpc_Subscription_descriptor,
+ new String[] { "Header", "ConsumerGroup", "SubscriptionItems", "Url", });
+ internal_static_eventmesh_common_protocol_grpc_Subscription_SubscriptionItem_descriptor =
+ internal_static_eventmesh_common_protocol_grpc_Subscription_descriptor.getNestedTypes().get(0);
+ internal_static_eventmesh_common_protocol_grpc_Subscription_SubscriptionItem_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_eventmesh_common_protocol_grpc_Subscription_SubscriptionItem_descriptor,
+ new String[] { "Topic", "Mode", "Type", });
+ internal_static_eventmesh_common_protocol_grpc_Heartbeat_descriptor =
+ getDescriptor().getMessageTypes().get(5);
+ internal_static_eventmesh_common_protocol_grpc_Heartbeat_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_eventmesh_common_protocol_grpc_Heartbeat_descriptor,
+ new String[] { "Header", "ClientType", "ProducerGroup", "ConsumerGroup", "HeartbeatItems", });
+ internal_static_eventmesh_common_protocol_grpc_Heartbeat_HeartbeatItem_descriptor =
+ internal_static_eventmesh_common_protocol_grpc_Heartbeat_descriptor.getNestedTypes().get(0);
+ internal_static_eventmesh_common_protocol_grpc_Heartbeat_HeartbeatItem_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_eventmesh_common_protocol_grpc_Heartbeat_HeartbeatItem_descriptor,
+ new String[] { "Topic", "Url", });
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/Heartbeat.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/Heartbeat.java
new file mode 100644
index 0000000..814d897
--- /dev/null
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/Heartbeat.java
@@ -0,0 +1,2032 @@
+/*
+ * 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.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: eventmesh-client.proto
+
+package org.apache.eventmesh.common.protocol.grpc.protos;
+
+/**
+ * Protobuf type {@code eventmesh.common.protocol.grpc.Heartbeat}
+ */
+public final class Heartbeat extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:eventmesh.common.protocol.grpc.Heartbeat)
+ HeartbeatOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use Heartbeat.newBuilder() to construct.
+ private Heartbeat(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
+ super(builder);
+ }
+ private Heartbeat() {
+ clientType_ = 0;
+ producerGroup_ = "";
+ consumerGroup_ = "";
+ heartbeatItems_ = java.util.Collections.emptyList();
+ }
+
+ @Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private Heartbeat(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ 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;
+ default: {
+ if (!parseUnknownFieldProto3(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ RequestHeader.Builder subBuilder = null;
+ if (header_ != null) {
+ subBuilder = header_.toBuilder();
+ }
+ header_ = input.readMessage(RequestHeader.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(header_);
+ header_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ case 16: {
+ int rawValue = input.readEnum();
+
+ clientType_ = rawValue;
+ break;
+ }
+ case 26: {
+ String s = input.readStringRequireUtf8();
+
+ producerGroup_ = s;
+ break;
+ }
+ case 34: {
+ String s = input.readStringRequireUtf8();
+
+ consumerGroup_ = s;
+ break;
+ }
+ case 42: {
+ if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
+ heartbeatItems_ = new java.util.ArrayList<HeartbeatItem>();
+ mutable_bitField0_ |= 0x00000010;
+ }
+ heartbeatItems_.add(
+ input.readMessage(HeartbeatItem.parser(), extensionRegistry));
+ 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 {
+ if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
+ heartbeatItems_ = java.util.Collections.unmodifiableList(heartbeatItems_);
+ }
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Heartbeat_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Heartbeat_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Heartbeat.class, Builder.class);
+ }
+
+ /**
+ * Protobuf enum {@code eventmesh.common.protocol.grpc.Heartbeat.ClientType}
+ */
+ public enum ClientType
+ implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ * <code>PUB = 0;</code>
+ */
+ PUB(0),
+ /**
+ * <code>SUB = 1;</code>
+ */
+ SUB(1),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ * <code>PUB = 0;</code>
+ */
+ public static final int PUB_VALUE = 0;
+ /**
+ * <code>SUB = 1;</code>
+ */
+ public static final int SUB_VALUE = 1;
+
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @Deprecated
+ public static ClientType valueOf(int value) {
+ return forNumber(value);
+ }
+
+ public static ClientType forNumber(int value) {
+ switch (value) {
+ case 0: return PUB;
+ case 1: return SUB;
+ default: return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap<ClientType>
+ internalGetValueMap() {
+ return internalValueMap;
+ }
+ private static final com.google.protobuf.Internal.EnumLiteMap<
+ ClientType> internalValueMap =
+ new com.google.protobuf.Internal.EnumLiteMap<ClientType>() {
+ public ClientType findValueByNumber(int number) {
+ return ClientType.forNumber(number);
+ }
+ };
+
+ public final com.google.protobuf.Descriptors.EnumValueDescriptor
+ getValueDescriptor() {
+ return getDescriptor().getValues().get(ordinal());
+ }
+ public final com.google.protobuf.Descriptors.EnumDescriptor
+ getDescriptorForType() {
+ return getDescriptor();
+ }
+ public static final com.google.protobuf.Descriptors.EnumDescriptor
+ getDescriptor() {
+ return Heartbeat.getDescriptor().getEnumTypes().get(0);
+ }
+
+ private static final ClientType[] VALUES = values();
+
+ public static ClientType valueOf(
+ com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+ if (desc.getType() != getDescriptor()) {
+ throw new IllegalArgumentException(
+ "EnumValueDescriptor is not for this type.");
+ }
+ if (desc.getIndex() == -1) {
+ return UNRECOGNIZED;
+ }
+ return VALUES[desc.getIndex()];
+ }
+
+ private final int value;
+
+ private ClientType(int value) {
+ this.value = value;
+ }
+
+ // @@protoc_insertion_point(enum_scope:eventmesh.common.protocol.grpc.Heartbeat.ClientType)
+ }
+
+ public interface HeartbeatItemOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * <code>string topic = 1;</code>
+ */
+ String getTopic();
+ /**
+ * <code>string topic = 1;</code>
+ */
+ com.google.protobuf.ByteString
+ getTopicBytes();
+
+ /**
+ * <code>string url = 2;</code>
+ */
+ String getUrl();
+ /**
+ * <code>string url = 2;</code>
+ */
+ com.google.protobuf.ByteString
+ getUrlBytes();
+ }
+ /**
+ * Protobuf type {@code eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem}
+ */
+ public static final class HeartbeatItem extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem)
+ HeartbeatItemOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use HeartbeatItem.newBuilder() to construct.
+ private HeartbeatItem(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
+ super(builder);
+ }
+ private HeartbeatItem() {
+ topic_ = "";
+ url_ = "";
+ }
+
+ @Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private HeartbeatItem(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ 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;
+ default: {
+ if (!parseUnknownFieldProto3(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ String s = input.readStringRequireUtf8();
+
+ topic_ = s;
+ break;
+ }
+ case 18: {
+ String s = input.readStringRequireUtf8();
+
+ url_ = s;
+ 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 EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Heartbeat_HeartbeatItem_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Heartbeat_HeartbeatItem_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ HeartbeatItem.class, Builder.class);
+ }
+
+ public static final int TOPIC_FIELD_NUMBER = 1;
+ private volatile Object topic_;
+ /**
+ * <code>string topic = 1;</code>
+ */
+ public String getTopic() {
+ Object ref = topic_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ topic_ = s;
+ return s;
+ }
+ }
+ /**
+ * <code>string topic = 1;</code>
+ */
+ public com.google.protobuf.ByteString
+ getTopicBytes() {
+ Object ref = topic_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ topic_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int URL_FIELD_NUMBER = 2;
+ private volatile Object url_;
+ /**
+ * <code>string url = 2;</code>
+ */
+ public String getUrl() {
+ Object ref = url_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ url_ = s;
+ return s;
+ }
+ }
+ /**
+ * <code>string url = 2;</code>
+ */
+ public com.google.protobuf.ByteString
+ getUrlBytes() {
+ Object ref = url_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ url_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (!getTopicBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, topic_);
+ }
+ if (!getUrlBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, url_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getTopicBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, topic_);
+ }
+ if (!getUrlBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, url_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof HeartbeatItem)) {
+ return super.equals(obj);
+ }
+ HeartbeatItem other = (HeartbeatItem) obj;
+
+ boolean result = true;
+ result = result && getTopic()
+ .equals(other.getTopic());
+ result = result && getUrl()
+ .equals(other.getUrl());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + TOPIC_FIELD_NUMBER;
+ hash = (53 * hash) + getTopic().hashCode();
+ hash = (37 * hash) + URL_FIELD_NUMBER;
+ hash = (53 * hash) + getUrl().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static HeartbeatItem parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static HeartbeatItem parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static HeartbeatItem parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static HeartbeatItem parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static HeartbeatItem parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static HeartbeatItem parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static HeartbeatItem parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static HeartbeatItem 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 HeartbeatItem parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static HeartbeatItem 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 HeartbeatItem parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static HeartbeatItem parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(HeartbeatItem prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(
+ BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
+ // @@protoc_insertion_point(builder_implements:eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem)
+ HeartbeatItemOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Heartbeat_HeartbeatItem_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Heartbeat_HeartbeatItem_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ HeartbeatItem.class, Builder.class);
+ }
+
+ // Construct using org.apache.eventmesh.common.protocol.grpc.protos.Heartbeat.HeartbeatItem.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
+ }
+ }
+ public Builder clear() {
+ super.clear();
+ topic_ = "";
+
+ url_ = "";
+
+ return this;
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Heartbeat_HeartbeatItem_descriptor;
+ }
+
+ public HeartbeatItem getDefaultInstanceForType() {
+ return HeartbeatItem.getDefaultInstance();
+ }
+
+ public HeartbeatItem build() {
+ HeartbeatItem result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public HeartbeatItem buildPartial() {
+ HeartbeatItem result = new HeartbeatItem(this);
+ result.topic_ = topic_;
+ result.url_ = url_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder clone() {
+ return (Builder) super.clone();
+ }
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ Object value) {
+ return (Builder) super.setField(field, value);
+ }
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return (Builder) super.clearField(field);
+ }
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return (Builder) super.clearOneof(oneof);
+ }
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, Object value) {
+ return (Builder) super.setRepeatedField(field, index, value);
+ }
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ Object value) {
+ return (Builder) super.addRepeatedField(field, value);
+ }
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof HeartbeatItem) {
+ return mergeFrom((HeartbeatItem)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(HeartbeatItem other) {
+ if (other == HeartbeatItem.getDefaultInstance()) return this;
+ if (!other.getTopic().isEmpty()) {
+ topic_ = other.topic_;
+ onChanged();
+ }
+ if (!other.getUrl().isEmpty()) {
+ url_ = other.url_;
+ onChanged();
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ HeartbeatItem parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (HeartbeatItem) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ private Object topic_ = "";
+ /**
+ * <code>string topic = 1;</code>
+ */
+ public String getTopic() {
+ Object ref = topic_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ topic_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+ /**
+ * <code>string topic = 1;</code>
+ */
+ public com.google.protobuf.ByteString
+ getTopicBytes() {
+ Object ref = topic_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ topic_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>string topic = 1;</code>
+ */
+ public Builder setTopic(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ topic_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string topic = 1;</code>
+ */
+ public Builder clearTopic() {
+
+ topic_ = getDefaultInstance().getTopic();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string topic = 1;</code>
+ */
+ public Builder setTopicBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ topic_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object url_ = "";
+ /**
+ * <code>string url = 2;</code>
+ */
+ public String getUrl() {
+ Object ref = url_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ url_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+ /**
+ * <code>string url = 2;</code>
+ */
+ public com.google.protobuf.ByteString
+ getUrlBytes() {
+ Object ref = url_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ url_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>string url = 2;</code>
+ */
+ public Builder setUrl(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ url_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string url = 2;</code>
+ */
+ public Builder clearUrl() {
+
+ url_ = getDefaultInstance().getUrl();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string url = 2;</code>
+ */
+ public Builder setUrlBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ url_ = value;
+ onChanged();
+ return this;
+ }
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem)
+ }
+
+ // @@protoc_insertion_point(class_scope:eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem)
+ private static final HeartbeatItem DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new HeartbeatItem();
+ }
+
+ public static HeartbeatItem getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser<HeartbeatItem>
+ PARSER = new com.google.protobuf.AbstractParser<HeartbeatItem>() {
+ public HeartbeatItem parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new HeartbeatItem(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser<HeartbeatItem> parser() {
+ return PARSER;
+ }
+
+ @Override
+ public com.google.protobuf.Parser<HeartbeatItem> getParserForType() {
+ return PARSER;
+ }
+
+ public HeartbeatItem getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ private int bitField0_;
+ public static final int HEADER_FIELD_NUMBER = 1;
+ private RequestHeader header_;
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ public boolean hasHeader() {
+ return header_ != null;
+ }
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ public RequestHeader getHeader() {
+ return header_ == null ? RequestHeader.getDefaultInstance() : header_;
+ }
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ public RequestHeaderOrBuilder getHeaderOrBuilder() {
+ return getHeader();
+ }
+
+ public static final int CLIENTTYPE_FIELD_NUMBER = 2;
+ private int clientType_;
+ /**
+ * <code>.eventmesh.common.protocol.grpc.Heartbeat.ClientType clientType = 2;</code>
+ */
+ public int getClientTypeValue() {
+ return clientType_;
+ }
+ /**
+ * <code>.eventmesh.common.protocol.grpc.Heartbeat.ClientType clientType = 2;</code>
+ */
+ public ClientType getClientType() {
+ ClientType result = ClientType.valueOf(clientType_);
+ return result == null ? ClientType.UNRECOGNIZED : result;
+ }
+
+ public static final int PRODUCERGROUP_FIELD_NUMBER = 3;
+ private volatile Object producerGroup_;
+ /**
+ * <code>string producerGroup = 3;</code>
+ */
+ public String getProducerGroup() {
+ Object ref = producerGroup_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ producerGroup_ = s;
+ return s;
+ }
+ }
+ /**
+ * <code>string producerGroup = 3;</code>
+ */
+ public com.google.protobuf.ByteString
+ getProducerGroupBytes() {
+ Object ref = producerGroup_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ producerGroup_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int CONSUMERGROUP_FIELD_NUMBER = 4;
+ private volatile Object consumerGroup_;
+ /**
+ * <code>string consumerGroup = 4;</code>
+ */
+ public String getConsumerGroup() {
+ Object ref = consumerGroup_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ consumerGroup_ = s;
+ return s;
+ }
+ }
+ /**
+ * <code>string consumerGroup = 4;</code>
+ */
+ public com.google.protobuf.ByteString
+ getConsumerGroupBytes() {
+ Object ref = consumerGroup_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ consumerGroup_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int HEARTBEATITEMS_FIELD_NUMBER = 5;
+ private java.util.List<HeartbeatItem> heartbeatItems_;
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public java.util.List<HeartbeatItem> getHeartbeatItemsList() {
+ return heartbeatItems_;
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public java.util.List<? extends HeartbeatItemOrBuilder>
+ getHeartbeatItemsOrBuilderList() {
+ return heartbeatItems_;
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public int getHeartbeatItemsCount() {
+ return heartbeatItems_.size();
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public HeartbeatItem getHeartbeatItems(int index) {
+ return heartbeatItems_.get(index);
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public HeartbeatItemOrBuilder getHeartbeatItemsOrBuilder(
+ int index) {
+ return heartbeatItems_.get(index);
+ }
+
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (header_ != null) {
+ output.writeMessage(1, getHeader());
+ }
+ if (clientType_ != ClientType.PUB.getNumber()) {
+ output.writeEnum(2, clientType_);
+ }
+ if (!getProducerGroupBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, producerGroup_);
+ }
+ if (!getConsumerGroupBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, consumerGroup_);
+ }
+ for (int i = 0; i < heartbeatItems_.size(); i++) {
+ output.writeMessage(5, heartbeatItems_.get(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (header_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(1, getHeader());
+ }
+ if (clientType_ != ClientType.PUB.getNumber()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeEnumSize(2, clientType_);
+ }
+ if (!getProducerGroupBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, producerGroup_);
+ }
+ if (!getConsumerGroupBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, consumerGroup_);
+ }
+ for (int i = 0; i < heartbeatItems_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(5, heartbeatItems_.get(i));
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof Heartbeat)) {
+ return super.equals(obj);
+ }
+ Heartbeat other = (Heartbeat) obj;
+
+ boolean result = true;
+ result = result && (hasHeader() == other.hasHeader());
+ if (hasHeader()) {
+ result = result && getHeader()
+ .equals(other.getHeader());
+ }
+ result = result && clientType_ == other.clientType_;
+ result = result && getProducerGroup()
+ .equals(other.getProducerGroup());
+ result = result && getConsumerGroup()
+ .equals(other.getConsumerGroup());
+ result = result && getHeartbeatItemsList()
+ .equals(other.getHeartbeatItemsList());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasHeader()) {
+ hash = (37 * hash) + HEADER_FIELD_NUMBER;
+ hash = (53 * hash) + getHeader().hashCode();
+ }
+ hash = (37 * hash) + CLIENTTYPE_FIELD_NUMBER;
+ hash = (53 * hash) + clientType_;
+ hash = (37 * hash) + PRODUCERGROUP_FIELD_NUMBER;
+ hash = (53 * hash) + getProducerGroup().hashCode();
+ hash = (37 * hash) + CONSUMERGROUP_FIELD_NUMBER;
+ hash = (53 * hash) + getConsumerGroup().hashCode();
+ if (getHeartbeatItemsCount() > 0) {
+ hash = (37 * hash) + HEARTBEATITEMS_FIELD_NUMBER;
+ hash = (53 * hash) + getHeartbeatItemsList().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static Heartbeat parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static Heartbeat parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static Heartbeat parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static Heartbeat parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static Heartbeat parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static Heartbeat parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static Heartbeat parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static Heartbeat 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 Heartbeat parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static Heartbeat 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 Heartbeat parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static Heartbeat parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(Heartbeat prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(
+ BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code eventmesh.common.protocol.grpc.Heartbeat}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
+ // @@protoc_insertion_point(builder_implements:eventmesh.common.protocol.grpc.Heartbeat)
+ HeartbeatOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Heartbeat_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Heartbeat_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Heartbeat.class, Builder.class);
+ }
+
+ // Construct using org.apache.eventmesh.common.protocol.grpc.protos.Heartbeat.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
+ getHeartbeatItemsFieldBuilder();
+ }
+ }
+ public Builder clear() {
+ super.clear();
+ if (headerBuilder_ == null) {
+ header_ = null;
+ } else {
+ header_ = null;
+ headerBuilder_ = null;
+ }
+ clientType_ = 0;
+
+ producerGroup_ = "";
+
+ consumerGroup_ = "";
+
+ if (heartbeatItemsBuilder_ == null) {
+ heartbeatItems_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000010);
+ } else {
+ heartbeatItemsBuilder_.clear();
+ }
+ return this;
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Heartbeat_descriptor;
+ }
+
+ public Heartbeat getDefaultInstanceForType() {
+ return Heartbeat.getDefaultInstance();
+ }
+
+ public Heartbeat build() {
+ Heartbeat result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public Heartbeat buildPartial() {
+ Heartbeat result = new Heartbeat(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (headerBuilder_ == null) {
+ result.header_ = header_;
+ } else {
+ result.header_ = headerBuilder_.build();
+ }
+ result.clientType_ = clientType_;
+ result.producerGroup_ = producerGroup_;
+ result.consumerGroup_ = consumerGroup_;
+ if (heartbeatItemsBuilder_ == null) {
+ if (((bitField0_ & 0x00000010) == 0x00000010)) {
+ heartbeatItems_ = java.util.Collections.unmodifiableList(heartbeatItems_);
+ bitField0_ = (bitField0_ & ~0x00000010);
+ }
+ result.heartbeatItems_ = heartbeatItems_;
+ } else {
+ result.heartbeatItems_ = heartbeatItemsBuilder_.build();
+ }
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder clone() {
+ return (Builder) super.clone();
+ }
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ Object value) {
+ return (Builder) super.setField(field, value);
+ }
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return (Builder) super.clearField(field);
+ }
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return (Builder) super.clearOneof(oneof);
+ }
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, Object value) {
+ return (Builder) super.setRepeatedField(field, index, value);
+ }
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ Object value) {
+ return (Builder) super.addRepeatedField(field, value);
+ }
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof Heartbeat) {
+ return mergeFrom((Heartbeat)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(Heartbeat other) {
+ if (other == Heartbeat.getDefaultInstance()) return this;
+ if (other.hasHeader()) {
+ mergeHeader(other.getHeader());
+ }
+ if (other.clientType_ != 0) {
+ setClientTypeValue(other.getClientTypeValue());
+ }
+ if (!other.getProducerGroup().isEmpty()) {
+ producerGroup_ = other.producerGroup_;
+ onChanged();
+ }
+ if (!other.getConsumerGroup().isEmpty()) {
+ consumerGroup_ = other.consumerGroup_;
+ onChanged();
+ }
+ if (heartbeatItemsBuilder_ == null) {
+ if (!other.heartbeatItems_.isEmpty()) {
+ if (heartbeatItems_.isEmpty()) {
+ heartbeatItems_ = other.heartbeatItems_;
+ bitField0_ = (bitField0_ & ~0x00000010);
+ } else {
+ ensureHeartbeatItemsIsMutable();
+ heartbeatItems_.addAll(other.heartbeatItems_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.heartbeatItems_.isEmpty()) {
+ if (heartbeatItemsBuilder_.isEmpty()) {
+ heartbeatItemsBuilder_.dispose();
+ heartbeatItemsBuilder_ = null;
+ heartbeatItems_ = other.heartbeatItems_;
+ bitField0_ = (bitField0_ & ~0x00000010);
+ heartbeatItemsBuilder_ =
+ com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
+ getHeartbeatItemsFieldBuilder() : null;
+ } else {
+ heartbeatItemsBuilder_.addAllMessages(other.heartbeatItems_);
+ }
+ }
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ Heartbeat parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (Heartbeat) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ private RequestHeader header_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ RequestHeader, RequestHeader.Builder, RequestHeaderOrBuilder> headerBuilder_;
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ public boolean hasHeader() {
+ return headerBuilder_ != null || header_ != null;
+ }
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ public RequestHeader getHeader() {
+ if (headerBuilder_ == null) {
+ return header_ == null ? RequestHeader.getDefaultInstance() : header_;
+ } else {
+ return headerBuilder_.getMessage();
+ }
+ }
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ public Builder setHeader(RequestHeader value) {
+ if (headerBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ header_ = value;
+ onChanged();
+ } else {
+ headerBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ public Builder setHeader(
+ RequestHeader.Builder builderForValue) {
+ if (headerBuilder_ == null) {
+ header_ = builderForValue.build();
+ onChanged();
+ } else {
+ headerBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ public Builder mergeHeader(RequestHeader value) {
+ if (headerBuilder_ == null) {
+ if (header_ != null) {
+ header_ =
+ RequestHeader.newBuilder(header_).mergeFrom(value).buildPartial();
+ } else {
+ header_ = value;
+ }
+ onChanged();
+ } else {
+ headerBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ public Builder clearHeader() {
+ if (headerBuilder_ == null) {
+ header_ = null;
+ onChanged();
+ } else {
+ header_ = null;
+ headerBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ public RequestHeader.Builder getHeaderBuilder() {
+
+ onChanged();
+ return getHeaderFieldBuilder().getBuilder();
+ }
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ public RequestHeaderOrBuilder getHeaderOrBuilder() {
+ if (headerBuilder_ != null) {
+ return headerBuilder_.getMessageOrBuilder();
+ } else {
+ return header_ == null ?
+ RequestHeader.getDefaultInstance() : header_;
+ }
+ }
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ RequestHeader, RequestHeader.Builder, RequestHeaderOrBuilder>
+ getHeaderFieldBuilder() {
+ if (headerBuilder_ == null) {
+ headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ RequestHeader, RequestHeader.Builder, RequestHeaderOrBuilder>(
+ getHeader(),
+ getParentForChildren(),
+ isClean());
+ header_ = null;
+ }
+ return headerBuilder_;
+ }
+
+ private int clientType_ = 0;
+ /**
+ * <code>.eventmesh.common.protocol.grpc.Heartbeat.ClientType clientType = 2;</code>
+ */
+ public int getClientTypeValue() {
+ return clientType_;
+ }
+ /**
+ * <code>.eventmesh.common.protocol.grpc.Heartbeat.ClientType clientType = 2;</code>
+ */
+ public Builder setClientTypeValue(int value) {
+ clientType_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>.eventmesh.common.protocol.grpc.Heartbeat.ClientType clientType = 2;</code>
+ */
+ public ClientType getClientType() {
+ ClientType result = ClientType.valueOf(clientType_);
+ return result == null ? ClientType.UNRECOGNIZED : result;
+ }
+ /**
+ * <code>.eventmesh.common.protocol.grpc.Heartbeat.ClientType clientType = 2;</code>
+ */
+ public Builder setClientType(ClientType value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ clientType_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>.eventmesh.common.protocol.grpc.Heartbeat.ClientType clientType = 2;</code>
+ */
+ public Builder clearClientType() {
+
+ clientType_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private Object producerGroup_ = "";
+ /**
+ * <code>string producerGroup = 3;</code>
+ */
+ public String getProducerGroup() {
+ Object ref = producerGroup_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ producerGroup_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+ /**
+ * <code>string producerGroup = 3;</code>
+ */
+ public com.google.protobuf.ByteString
+ getProducerGroupBytes() {
+ Object ref = producerGroup_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ producerGroup_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>string producerGroup = 3;</code>
+ */
+ public Builder setProducerGroup(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ producerGroup_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string producerGroup = 3;</code>
+ */
+ public Builder clearProducerGroup() {
+
+ producerGroup_ = getDefaultInstance().getProducerGroup();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string producerGroup = 3;</code>
+ */
+ public Builder setProducerGroupBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ producerGroup_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object consumerGroup_ = "";
+ /**
+ * <code>string consumerGroup = 4;</code>
+ */
+ public String getConsumerGroup() {
+ Object ref = consumerGroup_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ consumerGroup_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+ /**
+ * <code>string consumerGroup = 4;</code>
+ */
+ public com.google.protobuf.ByteString
+ getConsumerGroupBytes() {
+ Object ref = consumerGroup_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ consumerGroup_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>string consumerGroup = 4;</code>
+ */
+ public Builder setConsumerGroup(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ consumerGroup_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string consumerGroup = 4;</code>
+ */
+ public Builder clearConsumerGroup() {
+
+ consumerGroup_ = getDefaultInstance().getConsumerGroup();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string consumerGroup = 4;</code>
+ */
+ public Builder setConsumerGroupBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ consumerGroup_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.util.List<HeartbeatItem> heartbeatItems_ =
+ java.util.Collections.emptyList();
+ private void ensureHeartbeatItemsIsMutable() {
+ if (!((bitField0_ & 0x00000010) == 0x00000010)) {
+ heartbeatItems_ = new java.util.ArrayList<HeartbeatItem>(heartbeatItems_);
+ bitField0_ |= 0x00000010;
+ }
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ HeartbeatItem, HeartbeatItem.Builder, HeartbeatItemOrBuilder> heartbeatItemsBuilder_;
+
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public java.util.List<HeartbeatItem> getHeartbeatItemsList() {
+ if (heartbeatItemsBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(heartbeatItems_);
+ } else {
+ return heartbeatItemsBuilder_.getMessageList();
+ }
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public int getHeartbeatItemsCount() {
+ if (heartbeatItemsBuilder_ == null) {
+ return heartbeatItems_.size();
+ } else {
+ return heartbeatItemsBuilder_.getCount();
+ }
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public HeartbeatItem getHeartbeatItems(int index) {
+ if (heartbeatItemsBuilder_ == null) {
+ return heartbeatItems_.get(index);
+ } else {
+ return heartbeatItemsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public Builder setHeartbeatItems(
+ int index, HeartbeatItem value) {
+ if (heartbeatItemsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureHeartbeatItemsIsMutable();
+ heartbeatItems_.set(index, value);
+ onChanged();
+ } else {
+ heartbeatItemsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public Builder setHeartbeatItems(
+ int index, HeartbeatItem.Builder builderForValue) {
+ if (heartbeatItemsBuilder_ == null) {
+ ensureHeartbeatItemsIsMutable();
+ heartbeatItems_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ heartbeatItemsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public Builder addHeartbeatItems(HeartbeatItem value) {
+ if (heartbeatItemsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureHeartbeatItemsIsMutable();
+ heartbeatItems_.add(value);
+ onChanged();
+ } else {
+ heartbeatItemsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public Builder addHeartbeatItems(
+ int index, HeartbeatItem value) {
+ if (heartbeatItemsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureHeartbeatItemsIsMutable();
+ heartbeatItems_.add(index, value);
+ onChanged();
+ } else {
+ heartbeatItemsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public Builder addHeartbeatItems(
+ HeartbeatItem.Builder builderForValue) {
+ if (heartbeatItemsBuilder_ == null) {
+ ensureHeartbeatItemsIsMutable();
+ heartbeatItems_.add(builderForValue.build());
+ onChanged();
+ } else {
+ heartbeatItemsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public Builder addHeartbeatItems(
+ int index, HeartbeatItem.Builder builderForValue) {
+ if (heartbeatItemsBuilder_ == null) {
+ ensureHeartbeatItemsIsMutable();
+ heartbeatItems_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ heartbeatItemsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public Builder addAllHeartbeatItems(
+ Iterable<? extends HeartbeatItem> values) {
+ if (heartbeatItemsBuilder_ == null) {
+ ensureHeartbeatItemsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, heartbeatItems_);
+ onChanged();
+ } else {
+ heartbeatItemsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public Builder clearHeartbeatItems() {
+ if (heartbeatItemsBuilder_ == null) {
+ heartbeatItems_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000010);
+ onChanged();
+ } else {
+ heartbeatItemsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public Builder removeHeartbeatItems(int index) {
+ if (heartbeatItemsBuilder_ == null) {
+ ensureHeartbeatItemsIsMutable();
+ heartbeatItems_.remove(index);
+ onChanged();
+ } else {
+ heartbeatItemsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public HeartbeatItem.Builder getHeartbeatItemsBuilder(
+ int index) {
+ return getHeartbeatItemsFieldBuilder().getBuilder(index);
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public HeartbeatItemOrBuilder getHeartbeatItemsOrBuilder(
+ int index) {
+ if (heartbeatItemsBuilder_ == null) {
+ return heartbeatItems_.get(index); } else {
+ return heartbeatItemsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public java.util.List<? extends HeartbeatItemOrBuilder>
+ getHeartbeatItemsOrBuilderList() {
+ if (heartbeatItemsBuilder_ != null) {
+ return heartbeatItemsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(heartbeatItems_);
+ }
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public HeartbeatItem.Builder addHeartbeatItemsBuilder() {
+ return getHeartbeatItemsFieldBuilder().addBuilder(
+ HeartbeatItem.getDefaultInstance());
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public HeartbeatItem.Builder addHeartbeatItemsBuilder(
+ int index) {
+ return getHeartbeatItemsFieldBuilder().addBuilder(
+ index, HeartbeatItem.getDefaultInstance());
+ }
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ public java.util.List<HeartbeatItem.Builder>
+ getHeartbeatItemsBuilderList() {
+ return getHeartbeatItemsFieldBuilder().getBuilderList();
+ }
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ HeartbeatItem, HeartbeatItem.Builder, HeartbeatItemOrBuilder>
+ getHeartbeatItemsFieldBuilder() {
+ if (heartbeatItemsBuilder_ == null) {
+ heartbeatItemsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
+ HeartbeatItem, HeartbeatItem.Builder, HeartbeatItemOrBuilder>(
+ heartbeatItems_,
+ ((bitField0_ & 0x00000010) == 0x00000010),
+ getParentForChildren(),
+ isClean());
+ heartbeatItems_ = null;
+ }
+ return heartbeatItemsBuilder_;
+ }
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:eventmesh.common.protocol.grpc.Heartbeat)
+ }
+
+ // @@protoc_insertion_point(class_scope:eventmesh.common.protocol.grpc.Heartbeat)
+ private static final Heartbeat DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new Heartbeat();
+ }
+
+ public static Heartbeat getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser<Heartbeat>
+ PARSER = new com.google.protobuf.AbstractParser<Heartbeat>() {
+ public Heartbeat parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new Heartbeat(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser<Heartbeat> parser() {
+ return PARSER;
+ }
+
+ @Override
+ public com.google.protobuf.Parser<Heartbeat> getParserForType() {
+ return PARSER;
+ }
+
+ public Heartbeat getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/HeartbeatOrBuilder.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/HeartbeatOrBuilder.java
new file mode 100644
index 0000000..c3a39aa
--- /dev/null
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/HeartbeatOrBuilder.java
@@ -0,0 +1,92 @@
+/*
+ * 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.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: eventmesh-client.proto
+
+package org.apache.eventmesh.common.protocol.grpc.protos;
+
+public interface HeartbeatOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:eventmesh.common.protocol.grpc.Heartbeat)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ boolean hasHeader();
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ RequestHeader getHeader();
+ /**
+ * <code>.eventmesh.common.protocol.grpc.RequestHeader header = 1;</code>
+ */
+ RequestHeaderOrBuilder getHeaderOrBuilder();
+
+ /**
+ * <code>.eventmesh.common.protocol.grpc.Heartbeat.ClientType clientType = 2;</code>
+ */
+ int getClientTypeValue();
+ /**
+ * <code>.eventmesh.common.protocol.grpc.Heartbeat.ClientType clientType = 2;</code>
+ */
+ Heartbeat.ClientType getClientType();
+
+ /**
+ * <code>string producerGroup = 3;</code>
+ */
+ String getProducerGroup();
+ /**
+ * <code>string producerGroup = 3;</code>
+ */
+ com.google.protobuf.ByteString
+ getProducerGroupBytes();
+
+ /**
+ * <code>string consumerGroup = 4;</code>
+ */
+ String getConsumerGroup();
+ /**
+ * <code>string consumerGroup = 4;</code>
+ */
+ com.google.protobuf.ByteString
+ getConsumerGroupBytes();
+
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ java.util.List<Heartbeat.HeartbeatItem>
+ getHeartbeatItemsList();
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ Heartbeat.HeartbeatItem getHeartbeatItems(int index);
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ int getHeartbeatItemsCount();
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ java.util.List<? extends Heartbeat.HeartbeatItemOrBuilder>
+ getHeartbeatItemsOrBuilderList();
+ /**
+ * <code>repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;</code>
+ */
+ Heartbeat.HeartbeatItemOrBuilder getHeartbeatItemsOrBuilder(
+ int index);
+}
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/HeartbeatServiceGrpc.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/HeartbeatServiceGrpc.java
new file mode 100644
index 0000000..e924b3b
--- /dev/null
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/HeartbeatServiceGrpc.java
@@ -0,0 +1,289 @@
+/*
+ * 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 org.apache.eventmesh.common.protocol.grpc.protos;
+
+import static io.grpc.MethodDescriptor.generateFullMethodName;
+import static io.grpc.stub.ClientCalls.asyncUnaryCall;
+import static io.grpc.stub.ClientCalls.blockingUnaryCall;
+import static io.grpc.stub.ClientCalls.futureUnaryCall;
+import static io.grpc.stub.ServerCalls.asyncUnaryCall;
+import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
+
+/**
+ */
+@javax.annotation.Generated(
+ value = "by gRPC proto compiler (version 1.15.0)",
+ comments = "Source: eventmesh-client.proto")
+public final class HeartbeatServiceGrpc {
+
+ private HeartbeatServiceGrpc() {}
+
+ public static final String SERVICE_NAME = "eventmesh.common.protocol.grpc.HeartbeatService";
+
+ // Static method descriptors that strictly reflect the proto.
+ private static volatile io.grpc.MethodDescriptor<Heartbeat,
+ Response> getHeartbeatMethod;
+
+ @io.grpc.stub.annotations.RpcMethod(
+ fullMethodName = SERVICE_NAME + '/' + "heartbeat",
+ requestType = Heartbeat.class,
+ responseType = Response.class,
+ methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+ public static io.grpc.MethodDescriptor<Heartbeat,
+ Response> getHeartbeatMethod() {
+ io.grpc.MethodDescriptor<Heartbeat, Response> getHeartbeatMethod;
+ if ((getHeartbeatMethod = HeartbeatServiceGrpc.getHeartbeatMethod) == null) {
+ synchronized (HeartbeatServiceGrpc.class) {
+ if ((getHeartbeatMethod = HeartbeatServiceGrpc.getHeartbeatMethod) == null) {
+ HeartbeatServiceGrpc.getHeartbeatMethod = getHeartbeatMethod =
+ io.grpc.MethodDescriptor.<Heartbeat, Response>newBuilder()
+ .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(generateFullMethodName(
+ "eventmesh.common.protocol.grpc.HeartbeatService", "heartbeat"))
+ .setSampledToLocalTracing(true)
+ .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ Heartbeat.getDefaultInstance()))
+ .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ Response.getDefaultInstance()))
+ .setSchemaDescriptor(new HeartbeatServiceMethodDescriptorSupplier("heartbeat"))
+ .build();
+ }
+ }
+ }
+ return getHeartbeatMethod;
+ }
+
+ /**
+ * Creates a new async stub that supports all call types for the service
+ */
+ public static HeartbeatServiceStub newStub(io.grpc.Channel channel) {
+ return new HeartbeatServiceStub(channel);
+ }
+
+ /**
+ * Creates a new blocking-style stub that supports unary and streaming output calls on the service
+ */
+ public static HeartbeatServiceBlockingStub newBlockingStub(
+ io.grpc.Channel channel) {
+ return new HeartbeatServiceBlockingStub(channel);
+ }
+
+ /**
+ * Creates a new ListenableFuture-style stub that supports unary calls on the service
+ */
+ public static HeartbeatServiceFutureStub newFutureStub(
+ io.grpc.Channel channel) {
+ return new HeartbeatServiceFutureStub(channel);
+ }
+
+ /**
+ */
+ public static abstract class HeartbeatServiceImplBase implements io.grpc.BindableService {
+
+ /**
+ */
+ public void heartbeat(Heartbeat request,
+ io.grpc.stub.StreamObserver<Response> responseObserver) {
+ asyncUnimplementedUnaryCall(getHeartbeatMethod(), responseObserver);
+ }
+
+ @Override public final io.grpc.ServerServiceDefinition bindService() {
+ return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
+ .addMethod(
+ getHeartbeatMethod(),
+ asyncUnaryCall(
+ new MethodHandlers<
+ Heartbeat,
+ Response>(
+ this, METHODID_HEARTBEAT)))
+ .build();
+ }
+ }
+
+ /**
+ */
+ public static final class HeartbeatServiceStub extends io.grpc.stub.AbstractStub<HeartbeatServiceStub> {
+ private HeartbeatServiceStub(io.grpc.Channel channel) {
+ super(channel);
+ }
+
+ private HeartbeatServiceStub(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ super(channel, callOptions);
+ }
+
+ @Override
+ protected HeartbeatServiceStub build(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ return new HeartbeatServiceStub(channel, callOptions);
+ }
+
+ /**
+ */
+ public void heartbeat(Heartbeat request,
+ io.grpc.stub.StreamObserver<Response> responseObserver) {
+ asyncUnaryCall(
+ getChannel().newCall(getHeartbeatMethod(), getCallOptions()), request, responseObserver);
+ }
+ }
+
+ /**
+ */
+ public static final class HeartbeatServiceBlockingStub extends io.grpc.stub.AbstractStub<HeartbeatServiceBlockingStub> {
+ private HeartbeatServiceBlockingStub(io.grpc.Channel channel) {
+ super(channel);
+ }
+
+ private HeartbeatServiceBlockingStub(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ super(channel, callOptions);
+ }
+
+ @Override
+ protected HeartbeatServiceBlockingStub build(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ return new HeartbeatServiceBlockingStub(channel, callOptions);
+ }
+
+ /**
+ */
+ public Response heartbeat(Heartbeat request) {
+ return blockingUnaryCall(
+ getChannel(), getHeartbeatMethod(), getCallOptions(), request);
+ }
+ }
+
+ /**
+ */
+ public static final class HeartbeatServiceFutureStub extends io.grpc.stub.AbstractStub<HeartbeatServiceFutureStub> {
+ private HeartbeatServiceFutureStub(io.grpc.Channel channel) {
+ super(channel);
+ }
+
+ private HeartbeatServiceFutureStub(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ super(channel, callOptions);
+ }
+
+ @Override
+ protected HeartbeatServiceFutureStub build(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ return new HeartbeatServiceFutureStub(channel, callOptions);
+ }
+
+ /**
+ */
+ public com.google.common.util.concurrent.ListenableFuture<Response> heartbeat(
+ Heartbeat request) {
+ return futureUnaryCall(
+ getChannel().newCall(getHeartbeatMethod(), getCallOptions()), request);
+ }
+ }
+
+ private static final int METHODID_HEARTBEAT = 0;
+
+ private static final class MethodHandlers<Req, Resp> implements
+ io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
+ io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
+ io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
+ io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
+ private final HeartbeatServiceImplBase serviceImpl;
+ private final int methodId;
+
+ MethodHandlers(HeartbeatServiceImplBase serviceImpl, int methodId) {
+ this.serviceImpl = serviceImpl;
+ this.methodId = methodId;
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
+ switch (methodId) {
+ case METHODID_HEARTBEAT:
+ serviceImpl.heartbeat((Heartbeat) request,
+ (io.grpc.stub.StreamObserver<Response>) responseObserver);
+ break;
+ default:
+ throw new AssertionError();
+ }
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public io.grpc.stub.StreamObserver<Req> invoke(
+ io.grpc.stub.StreamObserver<Resp> responseObserver) {
+ switch (methodId) {
+ default:
+ throw new AssertionError();
+ }
+ }
+ }
+
+ private static abstract class HeartbeatServiceBaseDescriptorSupplier
+ implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
+ HeartbeatServiceBaseDescriptorSupplier() {}
+
+ @Override
+ public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
+ return EventmeshGrpc.getDescriptor();
+ }
+
+ @Override
+ public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
+ return getFileDescriptor().findServiceByName("HeartbeatService");
+ }
+ }
+
+ private static final class HeartbeatServiceFileDescriptorSupplier
+ extends HeartbeatServiceBaseDescriptorSupplier {
+ HeartbeatServiceFileDescriptorSupplier() {}
+ }
+
+ private static final class HeartbeatServiceMethodDescriptorSupplier
+ extends HeartbeatServiceBaseDescriptorSupplier
+ implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
+ private final String methodName;
+
+ HeartbeatServiceMethodDescriptorSupplier(String methodName) {
+ this.methodName = methodName;
+ }
+
+ @Override
+ public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
+ return getServiceDescriptor().findMethodByName(methodName);
+ }
+ }
+
+ private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
+
+ public static io.grpc.ServiceDescriptor getServiceDescriptor() {
+ io.grpc.ServiceDescriptor result = serviceDescriptor;
+ if (result == null) {
+ synchronized (HeartbeatServiceGrpc.class) {
+ result = serviceDescriptor;
+ if (result == null) {
+ serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
+ .setSchemaDescriptor(new HeartbeatServiceFileDescriptorSupplier())
+ .addMethod(getHeartbeatMethod())
+ .build();
+ }
+ }
+ }
+ return result;
+ }
+}
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/PublisherServiceGrpc.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/PublisherServiceGrpc.java
new file mode 100644
index 0000000..48dea0c
--- /dev/null
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/PublisherServiceGrpc.java
@@ -0,0 +1,439 @@
+/*
+ * 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 org.apache.eventmesh.common.protocol.grpc.protos;
+
+import static io.grpc.MethodDescriptor.generateFullMethodName;
+import static io.grpc.stub.ClientCalls.asyncUnaryCall;
+import static io.grpc.stub.ClientCalls.blockingUnaryCall;
+import static io.grpc.stub.ClientCalls.futureUnaryCall;
+import static io.grpc.stub.ServerCalls.asyncUnaryCall;
+import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
+
+/**
+ */
+@javax.annotation.Generated(
+ value = "by gRPC proto compiler (version 1.15.0)",
+ comments = "Source: eventmesh-client.proto")
+public final class PublisherServiceGrpc {
+
+ private PublisherServiceGrpc() {}
+
+ public static final String SERVICE_NAME = "eventmesh.common.protocol.grpc.PublisherService";
+
+ // Static method descriptors that strictly reflect the proto.
+ private static volatile io.grpc.MethodDescriptor<EventMeshMessage,
+ Response> getPublishMethod;
+
+ @io.grpc.stub.annotations.RpcMethod(
+ fullMethodName = SERVICE_NAME + '/' + "publish",
+ requestType = EventMeshMessage.class,
+ responseType = Response.class,
+ methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+ public static io.grpc.MethodDescriptor<EventMeshMessage,
+ Response> getPublishMethod() {
+ io.grpc.MethodDescriptor<EventMeshMessage, Response> getPublishMethod;
+ if ((getPublishMethod = PublisherServiceGrpc.getPublishMethod) == null) {
+ synchronized (PublisherServiceGrpc.class) {
+ if ((getPublishMethod = PublisherServiceGrpc.getPublishMethod) == null) {
+ PublisherServiceGrpc.getPublishMethod = getPublishMethod =
+ io.grpc.MethodDescriptor.<EventMeshMessage, Response>newBuilder()
+ .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(generateFullMethodName(
+ "eventmesh.common.protocol.grpc.PublisherService", "publish"))
+ .setSampledToLocalTracing(true)
+ .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ EventMeshMessage.getDefaultInstance()))
+ .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ Response.getDefaultInstance()))
+ .setSchemaDescriptor(new PublisherServiceMethodDescriptorSupplier("publish"))
+ .build();
+ }
+ }
+ }
+ return getPublishMethod;
+ }
+
+ private static volatile io.grpc.MethodDescriptor<EventMeshMessage,
+ Response> getRequestReplyMethod;
+
+ @io.grpc.stub.annotations.RpcMethod(
+ fullMethodName = SERVICE_NAME + '/' + "requestReply",
+ requestType = EventMeshMessage.class,
+ responseType = Response.class,
+ methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+ public static io.grpc.MethodDescriptor<EventMeshMessage,
+ Response> getRequestReplyMethod() {
+ io.grpc.MethodDescriptor<EventMeshMessage, Response> getRequestReplyMethod;
+ if ((getRequestReplyMethod = PublisherServiceGrpc.getRequestReplyMethod) == null) {
+ synchronized (PublisherServiceGrpc.class) {
+ if ((getRequestReplyMethod = PublisherServiceGrpc.getRequestReplyMethod) == null) {
+ PublisherServiceGrpc.getRequestReplyMethod = getRequestReplyMethod =
+ io.grpc.MethodDescriptor.<EventMeshMessage, Response>newBuilder()
+ .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(generateFullMethodName(
+ "eventmesh.common.protocol.grpc.PublisherService", "requestReply"))
+ .setSampledToLocalTracing(true)
+ .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ EventMeshMessage.getDefaultInstance()))
+ .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ Response.getDefaultInstance()))
+ .setSchemaDescriptor(new PublisherServiceMethodDescriptorSupplier("requestReply"))
+ .build();
+ }
+ }
+ }
+ return getRequestReplyMethod;
+ }
+
+ private static volatile io.grpc.MethodDescriptor<BatchMessage,
+ Response> getBatchPublishMethod;
+
+ @io.grpc.stub.annotations.RpcMethod(
+ fullMethodName = SERVICE_NAME + '/' + "batchPublish",
+ requestType = BatchMessage.class,
+ responseType = Response.class,
+ methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+ public static io.grpc.MethodDescriptor<BatchMessage,
+ Response> getBatchPublishMethod() {
+ io.grpc.MethodDescriptor<BatchMessage, Response> getBatchPublishMethod;
+ if ((getBatchPublishMethod = PublisherServiceGrpc.getBatchPublishMethod) == null) {
+ synchronized (PublisherServiceGrpc.class) {
+ if ((getBatchPublishMethod = PublisherServiceGrpc.getBatchPublishMethod) == null) {
+ PublisherServiceGrpc.getBatchPublishMethod = getBatchPublishMethod =
+ io.grpc.MethodDescriptor.<BatchMessage, Response>newBuilder()
+ .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(generateFullMethodName(
+ "eventmesh.common.protocol.grpc.PublisherService", "batchPublish"))
+ .setSampledToLocalTracing(true)
+ .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ BatchMessage.getDefaultInstance()))
+ .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ Response.getDefaultInstance()))
+ .setSchemaDescriptor(new PublisherServiceMethodDescriptorSupplier("batchPublish"))
+ .build();
+ }
+ }
+ }
+ return getBatchPublishMethod;
+ }
+
+ /**
+ * Creates a new async stub that supports all call types for the service
+ */
+ public static PublisherServiceStub newStub(io.grpc.Channel channel) {
+ return new PublisherServiceStub(channel);
+ }
+
+ /**
+ * Creates a new blocking-style stub that supports unary and streaming output calls on the service
+ */
+ public static PublisherServiceBlockingStub newBlockingStub(
+ io.grpc.Channel channel) {
+ return new PublisherServiceBlockingStub(channel);
+ }
+
+ /**
+ * Creates a new ListenableFuture-style stub that supports unary calls on the service
+ */
+ public static PublisherServiceFutureStub newFutureStub(
+ io.grpc.Channel channel) {
+ return new PublisherServiceFutureStub(channel);
+ }
+
+ /**
+ */
+ public static abstract class PublisherServiceImplBase implements io.grpc.BindableService {
+
+ /**
+ */
+ public void publish(EventMeshMessage request,
+ io.grpc.stub.StreamObserver<Response> responseObserver) {
+ asyncUnimplementedUnaryCall(getPublishMethod(), responseObserver);
+ }
+
+ /**
+ */
+ public void requestReply(EventMeshMessage request,
+ io.grpc.stub.StreamObserver<Response> responseObserver) {
+ asyncUnimplementedUnaryCall(getRequestReplyMethod(), responseObserver);
+ }
+
+ /**
+ */
+ public void batchPublish(BatchMessage request,
+ io.grpc.stub.StreamObserver<Response> responseObserver) {
+ asyncUnimplementedUnaryCall(getBatchPublishMethod(), responseObserver);
+ }
+
+ @Override public final io.grpc.ServerServiceDefinition bindService() {
+ return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
+ .addMethod(
+ getPublishMethod(),
+ asyncUnaryCall(
+ new MethodHandlers<
+ EventMeshMessage,
+ Response>(
+ this, METHODID_PUBLISH)))
+ .addMethod(
+ getRequestReplyMethod(),
+ asyncUnaryCall(
+ new MethodHandlers<
+ EventMeshMessage,
+ Response>(
+ this, METHODID_REQUEST_REPLY)))
+ .addMethod(
+ getBatchPublishMethod(),
+ asyncUnaryCall(
+ new MethodHandlers<
+ BatchMessage,
+ Response>(
+ this, METHODID_BATCH_PUBLISH)))
+ .build();
+ }
+ }
+
+ /**
+ */
+ public static final class PublisherServiceStub extends io.grpc.stub.AbstractStub<PublisherServiceStub> {
+ private PublisherServiceStub(io.grpc.Channel channel) {
+ super(channel);
+ }
+
+ private PublisherServiceStub(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ super(channel, callOptions);
+ }
+
+ @Override
+ protected PublisherServiceStub build(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ return new PublisherServiceStub(channel, callOptions);
+ }
+
+ /**
+ */
+ public void publish(EventMeshMessage request,
+ io.grpc.stub.StreamObserver<Response> responseObserver) {
+ asyncUnaryCall(
+ getChannel().newCall(getPublishMethod(), getCallOptions()), request, responseObserver);
+ }
+
+ /**
+ */
+ public void requestReply(EventMeshMessage request,
+ io.grpc.stub.StreamObserver<Response> responseObserver) {
+ asyncUnaryCall(
+ getChannel().newCall(getRequestReplyMethod(), getCallOptions()), request, responseObserver);
+ }
+
+ /**
+ */
+ public void batchPublish(BatchMessage request,
+ io.grpc.stub.StreamObserver<Response> responseObserver) {
+ asyncUnaryCall(
+ getChannel().newCall(getBatchPublishMethod(), getCallOptions()), request, responseObserver);
+ }
+ }
+
+ /**
+ */
+ public static final class PublisherServiceBlockingStub extends io.grpc.stub.AbstractStub<PublisherServiceBlockingStub> {
+ private PublisherServiceBlockingStub(io.grpc.Channel channel) {
+ super(channel);
+ }
+
+ private PublisherServiceBlockingStub(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ super(channel, callOptions);
+ }
+
+ @Override
+ protected PublisherServiceBlockingStub build(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ return new PublisherServiceBlockingStub(channel, callOptions);
+ }
+
+ /**
+ */
+ public Response publish(EventMeshMessage request) {
+ return blockingUnaryCall(
+ getChannel(), getPublishMethod(), getCallOptions(), request);
+ }
+
+ /**
+ */
+ public Response requestReply(EventMeshMessage request) {
+ return blockingUnaryCall(
+ getChannel(), getRequestReplyMethod(), getCallOptions(), request);
+ }
+
+ /**
+ */
+ public Response batchPublish(BatchMessage request) {
+ return blockingUnaryCall(
+ getChannel(), getBatchPublishMethod(), getCallOptions(), request);
+ }
+ }
+
+ /**
+ */
+ public static final class PublisherServiceFutureStub extends io.grpc.stub.AbstractStub<PublisherServiceFutureStub> {
+ private PublisherServiceFutureStub(io.grpc.Channel channel) {
+ super(channel);
+ }
+
+ private PublisherServiceFutureStub(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ super(channel, callOptions);
+ }
+
+ @Override
+ protected PublisherServiceFutureStub build(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ return new PublisherServiceFutureStub(channel, callOptions);
+ }
+
+ /**
+ */
+ public com.google.common.util.concurrent.ListenableFuture<Response> publish(
+ EventMeshMessage request) {
+ return futureUnaryCall(
+ getChannel().newCall(getPublishMethod(), getCallOptions()), request);
+ }
+
+ /**
+ */
+ public com.google.common.util.concurrent.ListenableFuture<Response> requestReply(
+ EventMeshMessage request) {
+ return futureUnaryCall(
+ getChannel().newCall(getRequestReplyMethod(), getCallOptions()), request);
+ }
+
+ /**
+ */
+ public com.google.common.util.concurrent.ListenableFuture<Response> batchPublish(
+ BatchMessage request) {
+ return futureUnaryCall(
+ getChannel().newCall(getBatchPublishMethod(), getCallOptions()), request);
+ }
+ }
+
+ private static final int METHODID_PUBLISH = 0;
+ private static final int METHODID_REQUEST_REPLY = 1;
+ private static final int METHODID_BATCH_PUBLISH = 2;
+
+ private static final class MethodHandlers<Req, Resp> implements
+ io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
+ io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
+ io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
+ io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
+ private final PublisherServiceImplBase serviceImpl;
+ private final int methodId;
+
+ MethodHandlers(PublisherServiceImplBase serviceImpl, int methodId) {
+ this.serviceImpl = serviceImpl;
+ this.methodId = methodId;
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
+ switch (methodId) {
+ case METHODID_PUBLISH:
+ serviceImpl.publish((EventMeshMessage) request,
+ (io.grpc.stub.StreamObserver<Response>) responseObserver);
+ break;
+ case METHODID_REQUEST_REPLY:
+ serviceImpl.requestReply((EventMeshMessage) request,
+ (io.grpc.stub.StreamObserver<Response>) responseObserver);
+ break;
+ case METHODID_BATCH_PUBLISH:
+ serviceImpl.batchPublish((BatchMessage) request,
+ (io.grpc.stub.StreamObserver<Response>) responseObserver);
+ break;
+ default:
+ throw new AssertionError();
+ }
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public io.grpc.stub.StreamObserver<Req> invoke(
+ io.grpc.stub.StreamObserver<Resp> responseObserver) {
+ switch (methodId) {
+ default:
+ throw new AssertionError();
+ }
+ }
+ }
+
+ private static abstract class PublisherServiceBaseDescriptorSupplier
+ implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
+ PublisherServiceBaseDescriptorSupplier() {}
+
+ @Override
+ public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
+ return EventmeshGrpc.getDescriptor();
+ }
+
+ @Override
+ public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
+ return getFileDescriptor().findServiceByName("PublisherService");
+ }
+ }
+
+ private static final class PublisherServiceFileDescriptorSupplier
+ extends PublisherServiceBaseDescriptorSupplier {
+ PublisherServiceFileDescriptorSupplier() {}
+ }
+
+ private static final class PublisherServiceMethodDescriptorSupplier
+ extends PublisherServiceBaseDescriptorSupplier
+ implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
+ private final String methodName;
+
+ PublisherServiceMethodDescriptorSupplier(String methodName) {
+ this.methodName = methodName;
+ }
+
+ @Override
+ public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
+ return getServiceDescriptor().findMethodByName(methodName);
+ }
+ }
+
+ private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
+
+ public static io.grpc.ServiceDescriptor getServiceDescriptor() {
+ io.grpc.ServiceDescriptor result = serviceDescriptor;
+ if (result == null) {
+ synchronized (PublisherServiceGrpc.class) {
+ result = serviceDescriptor;
+ if (result == null) {
+ serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
+ .setSchemaDescriptor(new PublisherServiceFileDescriptorSupplier())
+ .addMethod(getPublishMethod())
+ .addMethod(getRequestReplyMethod())
+ .addMethod(getBatchPublishMethod())
+ .build();
+ }
+ }
+ }
+ return result;
+ }
+}
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/RequestHeader.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/RequestHeader.java
new file mode 100644
index 0000000..4fe0c49
--- /dev/null
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/RequestHeader.java
@@ -0,0 +1,1930 @@
+/*
+ * 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.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: eventmesh-client.proto
+
+package org.apache.eventmesh.common.protocol.grpc.protos;
+
+/**
+ * Protobuf type {@code eventmesh.common.protocol.grpc.RequestHeader}
+ */
+public final class RequestHeader extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:eventmesh.common.protocol.grpc.RequestHeader)
+ RequestHeaderOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use RequestHeader.newBuilder() to construct.
+ private RequestHeader(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
+ super(builder);
+ }
+ private RequestHeader() {
+ env_ = "";
+ region_ = "";
+ idc_ = "";
+ ip_ = "";
+ pid_ = "";
+ sys_ = "";
+ username_ = "";
+ password_ = "";
+ language_ = "";
+ protocolType_ = "";
+ protocolVersion_ = "";
+ protocolDesc_ = "";
+ }
+
+ @Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private RequestHeader(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ 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;
+ default: {
+ if (!parseUnknownFieldProto3(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ String s = input.readStringRequireUtf8();
+
+ env_ = s;
+ break;
+ }
+ case 18: {
+ String s = input.readStringRequireUtf8();
+
+ region_ = s;
+ break;
+ }
+ case 26: {
+ String s = input.readStringRequireUtf8();
+
+ idc_ = s;
+ break;
+ }
+ case 34: {
+ String s = input.readStringRequireUtf8();
+
+ ip_ = s;
+ break;
+ }
+ case 42: {
+ String s = input.readStringRequireUtf8();
+
+ pid_ = s;
+ break;
+ }
+ case 50: {
+ String s = input.readStringRequireUtf8();
+
+ sys_ = s;
+ break;
+ }
+ case 58: {
+ String s = input.readStringRequireUtf8();
+
+ username_ = s;
+ break;
+ }
+ case 66: {
+ String s = input.readStringRequireUtf8();
+
+ password_ = s;
+ break;
+ }
+ case 74: {
+ String s = input.readStringRequireUtf8();
+
+ language_ = s;
+ break;
+ }
+ case 82: {
+ String s = input.readStringRequireUtf8();
+
+ protocolType_ = s;
+ break;
+ }
+ case 90: {
+ String s = input.readStringRequireUtf8();
+
+ protocolVersion_ = s;
+ break;
+ }
+ case 98: {
+ String s = input.readStringRequireUtf8();
+
+ protocolDesc_ = s;
+ 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 EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_RequestHeader_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_RequestHeader_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ RequestHeader.class, Builder.class);
+ }
+
+ public static final int ENV_FIELD_NUMBER = 1;
+ private volatile Object env_;
+ /**
+ * <code>string env = 1;</code>
+ */
+ public String getEnv() {
+ Object ref = env_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ env_ = s;
+ return s;
+ }
+ }
+ /**
+ * <code>string env = 1;</code>
+ */
+ public com.google.protobuf.ByteString
+ getEnvBytes() {
+ Object ref = env_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ env_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int REGION_FIELD_NUMBER = 2;
+ private volatile Object region_;
+ /**
+ * <code>string region = 2;</code>
+ */
+ public String getRegion() {
+ Object ref = region_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ region_ = s;
+ return s;
+ }
+ }
+ /**
+ * <code>string region = 2;</code>
+ */
+ public com.google.protobuf.ByteString
+ getRegionBytes() {
+ Object ref = region_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ region_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int IDC_FIELD_NUMBER = 3;
+ private volatile Object idc_;
+ /**
+ * <code>string idc = 3;</code>
+ */
+ public String getIdc() {
+ Object ref = idc_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ idc_ = s;
+ return s;
+ }
+ }
+ /**
+ * <code>string idc = 3;</code>
+ */
+ public com.google.protobuf.ByteString
+ getIdcBytes() {
+ Object ref = idc_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ idc_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int IP_FIELD_NUMBER = 4;
+ private volatile Object ip_;
+ /**
+ * <code>string ip = 4;</code>
+ */
+ public String getIp() {
+ Object ref = ip_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ ip_ = s;
+ return s;
+ }
+ }
+ /**
+ * <code>string ip = 4;</code>
+ */
+ public com.google.protobuf.ByteString
+ getIpBytes() {
+ Object ref = ip_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ ip_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PID_FIELD_NUMBER = 5;
+ private volatile Object pid_;
+ /**
+ * <code>string pid = 5;</code>
+ */
+ public String getPid() {
+ Object ref = pid_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ pid_ = s;
+ return s;
+ }
+ }
+ /**
+ * <code>string pid = 5;</code>
+ */
+ public com.google.protobuf.ByteString
+ getPidBytes() {
+ Object ref = pid_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ pid_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SYS_FIELD_NUMBER = 6;
+ private volatile Object sys_;
+ /**
+ * <code>string sys = 6;</code>
+ */
+ public String getSys() {
+ Object ref = sys_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ sys_ = s;
+ return s;
+ }
+ }
+ /**
+ * <code>string sys = 6;</code>
+ */
+ public com.google.protobuf.ByteString
+ getSysBytes() {
+ Object ref = sys_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ sys_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int USERNAME_FIELD_NUMBER = 7;
+ private volatile Object username_;
+ /**
+ * <code>string username = 7;</code>
+ */
+ public String getUsername() {
+ Object ref = username_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ username_ = s;
+ return s;
+ }
+ }
+ /**
+ * <code>string username = 7;</code>
+ */
+ public com.google.protobuf.ByteString
+ getUsernameBytes() {
+ Object ref = username_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ username_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PASSWORD_FIELD_NUMBER = 8;
+ private volatile Object password_;
+ /**
+ * <code>string password = 8;</code>
+ */
+ public String getPassword() {
+ Object ref = password_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ password_ = s;
+ return s;
+ }
+ }
+ /**
+ * <code>string password = 8;</code>
+ */
+ public com.google.protobuf.ByteString
+ getPasswordBytes() {
+ Object ref = password_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ password_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int LANGUAGE_FIELD_NUMBER = 9;
+ private volatile Object language_;
+ /**
+ * <code>string language = 9;</code>
+ */
+ public String getLanguage() {
+ Object ref = language_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ language_ = s;
+ return s;
+ }
+ }
+ /**
+ * <code>string language = 9;</code>
+ */
+ public com.google.protobuf.ByteString
+ getLanguageBytes() {
+ Object ref = language_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ language_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PROTOCOLTYPE_FIELD_NUMBER = 10;
+ private volatile Object protocolType_;
+ /**
+ * <code>string protocolType = 10;</code>
+ */
+ public String getProtocolType() {
+ Object ref = protocolType_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ protocolType_ = s;
+ return s;
+ }
+ }
+ /**
+ * <code>string protocolType = 10;</code>
+ */
+ public com.google.protobuf.ByteString
+ getProtocolTypeBytes() {
+ Object ref = protocolType_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ protocolType_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PROTOCOLVERSION_FIELD_NUMBER = 11;
+ private volatile Object protocolVersion_;
+ /**
+ * <code>string protocolVersion = 11;</code>
+ */
+ public String getProtocolVersion() {
+ Object ref = protocolVersion_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ protocolVersion_ = s;
+ return s;
+ }
+ }
+ /**
+ * <code>string protocolVersion = 11;</code>
+ */
+ public com.google.protobuf.ByteString
+ getProtocolVersionBytes() {
+ Object ref = protocolVersion_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ protocolVersion_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PROTOCOLDESC_FIELD_NUMBER = 12;
+ private volatile Object protocolDesc_;
+ /**
+ * <code>string protocolDesc = 12;</code>
+ */
+ public String getProtocolDesc() {
+ Object ref = protocolDesc_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ protocolDesc_ = s;
+ return s;
+ }
+ }
+ /**
+ * <code>string protocolDesc = 12;</code>
+ */
+ public com.google.protobuf.ByteString
+ getProtocolDescBytes() {
+ Object ref = protocolDesc_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ protocolDesc_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (!getEnvBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, env_);
+ }
+ if (!getRegionBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, region_);
+ }
+ if (!getIdcBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, idc_);
+ }
+ if (!getIpBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, ip_);
+ }
+ if (!getPidBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 5, pid_);
+ }
+ if (!getSysBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 6, sys_);
+ }
+ if (!getUsernameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 7, username_);
+ }
+ if (!getPasswordBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 8, password_);
+ }
+ if (!getLanguageBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 9, language_);
+ }
+ if (!getProtocolTypeBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 10, protocolType_);
+ }
+ if (!getProtocolVersionBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 11, protocolVersion_);
+ }
+ if (!getProtocolDescBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 12, protocolDesc_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getEnvBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, env_);
+ }
+ if (!getRegionBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, region_);
+ }
+ if (!getIdcBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, idc_);
+ }
+ if (!getIpBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, ip_);
+ }
+ if (!getPidBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, pid_);
+ }
+ if (!getSysBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, sys_);
+ }
+ if (!getUsernameBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, username_);
+ }
+ if (!getPasswordBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, password_);
+ }
+ if (!getLanguageBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, language_);
+ }
+ if (!getProtocolTypeBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, protocolType_);
+ }
+ if (!getProtocolVersionBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, protocolVersion_);
+ }
+ if (!getProtocolDescBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, protocolDesc_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof RequestHeader)) {
+ return super.equals(obj);
+ }
+ RequestHeader other = (RequestHeader) obj;
+
+ boolean result = true;
+ result = result && getEnv()
+ .equals(other.getEnv());
+ result = result && getRegion()
+ .equals(other.getRegion());
+ result = result && getIdc()
+ .equals(other.getIdc());
+ result = result && getIp()
+ .equals(other.getIp());
+ result = result && getPid()
+ .equals(other.getPid());
+ result = result && getSys()
+ .equals(other.getSys());
+ result = result && getUsername()
+ .equals(other.getUsername());
+ result = result && getPassword()
+ .equals(other.getPassword());
+ result = result && getLanguage()
+ .equals(other.getLanguage());
+ result = result && getProtocolType()
+ .equals(other.getProtocolType());
+ result = result && getProtocolVersion()
+ .equals(other.getProtocolVersion());
+ result = result && getProtocolDesc()
+ .equals(other.getProtocolDesc());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + ENV_FIELD_NUMBER;
+ hash = (53 * hash) + getEnv().hashCode();
+ hash = (37 * hash) + REGION_FIELD_NUMBER;
+ hash = (53 * hash) + getRegion().hashCode();
+ hash = (37 * hash) + IDC_FIELD_NUMBER;
+ hash = (53 * hash) + getIdc().hashCode();
+ hash = (37 * hash) + IP_FIELD_NUMBER;
+ hash = (53 * hash) + getIp().hashCode();
+ hash = (37 * hash) + PID_FIELD_NUMBER;
+ hash = (53 * hash) + getPid().hashCode();
+ hash = (37 * hash) + SYS_FIELD_NUMBER;
+ hash = (53 * hash) + getSys().hashCode();
+ hash = (37 * hash) + USERNAME_FIELD_NUMBER;
+ hash = (53 * hash) + getUsername().hashCode();
+ hash = (37 * hash) + PASSWORD_FIELD_NUMBER;
+ hash = (53 * hash) + getPassword().hashCode();
+ hash = (37 * hash) + LANGUAGE_FIELD_NUMBER;
+ hash = (53 * hash) + getLanguage().hashCode();
+ hash = (37 * hash) + PROTOCOLTYPE_FIELD_NUMBER;
+ hash = (53 * hash) + getProtocolType().hashCode();
+ hash = (37 * hash) + PROTOCOLVERSION_FIELD_NUMBER;
+ hash = (53 * hash) + getProtocolVersion().hashCode();
+ hash = (37 * hash) + PROTOCOLDESC_FIELD_NUMBER;
+ hash = (53 * hash) + getProtocolDesc().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static RequestHeader parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static RequestHeader parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static RequestHeader parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static RequestHeader parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static RequestHeader parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static RequestHeader parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static RequestHeader parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static RequestHeader 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 RequestHeader parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static RequestHeader 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 RequestHeader parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static RequestHeader parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(RequestHeader prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(
+ BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code eventmesh.common.protocol.grpc.RequestHeader}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
+ // @@protoc_insertion_point(builder_implements:eventmesh.common.protocol.grpc.RequestHeader)
+ RequestHeaderOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_RequestHeader_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_RequestHeader_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ RequestHeader.class, Builder.class);
+ }
+
+ // Construct using org.apache.eventmesh.common.protocol.grpc.protos.RequestHeader.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
+ }
+ }
+ public Builder clear() {
+ super.clear();
+ env_ = "";
+
+ region_ = "";
+
+ idc_ = "";
+
+ ip_ = "";
+
+ pid_ = "";
+
+ sys_ = "";
+
+ username_ = "";
+
+ password_ = "";
+
+ language_ = "";
+
+ protocolType_ = "";
+
+ protocolVersion_ = "";
+
+ protocolDesc_ = "";
+
+ return this;
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_RequestHeader_descriptor;
+ }
+
+ public RequestHeader getDefaultInstanceForType() {
+ return RequestHeader.getDefaultInstance();
+ }
+
+ public RequestHeader build() {
+ RequestHeader result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public RequestHeader buildPartial() {
+ RequestHeader result = new RequestHeader(this);
+ result.env_ = env_;
+ result.region_ = region_;
+ result.idc_ = idc_;
+ result.ip_ = ip_;
+ result.pid_ = pid_;
+ result.sys_ = sys_;
+ result.username_ = username_;
+ result.password_ = password_;
+ result.language_ = language_;
+ result.protocolType_ = protocolType_;
+ result.protocolVersion_ = protocolVersion_;
+ result.protocolDesc_ = protocolDesc_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder clone() {
+ return (Builder) super.clone();
+ }
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ Object value) {
+ return (Builder) super.setField(field, value);
+ }
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return (Builder) super.clearField(field);
+ }
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return (Builder) super.clearOneof(oneof);
+ }
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, Object value) {
+ return (Builder) super.setRepeatedField(field, index, value);
+ }
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ Object value) {
+ return (Builder) super.addRepeatedField(field, value);
+ }
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof RequestHeader) {
+ return mergeFrom((RequestHeader)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(RequestHeader other) {
+ if (other == RequestHeader.getDefaultInstance()) return this;
+ if (!other.getEnv().isEmpty()) {
+ env_ = other.env_;
+ onChanged();
+ }
+ if (!other.getRegion().isEmpty()) {
+ region_ = other.region_;
+ onChanged();
+ }
+ if (!other.getIdc().isEmpty()) {
+ idc_ = other.idc_;
+ onChanged();
+ }
+ if (!other.getIp().isEmpty()) {
+ ip_ = other.ip_;
+ onChanged();
+ }
+ if (!other.getPid().isEmpty()) {
+ pid_ = other.pid_;
+ onChanged();
+ }
+ if (!other.getSys().isEmpty()) {
+ sys_ = other.sys_;
+ onChanged();
+ }
+ if (!other.getUsername().isEmpty()) {
+ username_ = other.username_;
+ onChanged();
+ }
+ if (!other.getPassword().isEmpty()) {
+ password_ = other.password_;
+ onChanged();
+ }
+ if (!other.getLanguage().isEmpty()) {
+ language_ = other.language_;
+ onChanged();
+ }
+ if (!other.getProtocolType().isEmpty()) {
+ protocolType_ = other.protocolType_;
+ onChanged();
+ }
+ if (!other.getProtocolVersion().isEmpty()) {
+ protocolVersion_ = other.protocolVersion_;
+ onChanged();
+ }
+ if (!other.getProtocolDesc().isEmpty()) {
+ protocolDesc_ = other.protocolDesc_;
+ onChanged();
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ RequestHeader parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (RequestHeader) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ private Object env_ = "";
+ /**
+ * <code>string env = 1;</code>
+ */
+ public String getEnv() {
+ Object ref = env_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ env_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+ /**
+ * <code>string env = 1;</code>
+ */
+ public com.google.protobuf.ByteString
+ getEnvBytes() {
+ Object ref = env_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ env_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>string env = 1;</code>
+ */
+ public Builder setEnv(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ env_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string env = 1;</code>
+ */
+ public Builder clearEnv() {
+
+ env_ = getDefaultInstance().getEnv();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string env = 1;</code>
+ */
+ public Builder setEnvBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ env_ = value;
+ onChanged();
+ return this;
+ }
+
+ private Object region_ = "";
+ /**
+ * <code>string region = 2;</code>
+ */
+ public String getRegion() {
+ Object ref = region_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ region_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+ /**
+ * <code>string region = 2;</code>
+ */
+ public com.google.protobuf.ByteString
+ getRegionBytes() {
+ Object ref = region_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ region_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>string region = 2;</code>
+ */
+ public Builder setRegion(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
... 10656 lines suppressed ...
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: commits-help@eventmesh.apache.org