Override the HTTP/2 authority the channel claims to be connecting to. This is not generally safe. 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 mult
(@Nullable String authority)
| 127 | * TLS certificate.</em> |
| 128 | */ |
| 129 | @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1767") |
| 130 | public CallOptions withAuthority(@Nullable String authority) { |
| 131 | Builder builder = toBuilder(this); |
| 132 | builder.authority = authority; |
| 133 | return builder.build(); |
| 134 | } |
| 135 | |
| 136 | /** |
| 137 | * Returns a new {@code CallOptions} with the given call credentials. |