@Override public void addObserver(ConfigurationObserver co) { if (tableId == null) { String err = "Attempt to add observer for non-table configuration"; log.error(err); throw new RuntimeException(err); } iterator(); super.addObserver(co); }
@Override public void removeObserver(ConfigurationObserver co) { if (namespaceId == null) { String err = "Attempt to remove observer for non-namespace configuration"; log.error(err); throw new RuntimeException(err); } super.removeObserver(co); }
/** * Gets the current set of observers. The returned collection is a snapshot, and changes to it do * not reflect back to the configuration. * * @return observers */ public Collection<ConfigurationObserver> getObservers() { return snapshot(observers); }
/** * Notifies all observers that a property changed. * * @param key * configuration property key */ public void propertyChanged(String key) { Collection<ConfigurationObserver> copy = snapshot(observers); for (ConfigurationObserver co : copy) co.propertyChanged(key); }
@Override public void removeObserver(ConfigurationObserver co) { if (tableId == null) { String err = "Attempt to remove observer for non-table configuration"; log.error(err); throw new RuntimeException(err); } super.removeObserver(co); }
@Override public void addObserver(ConfigurationObserver co) { if (namespaceId == null) { String err = "Attempt to add observer for non-namespace configuration"; log.error(err); throw new RuntimeException(err); } iterator(); super.addObserver(co); }
/** * Expires all observers. */ public void expireAllObservers() { Collection<ConfigurationObserver> copy = snapshot(observers); for (ConfigurationObserver co : copy) co.sessionExpired(); }
@Override public void removeObserver(ConfigurationObserver co) { if (namespaceId == null) { String err = "Attempt to remove observer for non-namespace configuration"; log.error(err); throw new RuntimeException(err); } super.removeObserver(co); }
@Override public void addObserver(ConfigurationObserver co) { if (namespaceId == null) { String err = "Attempt to add observer for non-namespace configuration"; log.error(err); throw new RuntimeException(err); } iterator(); super.addObserver(co); }
/** * Notifies all observers that properties changed. */ public void propertiesChanged() { Collection<ConfigurationObserver> copy = snapshot(observers); for (ConfigurationObserver co : copy) co.propertiesChanged(); } }
@Override public void removeObserver(ConfigurationObserver co) { if (tableId == null) { String err = "Attempt to remove observer for non-table configuration"; log.error(err); throw new RuntimeException(err); } super.removeObserver(co); }
@Override public void addObserver(ConfigurationObserver co) { if (tableId == null) { String err = "Attempt to add observer for non-table configuration"; log.error(err); throw new RuntimeException(err); } iterator(); super.addObserver(co); }
/** * Gets the current set of observers. The returned collection is a snapshot, and changes to it do * not reflect back to the configuration. * * @return observers */ public Collection<ConfigurationObserver> getObservers() { return snapshot(observers); }
/** * Expires all observers. */ public void expireAllObservers() { Collection<ConfigurationObserver> copy = snapshot(observers); for (ConfigurationObserver co : copy) co.sessionExpired(); }
/** * Notifies all observers that a property changed. * * @param key * configuration property key */ public void propertyChanged(String key) { Collection<ConfigurationObserver> copy = snapshot(observers); for (ConfigurationObserver co : copy) co.propertyChanged(key); }
/** * Notifies all observers that properties changed. */ public void propertiesChanged() { Collection<ConfigurationObserver> copy = snapshot(observers); for (ConfigurationObserver co : copy) co.propertiesChanged(); } }