/** * 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(); } } }
/** 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(); } } }