Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new InvocationBuilderListener SPI #4313

Merged
merged 4 commits into from
Nov 25, 2019

Conversation

jansupol
Copy link
Contributor

Signed-off-by: Jan Supol [email protected]

@jansupol
Copy link
Contributor Author

This new SPI interface allows for

  • creating decorators that modify the requests (Invocation.Builder) as needed.
  • setting the ClientRequestContext properties (in the main thread rather than in the executor service thread when invoked by RxInvoker and set by Filter), possibly registered automatically using AutoDiscoverable interface
  • providing functionality already requested by the MP RestClientBuilderListener

@jansupol
Copy link
Contributor Author

@pdudits Would this help you with #4267?

@jansupol jansupol force-pushed the invocation_builder_listener branch from ec4235d to 16de364 Compare November 14, 2019 15:14
@jansupol
Copy link
Contributor Author

@pdudits The InvocationBuilderListener is to be called when the InvocationBuilder is created, the same as the RestClientBuilderListener. Is it good enough for you to have it called at the time, i.e. long time before the rx() is called?

@jansupol jansupol force-pushed the invocation_builder_listener branch from 16de364 to 1a1b9d7 Compare November 14, 2019 15:22
@pdudits
Copy link
Contributor

pdudits commented Nov 14, 2019

I'll have a detailed look tomorrow, at first sight it looks good. One usually uses RestClientBuilder to build client for many invocations (in real applications, contrary to tests), so I think the relation of lifecycles are but different

@jansupol jansupol force-pushed the invocation_builder_listener branch from 1a1b9d7 to d29f416 Compare November 14, 2019 16:59
@pdudits
Copy link
Contributor

pdudits commented Nov 18, 2019

I tested this API with the same four usecases as in #4301, code is in this branch.

All of these usecases are satisfied by this, so I'm quite happy.

@senivam senivam requested a review from tomas-langer November 19, 2019 11:54
Signed-off-by: Jan Supol <[email protected]>
Copy link
Contributor

@tomas-langer tomas-langer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
maybe consider possibility to get and modify URL to be called and access to configuration

@jansupol jansupol requested a review from senivam November 19, 2019 13:42
@jansupol
Copy link
Contributor Author

@tomas-langer I have added getters to the headers, configuration, and URI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants