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

Streamline Styx HTTP Client interfaces #282

Merged
merged 6 commits into from
Sep 17, 2018

Conversation

mikkokar
Copy link
Contributor

@mikkokar mikkokar commented Sep 14, 2018

Streamline Styx HTTP Client interfaces so that they can be published together with 1.0 API.

To sum up the changes:

  • The main HTTP client interfaces are moved into the com.hotels.styx.client package.

  • The StyxHttpClient has been renamed to StyxBackendServiceClient. This is more descriptive, and it frees the more succinct StyxHttpClient to the more commonly used FullHttpClient.

  • The FullHttpClient interface is renamed to HttpClient which in the next iteration will be receiving a fluent interface to deal with both full and streaming HTTP requests, and to adjust contextual attributes per request basis.

  • Note that there is no need StyxBackendServiceClient needs to implement any particular interface. The BackendServiceClient interface remains for now to simplify mocking in our unit tests.

What do you think?

Does this renaming go too far or are there simpler approaches?

/**
* A configurable HTTP client that uses connection pooling, load balancing, etc.
*/
public final class StyxBackendServiceClient implements BackendServiceClient {
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be nice if this class could be named BackendServiceClient, though that would obvious conflict with the interface name.

@mikkokar mikkokar merged commit 1490cc4 into ExpediaGroup:master Sep 17, 2018
@mikkokar mikkokar deleted the styx-client branch April 1, 2019 08:38
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.

3 participants