Add scary JavaDoc to Metadata.setAuthority()

This commit is contained in:
Eric Anderson 2015-02-19 16:54:20 -08:00
parent dbf7d529bd
commit ee6c9d7b52
1 changed files with 9 additions and 0 deletions

View File

@ -287,6 +287,15 @@ public abstract class Metadata {
return authority;
}
/**
* Override the HTTP/2 authority the channel claims to be connecting to. <em>This is not
* generally safe.</em> Overriding allows advanced users to re-use a single Channel for multiple
* services, even if those services are hosted on different domain names. That assumes the
* server is virtually hosting multiple domains and is guaranteed to continue doing so. It is
* rare for a service provider to make such a guarantee. <em>At this time, there is no security
* verification of the overridden value, such as making sure the authority matches the server's
* TLS certificate.</em>
*/
public void setAuthority(String authority) {
this.authority = authority;
}