Skip to content

Instantly share code, notes, and snippets.

@mgodave
Last active December 6, 2024 18:47
Show Gist options
  • Save mgodave/d9064c67da9f365de70ef7526c9eea72 to your computer and use it in GitHub Desktop.
Save mgodave/d9064c67da9f365de70ef7526c9eea72 to your computer and use it in GitHub Desktop.
27a28,30
> import io.servicetalk.grpc.api.GrpcStatus;
> import io.servicetalk.grpc.api.GrpcStatusCode;
> import io.servicetalk.grpc.api.GrpcStatusException;
95c98
< * @throws io.servicetalk.grpc.api.GrpcStatusException if an expected application exception occurs. Its contents will be serialized and propagated to the peer.
---
> * @throws GrpcStatusException if an expected application exception occurs. Its contents will be serialized and propagated to the peer.
126c129
< * @throws io.servicetalk.grpc.api.GrpcStatusException if an expected application exception occurs. Its contents will be serialized and propagated to the peer.
---
> * @throws GrpcStatusException if an expected application exception occurs. Its contents will be serialized and propagated to the peer.
157c160
< * @throws io.servicetalk.grpc.api.GrpcStatusException if an expected application exception occurs. Its contents will be serialized and propagated to the peer.
---
> * @throws GrpcStatusException if an expected application exception occurs. Its contents will be serialized and propagated to the peer.
189c192
< * @throws io.servicetalk.grpc.api.GrpcStatusException if an expected application exception occurs. Its contents will be serialized and propagated to the peer.
---
> * @throws GrpcStatusException if an expected application exception occurs. Its contents will be serialized and propagated to the peer.
207a211,233
>
> @Override
> default Single<TestResponse> test(GrpcServiceContext ctx, TestRequest request) {
> return Single.failed(new GrpcStatusException(new GrpcStatus(GrpcStatusCode.UNIMPLEMENTED, "Method grpc.netty.Tester/test is unimplemented")));
> }
>
> @Override
> default Publisher<TestResponse> testBiDiStream(GrpcServiceContext ctx,
> Publisher<TestRequest> request) {
> return Publisher.failed(new GrpcStatusException(new GrpcStatus(GrpcStatusCode.UNIMPLEMENTED, "Method grpc.netty.Tester/testBiDiStream is unimplemented")));
> }
>
> @Override
> default Publisher<TestResponse> testResponseStream(GrpcServiceContext ctx,
> TestRequest request) {
> return Publisher.failed(new GrpcStatusException(new GrpcStatus(GrpcStatusCode.UNIMPLEMENTED, "Method grpc.netty.Tester/testResponseStream is unimplemented")));
> }
>
> @Override
> default Single<TestResponse> testRequestStream(GrpcServiceContext ctx,
> Publisher<TestRequest> request) {
> return Single.failed(new GrpcStatusException(new GrpcStatus(GrpcStatusCode.UNIMPLEMENTED, "Method grpc.netty.Tester/testRequestStream is unimplemented")));
> }
222a249,271
>
> @Override
> default TestResponse test(GrpcServiceContext ctx, TestRequest request) throws Exception {
> throw new GrpcStatusException(new GrpcStatus(GrpcStatusCode.UNIMPLEMENTED, "Method grpc.netty.Tester/test is unimplemented"));
> }
>
> @Override
> default void testBiDiStream(GrpcServiceContext ctx, BlockingIterable<TestRequest> request,
> BlockingStreamingGrpcServerResponse<TestResponse> response) throws Exception {
> throw new GrpcStatusException(new GrpcStatus(GrpcStatusCode.UNIMPLEMENTED, "Method grpc.netty.Tester/testBiDiStream is unimplemented"));
> }
>
> @Override
> default void testResponseStream(GrpcServiceContext ctx, TestRequest request,
> BlockingStreamingGrpcServerResponse<TestResponse> response) throws Exception {
> throw new GrpcStatusException(new GrpcStatus(GrpcStatusCode.UNIMPLEMENTED, "Method grpc.netty.Tester/testResponseStream is unimplemented"));
> }
>
> @Override
> default TestResponse testRequestStream(GrpcServiceContext ctx,
> BlockingIterable<TestRequest> request) throws Exception {
> throw new GrpcStatusException(new GrpcStatus(GrpcStatusCode.UNIMPLEMENTED, "Method grpc.netty.Tester/testRequestStream is unimplemented"));
> }
588c637
< * @throws io.servicetalk.grpc.api.GrpcStatusException if an expected application exception occurs. Its contents will be serialized and propagated to the peer.
---
> * @throws GrpcStatusException if an expected application exception occurs. Its contents will be serialized and propagated to the peer.
597c646
< * @throws io.servicetalk.grpc.api.GrpcStatusException if an expected application exception occurs. Its contents will be serialized and propagated to the peer.
---
> * @throws GrpcStatusException if an expected application exception occurs. Its contents will be serialized and propagated to the peer.
605c654
< * @throws io.servicetalk.grpc.api.GrpcStatusException if an expected application exception occurs. Its contents will be serialized and propagated to the peer.
---
> * @throws GrpcStatusException if an expected application exception occurs. Its contents will be serialized and propagated to the peer.
615c664
< * @throws io.servicetalk.grpc.api.GrpcStatusException if an expected application exception occurs. Its contents will be serialized and propagated to the peer.
---
> * @throws GrpcStatusException if an expected application exception occurs. Its contents will be serialized and propagated to the peer.
624c673
< * @throws io.servicetalk.grpc.api.GrpcStatusException if an expected application exception occurs. Its contents will be serialized and propagated to the peer.
---
> * @throws GrpcStatusException if an expected application exception occurs. Its contents will be serialized and propagated to the peer.
633c682
< * @throws io.servicetalk.grpc.api.GrpcStatusException if an expected application exception occurs. Its contents will be serialized and propagated to the peer.
---
> * @throws GrpcStatusException if an expected application exception occurs. Its contents will be serialized and propagated to the peer.
642c691
< * @throws io.servicetalk.grpc.api.GrpcStatusException if an expected application exception occurs. Its contents will be serialized and propagated to the peer.
---
> * @throws GrpcStatusException if an expected application exception occurs. Its contents will be serialized and propagated to the peer.
651c700
< * @throws io.servicetalk.grpc.api.GrpcStatusException if an expected application exception occurs. Its contents will be serialized and propagated to the peer.
---
> * @throws GrpcStatusException if an expected application exception occurs. Its contents will be serialized and propagated to the peer.
@mgodave
Copy link
Author

mgodave commented Nov 20, 2024

GrpcStatusException is now imported so javapoet no longer fully qualifies it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment