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

Method getPort

api/src/main/java/io/grpc/Uri.java:443–445  ·  view source on GitHub ↗

Returns the "port" component of this URI, or -1 if empty or not present.

()

Source from the content-addressed store, hash-verified

441
442 /** Returns the "port" component of this URI, or -1 if empty or not present. */
443 public int getPort() {
444 return port != null && !port.isEmpty() ? Integer.parseInt(port) : -1;
445 }
446
447 /** Returns the raw port component of this URI in its originally parsed form. */
448 @Nullable

Calls 1

isEmptyMethod · 0.45