Skip to content

Commit 75c80e6

Browse files
cnli87facebook-github-bot
authored andcommitted
add MonoPublishingTransformer and update ReactiveClient codegen to use publishOn
Summary: This follows the same pattern as the Flux transformer in D37835149 Reviewed By: prakashgayasen, sangongs Differential Revision: D52818750 fbshipit-source-id: 9e03d6a598abbf7afc315c0fbdcdb7a8a5d1cdfd
1 parent 27bb43a commit 75c80e6

File tree

26 files changed

+105
-58
lines changed

26 files changed

+105
-58
lines changed

third-party/thrift/src/thrift/compiler/generate/templates/java/ReactiveClient.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ public class {{service:javaCapitalName}}ReactiveClient {{#service:extends}}exten
213213

214214
return _rpc
215215
{{#function:oneway?}}.singleRequestNoResponse(_crp, rpcOptions).thenReturn(ResponseWrapper.create(null, java.util.Collections.emptyMap(), java.util.Collections.emptyMap())){{/function:oneway?}}{{!
216-
}}{{^function:oneway?}}.singleRequestSingleResponse(_crp, rpcOptions).doOnNext(_p -> {if(_p.getException() != null) throw com.facebook.thrift.util.ExceptionUtil.propagate(_p);}){{/function:oneway?}};
216+
}}{{^function:oneway?}}.singleRequestSingleResponse(_crp, rpcOptions).transform(com.facebook.thrift.util.MonoPublishingTransformer.getInstance()).doOnNext(_p -> {if(_p.getException() != null) throw com.facebook.thrift.util.ExceptionUtil.propagate(_p);}){{/function:oneway?}};
217217
}));
218218
}
219219

third-party/thrift/src/thrift/compiler/test/fixtures/adapter/gen-java/test/fixtures/adapter/AdapterServiceReactiveClient.java

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

third-party/thrift/src/thrift/compiler/test/fixtures/adapter/gen-java/test/fixtures/adapter/ServiceReactiveClient.java

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

third-party/thrift/src/thrift/compiler/test/fixtures/basic-annotations/gen-java/test/fixtures/basicannotations/BadServiceReactiveClient.java

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

third-party/thrift/src/thrift/compiler/test/fixtures/basic-annotations/gen-java/test/fixtures/basicannotations/FooBarBazServiceReactiveClient.java

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

third-party/thrift/src/thrift/compiler/test/fixtures/basic-annotations/gen-java/test/fixtures/basicannotations/MyServicePrioChildReactiveClient.java

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

third-party/thrift/src/thrift/compiler/test/fixtures/basic-annotations/gen-java/test/fixtures/basicannotations/MyServicePrioParentReactiveClient.java

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

third-party/thrift/src/thrift/compiler/test/fixtures/basic-annotations/gen-java/test/fixtures/basicannotations/MyServiceReactiveClient.java

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

third-party/thrift/src/thrift/compiler/test/fixtures/basic-swift-bean/gen-java/test/fixtures/basic_swift_bean/LegacyServiceReactiveClient.java

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

third-party/thrift/src/thrift/compiler/test/fixtures/basic/gen-java/test/fixtures/basic/DbMixedStackArgumentsReactiveClient.java

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)