public void notifyChanged ( ) { if ( listeners != null ) { synchronized ( notifyLock ) { if ( listeners != null ) { if ( notifyThread == null ) { notifyThread = new NotifyThread ( this ) ; notifyThread . setDaemon ( true ) ; notifyThread . start ( ) ; } notifyThread . queue ( listeners . toArray ( new EventListener [ listeners . size ( ) ] ) ) ; } } } }
Queue a notification on the notification thread for the current listeners . When the thread unqueues the notification notifyListener is called on each listener from the notification thread .