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

Method authorityFromHostAndPort

api/src/main/java/io/grpc/Grpc.java:125–131  ·  view source on GitHub ↗
(String host, int port)

Source from the content-addressed store, hash-verified

123 */
124 // A copy of GrpcUtil.authorityFromHostAndPort
125 private static String authorityFromHostAndPort(String host, int port) {
126 try {
127 return new URI(null, null, host, port, null, null, null).getAuthority();
128 } catch (URISyntaxException ex) {
129 throw new IllegalArgumentException("Invalid host or port: " + host + " " + port, ex);
130 }
131 }
132
133 /**
134 * Static factory for creating a new ServerBuilder.

Callers 1

Calls 1

getAuthorityMethod · 0.65

Tested by

no test coverage detected