コード例 #1
0
 /**
  * Called by the ServerNotificationManager whenever a notification needs to be sent to the client.
  */
 public void fireNotification(NotificationWrapper wrapr) {
   if (que.size() < bufsiz) {
     synchronized (que) {
       que.add(wrapr);
       que.notify();
     }
   }
 }
コード例 #2
0
 /** Sends an empty notification to the client. An empty notification is sent every 10 seconds. */
 public void fireWaitNotif() {
   if (!hasIOExceptionOccurred() && (que.size() < bufsiz) && !dispatching && isIdle()) {
     synchronized (que) {
       que.add(new NotificationWrapper(NotificationWrapper.WAIT, null, null));
       que.notify();
     }
   }
 }