private void shutdownAllContainers() {
   for (Container ct : this.containers.values()) {
     if (ct != null) {
       ct.kill();
     }
   }
 }
    @Override
    public void run() {
      LOG.info("Processing the event " + event.toString());

      // Load ContainerManager tokens before creating a connection.
      // TODO: Do it only once per NodeManager.
      ContainerId containerID = event.getContainerId();

      Container c = getContainer(event);
      switch (event.getType()) {
        case CONTAINER_LAUNCH_REQUEST:
          NMCommunicatorLaunchRequestEvent launchEvent = (NMCommunicatorLaunchRequestEvent) event;
          c.launch(launchEvent);
          break;

        case CONTAINER_STOP_REQUEST:
          c.kill();
          break;
      }
      removeContainerIfDone(containerID);
    }