1 16 package org.directwebremoting.servlet; 17 18 import java.util.List ; 19 20 import javax.servlet.ServletContextAttributeEvent ; 21 import javax.servlet.ServletContextAttributeListener ; 22 23 import org.directwebremoting.extend.ServerLoadMonitor; 24 import org.directwebremoting.impl.ContainerUtil; 25 26 31 public class EfficientShutdownServletContextAttributeListener implements ServletContextAttributeListener 32 { 33 36 public void attributeAdded(ServletContextAttributeEvent ev) 37 { 38 } 39 40 43 public void attributeRemoved(ServletContextAttributeEvent ev) 44 { 45 if (ev.getName().equals(ContainerUtil.ATTRIBUTE_CONTAINER_LIST)) 46 { 47 List containers = (List ) ev.getValue(); 48 ContainerUtil.shutdownServerLoadMonitorsInContainerList(containers, "EfficientShutdownServletContextAttributeListener"); 49 } 50 } 51 52 55 public void attributeReplaced(ServletContextAttributeEvent ev) 56 { 57 } 58 } 59 60 | Popular Tags |