1 package org.directwebremoting.dwrp; 2 3 import org.directwebremoting.ScriptBuffer; 4 import org.directwebremoting.extend.ScriptConduit; 5 import org.directwebremoting.util.Logger; 6 7 13 public class NotifyOnlyScriptConduit extends ScriptConduit 14 { 15 18 public NotifyOnlyScriptConduit(Object lock) 19 { 20 super(RANK_PROCEDURAL); 21 this.lock = lock; 22 } 23 24 27 public boolean addScript(ScriptBuffer script) 28 { 29 try 30 { 31 synchronized (lock) 32 { 33 lock.notifyAll(); 34 } 35 } 36 catch (Exception ex) 37 { 38 log.warn("Failed to notify all ScriptSession users", ex); 39 } 40 41 return false; 43 } 44 45 48 private final Object lock; 49 50 53 private static final Logger log = Logger.getLogger(NotifyOnlyScriptConduit.class); 54 } | Popular Tags |