Code example for Observable

Methods: notifyObservers

0
	} 
	 
	public synchronized void detectChanges() { 
		int latestRevision = getLatestRevision();
		if (lastRevision != latestRevision)
			hiveStatus.notifyObservers();
		lastRevision = latestRevision;
	} 
 
	public void run() { 
		while (true) { 
			try { 
				detectChanges(); 
				lastRun = System.currentTimeMillis();
			} catch (Exception e) {}
 
			try { 
				sleep(getConfiguredSleepPeriodMs());
			} catch (InterruptedException e) {}
		} 
	}