class AdapterRegistry implements AdapterRegistryMBean {

  public static void sendShutdownEvent(Set<ObjectName> adapterManagers) {
    for (ObjectName obj : adapterManagers) {
      AdapterManagerMBean mgr = JMX.newMBeanProxy(JmxHelper.findMBeanServer(), obj, AdapterManagerMBean.class);
      try {
        mgr.sendLifecycleEvent(EventFactory.create(AdapterShutdownEvent.class));
      }
      catch (CoreException e) {
        log.warn("Failed to send ShutdownEvent for " + mgr.getUniqueId());
      }
    }
  }

  private  AdapterRegistry();

}