private void forwardRosterChanged(Roster roster) { for (IRosterListener listener : listeners) { try { listener.rosterChanged(roster); } catch (RuntimeException e) { LOG.error("invoking listener: " + listener + " failed", e); } } }
private void forwardEntriesUpdated(Collection<String> addresses) { for (IRosterListener listener : this.listeners) { try { listener.entriesUpdated(addresses); } catch (RuntimeException e) { LOG.error("invoking listener: " + listener + " failed", e); } } }
private void forwardPresenceChanged(Presence presence) { for (IRosterListener listener : listeners) { try { listener.presenceChanged(presence); } catch (RuntimeException e) { LOG.error("invoking listener: " + listener + " failed", e); } } }
private void setRoster(Roster roster) { if (this.roster != null) this.roster.removeRosterListener(forwarder); if (roster != null) roster.addRosterListener(forwarder); this.roster = roster; forwarder.rosterChanged(this.roster); }