org.rosuda.JGR.toolkit
Class ConsoleSync

java.lang.Object
  extended by org.rosuda.JGR.toolkit.ConsoleSync

public class ConsoleSync
extends java.lang.Object

ConsoleSync - notifys when commands are in the queue and send them.

Author:
Markus Helbig/ Simon Urbanek RoSuDa 2003 - 2005

Constructor Summary
ConsoleSync()
           
 
Method Summary
 void triggerNotification(java.lang.String msg)
          this methods awakens waitForNotification().
 java.lang.String waitForNotification()
          this internal method waits until triggerNotification(java.lang.String) is called by another thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConsoleSync

public ConsoleSync()
Method Detail

waitForNotification

public java.lang.String waitForNotification()
this internal method waits until triggerNotification(java.lang.String) is called by another thread. It is implemented by using Object.wait() and checking notificationArrived.


triggerNotification

public void triggerNotification(java.lang.String msg)
this methods awakens waitForNotification(). It is implemented by setting notificationArrived to true, setting #lastNotificationMessage to the passed message and finally calling Object.notifyAll().