MCPcopy Create free account
hub / github.com/grpc/grpc-java / withAuthority

Method withAuthority

api/src/main/java/io/grpc/CallOptions.java:129–134  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.

Calls 2

toBuilderMethod · 0.95
buildMethod · 0.95