@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.example.grpc.HelloResponse)) { return super.equals(obj); } com.example.grpc.HelloResponse other = (com.example.grpc.HelloResponse) obj; boolean result = true; result = result && getGreeting() .equals(other.getGreeting()); result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.example.grpc.HelloResponse)) { return super.equals(obj); } com.example.grpc.HelloResponse other = (com.example.grpc.HelloResponse) obj; boolean result = true; result = result && getGreeting() .equals(other.getGreeting()); result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.example.grpc.HelloResponse)) { return super.equals(obj); } com.example.grpc.HelloResponse other = (com.example.grpc.HelloResponse) obj; boolean result = true; result = result && getGreeting() .equals(other.getGreeting()); result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + GREETING_FIELD_NUMBER; hash = (53 * hash) + getGreeting().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + GREETING_FIELD_NUMBER; hash = (53 * hash) + getGreeting().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + GREETING_FIELD_NUMBER; hash = (53 * hash) + getGreeting().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * <code>string greeting = 1;</code> */ public Builder clearGreeting() { greeting_ = getDefaultInstance().getGreeting(); onChanged(); return this; } /**
/** * <code>string greeting = 1;</code> */ public Builder clearGreeting() { greeting_ = getDefaultInstance().getGreeting(); onChanged(); return this; } /**
/** * <code>string greeting = 1;</code> */ public Builder clearGreeting() { greeting_ = getDefaultInstance().getGreeting(); onChanged(); return this; } /**
public Builder mergeFrom(com.example.grpc.HelloResponse other) { if (other == com.example.grpc.HelloResponse.getDefaultInstance()) return this; if (!other.getGreeting().isEmpty()) { greeting_ = other.greeting_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
public Builder mergeFrom(com.example.grpc.HelloResponse other) { if (other == com.example.grpc.HelloResponse.getDefaultInstance()) return this; if (!other.getGreeting().isEmpty()) { greeting_ = other.greeting_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
public Builder mergeFrom(com.example.grpc.HelloResponse other) { if (other == com.example.grpc.HelloResponse.getDefaultInstance()) return this; if (!other.getGreeting().isEmpty()) { greeting_ = other.greeting_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
@Override public void goodbye(GoodbyeRequest request, StreamObserver<GoodbyeResponse> responseObserver) { HelloResponse helloResponse = this.greetingStub.greeting(HelloRequest.newBuilder().setName(request.getName()).build()); System.out.println(helloResponse); String farewell = helloResponse.getGreeting() + ", and goodbye, " + request.getName(); responseObserver.onNext(GoodbyeResponse.newBuilder().setFarewell(farewell).build()); responseObserver.onCompleted(); } }