@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.example.grpc.GoodbyeRequest)) { return super.equals(obj); } com.example.grpc.GoodbyeRequest other = (com.example.grpc.GoodbyeRequest) obj; boolean result = true; result = result && getName() .equals(other.getName()); result = result && getReason() .equals(other.getReason()); 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.GoodbyeRequest)) { return super.equals(obj); } com.example.grpc.GoodbyeRequest other = (com.example.grpc.GoodbyeRequest) obj; boolean result = true; result = result && getName() .equals(other.getName()); result = result && getReason() .equals(other.getReason()); 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) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + REASON_FIELD_NUMBER; hash = (53 * hash) + getReason().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) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + REASON_FIELD_NUMBER; hash = (53 * hash) + getReason().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * <code>string name = 1;</code> */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /**
/** * <code>string name = 1;</code> */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /**
@Override public void goodbye(GoodbyeRequest request, StreamObserver<GoodbyeResponse> responseObserver) { String userId = Constant.USER_ID_CTX_KEY.get(); System.out.println("Goodbye Service Trace ID: " + Constant.TRACE_ID_CTX_KEY.get()); System.out.println("Goodbye Service User ID: " + userId); HelloResponse helloResponse = this.greetingStub.greeting(HelloRequest.newBuilder().setName(request.getName()).build()); System.out.println(helloResponse); String farewell = "Goodye, " + request.getName() + ", your userId is " + userId; responseObserver.onNext(GoodbyeResponse.newBuilder().setFarewell(farewell).build()); responseObserver.onCompleted(); } }
@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(); } }
public Builder mergeFrom(com.example.grpc.GoodbyeRequest other) { if (other == com.example.grpc.GoodbyeRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (!other.getReason().isEmpty()) { reason_ = other.reason_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
public Builder mergeFrom(com.example.grpc.GoodbyeRequest other) { if (other == com.example.grpc.GoodbyeRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (!other.getReason().isEmpty()) { reason_ = other.reason_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }