string stringRequest = 1;
+ * @return The stringRequest.
+ */
+ java.lang.String getStringRequest();
+ /**
+ * string stringRequest = 1;
+ * @return The bytes for stringRequest.
+ */
+ com.google.protobuf.ByteString
+ getStringRequestBytes();
+ }
+ /**
+ * Protobuf type {@code com.example.grpc.ClientRequest}
+ */
+ public static final class ClientRequest extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:com.example.grpc.ClientRequest)
+ ClientRequestOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use ClientRequest.newBuilder() to construct.
+ private ClientRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private ClientRequest() {
+ stringRequest_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new ClientRequest();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private ClientRequest(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ stringRequest_ = s;
+ break;
+ }
+ default: {
+ if (!parseUnknownField(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.example.grpc.BidirectionalServiceOuterClass.internal_static_com_example_grpc_ClientRequest_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.example.grpc.BidirectionalServiceOuterClass.internal_static_com_example_grpc_ClientRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.example.grpc.BidirectionalServiceOuterClass.ClientRequest.class, com.example.grpc.BidirectionalServiceOuterClass.ClientRequest.Builder.class);
+ }
+
+ public static final int STRINGREQUEST_FIELD_NUMBER = 1;
+ private volatile java.lang.Object stringRequest_;
+ /**
+ * string stringRequest = 1;
+ * @return The stringRequest.
+ */
+ public java.lang.String getStringRequest() {
+ java.lang.Object ref = stringRequest_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ stringRequest_ = s;
+ return s;
+ }
+ }
+ /**
+ * string stringRequest = 1;
+ * @return The bytes for stringRequest.
+ */
+ public com.google.protobuf.ByteString
+ getStringRequestBytes() {
+ java.lang.Object ref = stringRequest_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ stringRequest_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (!getStringRequestBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, stringRequest_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getStringRequestBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, stringRequest_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.example.grpc.BidirectionalServiceOuterClass.ClientRequest)) {
+ return super.equals(obj);
+ }
+ com.example.grpc.BidirectionalServiceOuterClass.ClientRequest other = (com.example.grpc.BidirectionalServiceOuterClass.ClientRequest) obj;
+
+ if (!getStringRequest()
+ .equals(other.getStringRequest())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + STRINGREQUEST_FIELD_NUMBER;
+ hash = (53 * hash) + getStringRequest().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.example.grpc.BidirectionalServiceOuterClass.ClientRequest parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.example.grpc.BidirectionalServiceOuterClass.ClientRequest parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.example.grpc.BidirectionalServiceOuterClass.ClientRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.example.grpc.BidirectionalServiceOuterClass.ClientRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.example.grpc.BidirectionalServiceOuterClass.ClientRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.example.grpc.BidirectionalServiceOuterClass.ClientRequest parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.example.grpc.BidirectionalServiceOuterClass.ClientRequest parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.example.grpc.BidirectionalServiceOuterClass.ClientRequest 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 com.example.grpc.BidirectionalServiceOuterClass.ClientRequest parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.example.grpc.BidirectionalServiceOuterClass.ClientRequest 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 com.example.grpc.BidirectionalServiceOuterClass.ClientRequest parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.example.grpc.BidirectionalServiceOuterClass.ClientRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.example.grpc.BidirectionalServiceOuterClass.ClientRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code com.example.grpc.ClientRequest}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builderstring stringRequest = 1;
+ * @return The stringRequest.
+ */
+ public java.lang.String getStringRequest() {
+ java.lang.Object ref = stringRequest_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ stringRequest_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string stringRequest = 1;
+ * @return The bytes for stringRequest.
+ */
+ public com.google.protobuf.ByteString
+ getStringRequestBytes() {
+ java.lang.Object ref = stringRequest_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ stringRequest_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string stringRequest = 1;
+ * @param value The stringRequest to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStringRequest(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ stringRequest_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string stringRequest = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearStringRequest() {
+
+ stringRequest_ = getDefaultInstance().getStringRequest();
+ onChanged();
+ return this;
+ }
+ /**
+ * string stringRequest = 1;
+ * @param value The bytes for stringRequest to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStringRequestBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ stringRequest_ = value;
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:com.example.grpc.ClientRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:com.example.grpc.ClientRequest)
+ private static final com.example.grpc.BidirectionalServiceOuterClass.ClientRequest DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.example.grpc.BidirectionalServiceOuterClass.ClientRequest();
+ }
+
+ public static com.example.grpc.BidirectionalServiceOuterClass.ClientRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parserstring stringResponse = 1;
+ * @return The stringResponse.
+ */
+ java.lang.String getStringResponse();
+ /**
+ * string stringResponse = 1;
+ * @return The bytes for stringResponse.
+ */
+ com.google.protobuf.ByteString
+ getStringResponseBytes();
+ }
+ /**
+ * Protobuf type {@code com.example.grpc.ServerResponse}
+ */
+ public static final class ServerResponse extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:com.example.grpc.ServerResponse)
+ ServerResponseOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use ServerResponse.newBuilder() to construct.
+ private ServerResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private ServerResponse() {
+ stringResponse_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new ServerResponse();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private ServerResponse(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ stringResponse_ = s;
+ break;
+ }
+ default: {
+ if (!parseUnknownField(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.example.grpc.BidirectionalServiceOuterClass.internal_static_com_example_grpc_ServerResponse_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.example.grpc.BidirectionalServiceOuterClass.internal_static_com_example_grpc_ServerResponse_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.example.grpc.BidirectionalServiceOuterClass.ServerResponse.class, com.example.grpc.BidirectionalServiceOuterClass.ServerResponse.Builder.class);
+ }
+
+ public static final int STRINGRESPONSE_FIELD_NUMBER = 1;
+ private volatile java.lang.Object stringResponse_;
+ /**
+ * string stringResponse = 1;
+ * @return The stringResponse.
+ */
+ public java.lang.String getStringResponse() {
+ java.lang.Object ref = stringResponse_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ stringResponse_ = s;
+ return s;
+ }
+ }
+ /**
+ * string stringResponse = 1;
+ * @return The bytes for stringResponse.
+ */
+ public com.google.protobuf.ByteString
+ getStringResponseBytes() {
+ java.lang.Object ref = stringResponse_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ stringResponse_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (!getStringResponseBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, stringResponse_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getStringResponseBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, stringResponse_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.example.grpc.BidirectionalServiceOuterClass.ServerResponse)) {
+ return super.equals(obj);
+ }
+ com.example.grpc.BidirectionalServiceOuterClass.ServerResponse other = (com.example.grpc.BidirectionalServiceOuterClass.ServerResponse) obj;
+
+ if (!getStringResponse()
+ .equals(other.getStringResponse())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + STRINGRESPONSE_FIELD_NUMBER;
+ hash = (53 * hash) + getStringResponse().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.example.grpc.BidirectionalServiceOuterClass.ServerResponse parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.example.grpc.BidirectionalServiceOuterClass.ServerResponse parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.example.grpc.BidirectionalServiceOuterClass.ServerResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.example.grpc.BidirectionalServiceOuterClass.ServerResponse parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.example.grpc.BidirectionalServiceOuterClass.ServerResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.example.grpc.BidirectionalServiceOuterClass.ServerResponse parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.example.grpc.BidirectionalServiceOuterClass.ServerResponse parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.example.grpc.BidirectionalServiceOuterClass.ServerResponse 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 com.example.grpc.BidirectionalServiceOuterClass.ServerResponse parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.example.grpc.BidirectionalServiceOuterClass.ServerResponse 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 com.example.grpc.BidirectionalServiceOuterClass.ServerResponse parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.example.grpc.BidirectionalServiceOuterClass.ServerResponse parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.example.grpc.BidirectionalServiceOuterClass.ServerResponse prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code com.example.grpc.ServerResponse}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builderstring stringResponse = 1;
+ * @return The stringResponse.
+ */
+ public java.lang.String getStringResponse() {
+ java.lang.Object ref = stringResponse_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ stringResponse_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string stringResponse = 1;
+ * @return The bytes for stringResponse.
+ */
+ public com.google.protobuf.ByteString
+ getStringResponseBytes() {
+ java.lang.Object ref = stringResponse_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ stringResponse_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string stringResponse = 1;
+ * @param value The stringResponse to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStringResponse(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ stringResponse_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string stringResponse = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearStringResponse() {
+
+ stringResponse_ = getDefaultInstance().getStringResponse();
+ onChanged();
+ return this;
+ }
+ /**
+ * string stringResponse = 1;
+ * @param value The bytes for stringResponse to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStringResponseBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ stringResponse_ = value;
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:com.example.grpc.ServerResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:com.example.grpc.ServerResponse)
+ private static final com.example.grpc.BidirectionalServiceOuterClass.ServerResponse DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.example.grpc.BidirectionalServiceOuterClass.ServerResponse();
+ }
+
+ public static com.example.grpc.BidirectionalServiceOuterClass.ServerResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser- * Each message attribute is strongly typed. - * You also must assign a "tag" number. - * Each tag number is unique within the message. - *- * *
string name = 1;
* @return The name.
*/
java.lang.String getName();
/**
- * - * Each message attribute is strongly typed. - * You also must assign a "tag" number. - * Each tag number is unique within the message. - *- * *
string name = 1;
* @return The bytes for name.
*/
@@ -43,39 +31,23 @@ public final class GreetingServiceOuterClass {
getNameBytes();
/**
- * - * This defines a strongly typed list of String - *- * *
repeated string hobbies = 2;
* @return A list containing the hobbies.
*/
java.util.List- * This defines a strongly typed list of String - *- * *
repeated string hobbies = 2;
* @return The count of hobbies.
*/
int getHobbiesCount();
/**
- * - * This defines a strongly typed list of String - *- * *
repeated string hobbies = 2;
* @param index The index of the element to return.
* @return The hobbies at the given index.
*/
java.lang.String getHobbies(int index);
/**
- * - * This defines a strongly typed list of String - *- * *
repeated string hobbies = 2;
* @param index The index of the value to return.
* @return The bytes of the hobbies at the given index.
@@ -188,12 +160,6 @@ public final class GreetingServiceOuterClass {
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
- * - * Each message attribute is strongly typed. - * You also must assign a "tag" number. - * Each tag number is unique within the message. - *- * *
string name = 1;
* @return The name.
*/
@@ -210,12 +176,6 @@ public final class GreetingServiceOuterClass {
}
}
/**
- * - * Each message attribute is strongly typed. - * You also must assign a "tag" number. - * Each tag number is unique within the message. - *- * *
string name = 1;
* @return The bytes for name.
*/
@@ -236,10 +196,6 @@ public final class GreetingServiceOuterClass {
public static final int HOBBIES_FIELD_NUMBER = 2;
private com.google.protobuf.LazyStringList hobbies_;
/**
- * - * This defines a strongly typed list of String - *- * *
repeated string hobbies = 2;
* @return A list containing the hobbies.
*/
@@ -248,10 +204,6 @@ public final class GreetingServiceOuterClass {
return hobbies_;
}
/**
- * - * This defines a strongly typed list of String - *- * *
repeated string hobbies = 2;
* @return The count of hobbies.
*/
@@ -259,10 +211,6 @@ public final class GreetingServiceOuterClass {
return hobbies_.size();
}
/**
- * - * This defines a strongly typed list of String - *- * *
repeated string hobbies = 2;
* @param index The index of the element to return.
* @return The hobbies at the given index.
@@ -271,10 +219,6 @@ public final class GreetingServiceOuterClass {
return hobbies_.get(index);
}
/**
- * - * This defines a strongly typed list of String - *- * *
repeated string hobbies = 2;
* @param index The index of the value to return.
* @return The bytes of the hobbies at the given index.
@@ -628,12 +572,6 @@ public final class GreetingServiceOuterClass {
private java.lang.Object name_ = "";
/**
- * - * Each message attribute is strongly typed. - * You also must assign a "tag" number. - * Each tag number is unique within the message. - *- * *
string name = 1;
* @return The name.
*/
@@ -650,12 +588,6 @@ public final class GreetingServiceOuterClass {
}
}
/**
- * - * Each message attribute is strongly typed. - * You also must assign a "tag" number. - * Each tag number is unique within the message. - *- * *
string name = 1;
* @return The bytes for name.
*/
@@ -673,12 +605,6 @@ public final class GreetingServiceOuterClass {
}
}
/**
- * - * Each message attribute is strongly typed. - * You also must assign a "tag" number. - * Each tag number is unique within the message. - *- * *
string name = 1;
* @param value The name to set.
* @return This builder for chaining.
@@ -694,12 +620,6 @@ public final class GreetingServiceOuterClass {
return this;
}
/**
- * - * Each message attribute is strongly typed. - * You also must assign a "tag" number. - * Each tag number is unique within the message. - *- * *
string name = 1;
* @return This builder for chaining.
*/
@@ -710,12 +630,6 @@ public final class GreetingServiceOuterClass {
return this;
}
/**
- * - * Each message attribute is strongly typed. - * You also must assign a "tag" number. - * Each tag number is unique within the message. - *- * *
string name = 1;
* @param value The bytes for name to set.
* @return This builder for chaining.
@@ -740,10 +654,6 @@ public final class GreetingServiceOuterClass {
}
}
/**
- * - * This defines a strongly typed list of String - *- * *
repeated string hobbies = 2;
* @return A list containing the hobbies.
*/
@@ -752,10 +662,6 @@ public final class GreetingServiceOuterClass {
return hobbies_.getUnmodifiableView();
}
/**
- * - * This defines a strongly typed list of String - *- * *
repeated string hobbies = 2;
* @return The count of hobbies.
*/
@@ -763,10 +669,6 @@ public final class GreetingServiceOuterClass {
return hobbies_.size();
}
/**
- * - * This defines a strongly typed list of String - *- * *
repeated string hobbies = 2;
* @param index The index of the element to return.
* @return The hobbies at the given index.
@@ -775,10 +677,6 @@ public final class GreetingServiceOuterClass {
return hobbies_.get(index);
}
/**
- * - * This defines a strongly typed list of String - *- * *
repeated string hobbies = 2;
* @param index The index of the value to return.
* @return The bytes of the hobbies at the given index.
@@ -788,10 +686,6 @@ public final class GreetingServiceOuterClass {
return hobbies_.getByteString(index);
}
/**
- * - * This defines a strongly typed list of String - *- * *
repeated string hobbies = 2;
* @param index The index to set the value at.
* @param value The hobbies to set.
@@ -808,10 +702,6 @@ public final class GreetingServiceOuterClass {
return this;
}
/**
- * - * This defines a strongly typed list of String - *- * *
repeated string hobbies = 2;
* @param value The hobbies to add.
* @return This builder for chaining.
@@ -827,10 +717,6 @@ public final class GreetingServiceOuterClass {
return this;
}
/**
- * - * This defines a strongly typed list of String - *- * *
repeated string hobbies = 2;
* @param values The hobbies to add.
* @return This builder for chaining.
@@ -844,10 +730,6 @@ public final class GreetingServiceOuterClass {
return this;
}
/**
- * - * This defines a strongly typed list of String - *- * *
repeated string hobbies = 2;
* @return This builder for chaining.
*/
@@ -858,10 +740,6 @@ public final class GreetingServiceOuterClass {
return this;
}
/**
- * - * This defines a strongly typed list of String - *- * *
repeated string hobbies = 2;
* @param value The bytes of the hobbies to add.
* @return This builder for chaining.
diff --git a/build/resources/main/BidirectionalService.proto b/build/resources/main/BidirectionalService.proto
new file mode 100644
index 0000000000000000000000000000000000000000..e7910e309ce06d42e2019c28e92a464fd75efbbb
--- /dev/null
+++ b/build/resources/main/BidirectionalService.proto
@@ -0,0 +1,14 @@
+syntax = "proto3";
+package com.example.grpc;
+
+message ClientRequest {
+ string stringRequest = 1;
+}
+
+message ServerResponse {
+ string stringResponse = 1;
+}
+
+service BidirectionalService {
+ rpc bidirectional(stream ClientRequest) returns (stream ServerResponse);
+}
diff --git a/build/resources/main/GreetingService.proto b/build/resources/main/GreetingService.proto
index 90a39b1a624c5f2dceafb13af0406c3938ed1454..28d05e7f6556e9ec89f1adb745baa7c3c427a38c 100644
--- a/build/resources/main/GreetingService.proto
+++ b/build/resources/main/GreetingService.proto
@@ -3,17 +3,8 @@ package com.example.grpc;
// Request payload
message HelloRequest {
- // Each message attribute is strongly typed.
- // You also must assign a "tag" number.
- // Each tag number is unique within the message.
string name = 1;
-
- // This defines a strongly typed list of String
repeated string hobbies = 2;
-
- // There are many more basics types, like Enum, Map
- // See https://developers.google.com/protocol-buffers/docs/proto3
- // for more information.
}
message HelloResponse {
diff --git a/build/tmp/compileJava/source-classes-mapping.txt b/build/tmp/compileJava/source-classes-mapping.txt
index 4d2c24ca8ba0596c72385ea051af71e06c4cb5c2..c32d68a75d76ba4d8fe067a61e901077f4752db8 100644
--- a/build/tmp/compileJava/source-classes-mapping.txt
+++ b/build/tmp/compileJava/source-classes-mapping.txt
@@ -10,6 +10,9 @@ com/example/chat/ChatServiceOuterClass.java
chat/ChatClient.java
chat.ChatClient
chat.ChatClient$1
+bidirectional/BidirectionalServiceImpl.java
+ bidirectional.BidirectionalServiceImpl
+ bidirectional.BidirectionalServiceImpl$1
chat/ChatServiceImpl.java
chat.ChatServiceImpl
chat.ChatServiceImpl$1
@@ -26,6 +29,17 @@ com/example/grpc/GreetingServiceGrpc.java
com.example.grpc.GreetingServiceGrpc$GreetingServiceMethodDescriptorSupplier
com.example.grpc.GreetingServiceGrpc$GreetingServiceStub
com.example.grpc.GreetingServiceGrpc$MethodHandlers
+com/example/grpc/BidirectionalServiceGrpc.java
+ com.example.grpc.BidirectionalServiceGrpc
+ com.example.grpc.BidirectionalServiceGrpc$1
+ com.example.grpc.BidirectionalServiceGrpc$BidirectionalServiceBaseDescriptorSupplier
+ com.example.grpc.BidirectionalServiceGrpc$BidirectionalServiceBlockingStub
+ com.example.grpc.BidirectionalServiceGrpc$BidirectionalServiceFileDescriptorSupplier
+ com.example.grpc.BidirectionalServiceGrpc$BidirectionalServiceFutureStub
+ com.example.grpc.BidirectionalServiceGrpc$BidirectionalServiceImplBase
+ com.example.grpc.BidirectionalServiceGrpc$BidirectionalServiceMethodDescriptorSupplier
+ com.example.grpc.BidirectionalServiceGrpc$BidirectionalServiceStub
+ com.example.grpc.BidirectionalServiceGrpc$MethodHandlers
com/example/grpc/GreetingServiceOuterClass.java
com.example.grpc.GreetingServiceOuterClass
com.example.grpc.GreetingServiceOuterClass$1
@@ -37,6 +51,8 @@ com/example/grpc/GreetingServiceOuterClass.java
com.example.grpc.GreetingServiceOuterClass$HelloResponse$1
com.example.grpc.GreetingServiceOuterClass$HelloResponse$Builder
com.example.grpc.GreetingServiceOuterClass$HelloResponseOrBuilder
+bidirectional/Server.java
+ bidirectional.Server
com/example/chat/ChatServiceGrpc.java
com.example.chat.ChatServiceGrpc
com.example.chat.ChatServiceGrpc$1
@@ -48,6 +64,9 @@ com/example/chat/ChatServiceGrpc.java
com.example.chat.ChatServiceGrpc$ChatServiceMethodDescriptorSupplier
com.example.chat.ChatServiceGrpc$ChatServiceStub
com.example.chat.ChatServiceGrpc$MethodHandlers
+bidirectional/Client.java
+ bidirectional.Client
+ bidirectional.Client$1
grpchelloserver/App.java
grpchelloserver.App
it/ewlab/actor/ActorOuterClass.java
@@ -63,10 +82,21 @@ it/ewlab/actor/ActorOuterClass.java
it.ewlab.actor.ActorOuterClass$Actor$Sex
it.ewlab.actor.ActorOuterClass$Actor$Sex$1
it.ewlab.actor.ActorOuterClass$ActorOrBuilder
+com/example/grpc/BidirectionalServiceOuterClass.java
+ com.example.grpc.BidirectionalServiceOuterClass
+ com.example.grpc.BidirectionalServiceOuterClass$1
+ com.example.grpc.BidirectionalServiceOuterClass$ClientRequest
+ com.example.grpc.BidirectionalServiceOuterClass$ClientRequest$1
+ com.example.grpc.BidirectionalServiceOuterClass$ClientRequest$Builder
+ com.example.grpc.BidirectionalServiceOuterClass$ClientRequestOrBuilder
+ com.example.grpc.BidirectionalServiceOuterClass$ServerResponse
+ com.example.grpc.BidirectionalServiceOuterClass$ServerResponse$1
+ com.example.grpc.BidirectionalServiceOuterClass$ServerResponse$Builder
+ com.example.grpc.BidirectionalServiceOuterClass$ServerResponseOrBuilder
grpchelloserver/GreetingServiceImpl.java
grpchelloserver.GreetingServiceImpl
-actor/Server.java
- actor.Server
grpchelloserver/GreetingServiceClient.java
grpchelloserver.GreetingServiceClient
grpchelloserver.GreetingServiceClient$1
+actor/Server.java
+ actor.Server
diff --git a/src/main/java/actor/Server.java b/src/main/java/actor/Server.java
index 7cf83013388faaa9a1ee9cd3ed0fc4ea5947f06c..d5922b9cd50ae9dc35bb84ebb6e16cebb470066c 100644
--- a/src/main/java/actor/Server.java
+++ b/src/main/java/actor/Server.java
@@ -10,6 +10,7 @@ public class Server {
public static void main(String[] args) throws IOException {
+ System.out.println("The server is running...\n");
ServerSocket serverSocket = new ServerSocket(9999);
diff --git a/src/main/java/bidirectional/BidirectionalServiceImpl.java b/src/main/java/bidirectional/BidirectionalServiceImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..07e541242abe45d5fcb4802cc9de98fca0159d95
--- /dev/null
+++ b/src/main/java/bidirectional/BidirectionalServiceImpl.java
@@ -0,0 +1,34 @@
+package bidirectional;
+
+import com.example.grpc.BidirectionalServiceGrpc.*;
+import com.example.grpc.BidirectionalServiceOuterClass.*;
+import io.grpc.stub.StreamObserver;
+
+
+public class BidirectionalServiceImpl extends BidirectionalServiceImplBase {
+ @Override
+ public StreamObserver