1 package org.directwebremoting.dwrp; 2 3 import org.directwebremoting.extend.WaitController; 4 import org.directwebremoting.util.Logger; 5 6 10 public class NotifyWaitController implements WaitController 11 { 12 15 public NotifyWaitController(Object lock) 16 { 17 this.lock = lock; 18 } 19 20 23 public void shutdown() 24 { 25 try 26 { 27 synchronized (lock) 28 { 29 lock.notifyAll(); 30 } 31 } 32 catch (Exception ex) 33 { 34 log.warn("Failed to notify all ScriptSession users", ex); 35 } 36 37 shutdown = true; 38 } 39 40 43 public boolean isShutdown() 44 { 45 return shutdown; 46 } 47 48 52 private Object lock; 53 54 57 private static final Logger log = Logger.getLogger(NotifyWaitController.class); 58 59 62 private boolean shutdown = false; 63 } | Popular Tags |