public static synchronized void setEventService(String serviceName, EventService es) throws EventServiceExistsException {
      if (EVENT_SERVICES.get(serviceName) != null && es != null) {
         throw new EventServiceExistsException("An event service by the name " + serviceName + "already exists.  Perhaps multiple threads tried to create a service about the same time?");
      } else {
         EVENT_SERVICES.put(serviceName, es);
         if (SERVICE_NAME_EVENT_BUS.equals(serviceName)) {
            EVENT_BUS_SERVICE = es;
         } else if (SERVICE_NAME_SWING_EVENT_SERVICE.equals(serviceName)) {
            SWING_EVENT_SERVICE = es;
         }
      }
   }