@Override
 public int getPort() {
   Connector connector = this.tomcat.getConnector();
   if (connector != null) {
     return connector.getLocalPort();
   }
   return 0;
 }
 private void logPorts() {
   StringBuilder ports = new StringBuilder();
   for (Connector additionalConnector : this.tomcat.getService().findConnectors()) {
     ports.append(ports.length() == 0 ? "" : " ");
     ports.append(additionalConnector.getLocalPort() + "/" + additionalConnector.getScheme());
   }
   this.logger.info("Tomcat started on port(s): " + ports.toString());
 }