docs: synchronized void listenerStarted(HttpEndpointImpl endpoint, VirtualHostConfig targetConfig, String resolvedHostName, int port, boolean isHttps) {
          if (!activated)
              return;
  
          // If allowed endpoints are specified for the host and this isn't one of them, don't add this endpoint
          Collection<String> allowedEndpoints = targetConfig.getAllowedEndpoints();
          if (!allowedEndpoints.isEmpty() && !allowedEndpoints.contains(endpoint.getPid()))
              return;
  
          EndpointState oldState = myEndpoints.get(endpoint);
          if (oldState == null) {
              oldState = EndpointState.notStarted;
          }
  
          int newHttpPort = isHttps ? oldState.httpPort : port;
          int newHttpsPort = isHttps ? port : oldState.httpsPort;
  
          EndpointState newState = new EndpointState(resolvedHostName, newHttpPort, newHttpsPort);
  
          //Check if we are changing an already listening port.. 
          boolean updatedPort = (oldState.httpPort > 0 && oldState.httpPort != newHttpPort)
                                || (oldState.httpsPort > 0 && oldState.httpsPort != newHttpsPort);
  
          boolean addedPort = (oldState.httpPort == 0 && oldState.httpPort != newHttpPort)
                              || (oldState.httpsPort == 0 && oldState.httpsPort != newHttpsPort);
  
          myEndpoints.put(endpoint, newState);
  
          int numPorts;
          if (addedPort)
              numPorts = listeningPorts.incrementAndGet();
          else
              numPorts = listeningPorts.get();
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
              Tr.debug(this, tc, "listener started: " + listeningPorts.get(), oldState, newState, addedPort, updatedPort);
          }
  
          if (addedPort || updatedPort) {
              // Update registration if a port changed.. 
              osgiService.updateRegistration(activated, targetConfig, true);
          }
  
          // Notify that the endpoint is available only if it is a first port, or a changed port for an endpoint  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
              Tr.event(this, tc, "listener started for " + this + " on host " + resolvedHostName + " on port " + port, endpoint);
          }
  
          for (HttpContainerContext ctx : httpContainers) {
              ctx.notifyExistingContexts(true, resolvedHostName, port, isHttps, numPorts);
          }
      }