docs: synchronized void listenerStopped(HttpEndpointImpl endpoint, VirtualHostConfig targetConfig, String resolvedHostName, int port, boolean isHttps) {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
              Tr.event(this, tc, "listener stopped for " + this + " on port " + port, endpoint);
          }
  
          if (!activated)
              return;
  
          EndpointState oldState = myEndpoints.get(endpoint);
          if (oldState == null) {
              // we must have been here before.. 
              return;
          }
  
          int newHttpPort = isHttps ? oldState.httpPort : EndpointState.notStarted.httpPort;
          int newHttpsPort = isHttps ? EndpointState.notStarted.httpsPort : oldState.httpsPort;
  
          // Check if we actually removed the port 
          boolean removedPort = (oldState.httpPort > 0 && newHttpPort == EndpointState.notStarted.httpPort)
                                || (oldState.httpsPort > 0 && newHttpsPort == EndpointState.notStarted.httpsPort);
  
          if (newHttpPort == EndpointState.notStarted.httpPort && newHttpsPort == EndpointState.notStarted.httpsPort) {
              // remove the endpoint entirely (see test above..)
              myEndpoints.remove(endpoint);
          } else {
              EndpointState newState = new EndpointState(resolvedHostName, newHttpPort, newHttpsPort);
              myEndpoints.put(endpoint, newState);
          }
  
          int numPorts;
  
          if (removedPort)
              numPorts = listeningPorts.decrementAndGet();
          else
              numPorts = listeningPorts.get();
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
              Tr.debug(this, tc, "listener stopped: " + listeningPorts.get(), oldState, myEndpoints.get(endpoint));
          }
  
          // notify all context roots (test for URL change.. )
          // the notification methods below use a) how many ports are left in combination with
          // b) what host:port they used for the initial notification to determine whether or not
          // to issue additional messages (context removed vs. context moved)
          for (HttpContainerContext ctx : httpContainers) {
              ctx.notifyExistingContexts(false, resolvedHostName, port, isHttps, numPorts);
          }
  
          osgiService.updateRegistration(false, targetConfig, true);
      }