@Test public void getPort() throws Exception { transportServer = new SimpleServer() { @Override public int getPort() { return 65535; } }; createAndStartServer(); assertThat(server.getPort()).isEqualTo(65535); }
@Override public int getPort() { synchronized (lock) { checkState(started, "Not started"); checkState(!terminated, "Already terminated"); return transportServer.getPort(); } }
ServerImpl extends io.grpc.Server implements InternalInstrumented<ServerStats> { @Override public int getPort() { synchronized (lock) { checkState(started, "Not started"); checkState(!terminated, "Already terminated"); return transportServer.getPort(); } } }
ServerImpl extends io.grpc.Server implements InternalInstrumented<ServerStats> { @Override public int getPort() { synchronized (lock) { checkState(started, "Not started"); checkState(!terminated, "Already terminated"); return transportServer.getPort(); } } ServerImpl(
      AbstractServerImplBuilder<?> builder,
      InternalServer transportServer,
      Context rootContext); }
ServerImpl extends io.grpc.Server implements InternalInstrumented<ServerStats> { @Override public int getPort() { synchronized (lock) { checkState(started, "Not started"); checkState(!terminated, "Already terminated"); return transportServer.getPort(); } } ServerImpl(
      AbstractServerImplBuilder<?> builder,
      InternalServer transportServer,
      Context rootContext); @Override ServerImpl start(); @Override int getPort(); @Override List<ServerServiceDefinition> getServices(); @Override List<ServerServiceDefinition> getImmutableServices(); @Override List<ServerServiceDefinition> getMutableServices(); @Override ServerImpl shutdown(); @Override ServerImpl shutdownNow(); @Override boolean isShutdown(); @Override boolean awaitTermination(long timeout, TimeUnit unit); @Override void awaitTermination(); @Override boolean isTerminated(); @Override InternalLogId getLogId(); @Override ListenableFuture<ServerStats> getStats(); @Override HandlerRegistry getRegistry(); @Override String toString(); }
ServerImpl extends io.grpc.Server implements InternalInstrumented<ServerStats> { @Override public int getPort() { synchronized (lock) { checkState(started, "Not started"); checkState(!terminated, "Already terminated"); return transportServer.getPort(); } } ServerImpl(
      AbstractServerImplBuilder<?> builder,
      InternalServer transportServer,
      Context rootContext); @Override ServerImpl start(); @Override int getPort(); @Override List<ServerServiceDefinition> getServices(); @Override List<ServerServiceDefinition> getImmutableServices(); @Override List<ServerServiceDefinition> getMutableServices(); @Override ServerImpl shutdown(); @Override ServerImpl shutdownNow(); @Override boolean isShutdown(); @Override boolean awaitTermination(long timeout, TimeUnit unit); @Override void awaitTermination(); @Override boolean isTerminated(); @Override InternalLogId getLogId(); @Override ListenableFuture<ServerStats> getStats(); @Override HandlerRegistry getRegistry(); @Override String toString();  }