public void publishEvent(Priority prio, String text) { synchronized (evts) { evts.add(new EventBufferElement(prio, text)); if (triggerPrio != null && prio.isGreaterOrEqual(triggerPrio)) evts.notify(); } }