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

core: ProxiedSocketAddress on public API #5344

Merged
merged 3 commits into from Feb 11, 2019

Conversation

zhangkun83
Copy link
Contributor

Combine the public ProxyParameters and the internal ProxySocketAddress as HttpConnectProxiedSocketAddress. The more specific name signifies the type of the proxy we currently support, and makes room for other proxy types (e.g., SOCKS) in the future. The combination simplifies NameResolver implementation.

Introduce ProxiedSocketAddress as the base class that is returned by ProxyDetector, mainly for clarification and documentation. Added documentation about proxy in general on ProxyDetector.

@zhangkun83
Copy link
Contributor Author

@idelvall, just a heads-up. This change may cause breakage in your work.

*/
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/5279")
public final class HttpConnectProxiedSocketAddress extends ProxiedSocketAddress {
private static final long serialVersionUID = 6815392291648496951L;
Copy link
Member

Choose a reason for hiding this comment

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

Feel free to just use 0 or 1 here. The "random" serialVersionUID is only necessary when adding serialVersionUID to pre-existing classes, as it needs to match what Java would have generated. For new classes, treating it as a "version number" is likely to be more clear.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@zhangkun83
Copy link
Contributor Author

Related: #5279

@zhangkun83 zhangkun83 merged commit 138e958 into grpc:master Feb 11, 2019
@zhangkun83 zhangkun83 deleted the public_proxysocketaddress branch February 11, 2019 17:57
@lock lock bot locked as resolved and limited conversation to collaborators May 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants