private void resetListenersExceptResetResistant() { ArrayList toRetain = new ArrayList(); Iterator i$ = this.loggerContextListenerList.iterator(); while(i$.hasNext()) { LoggerContextListener lcl = (LoggerContextListener)i$.next(); if(lcl.isResetResistant()) { toRetain.add(lcl); } } this.loggerContextListenerList.retainAll(toRetain); }
private boolean previouslyRegisteredListenerWithSameObjectName() { List<LoggerContextListener> lcll = loggerContext.getCopyOfListenerList(); for (LoggerContextListener lcl : lcll) { if (lcl instanceof JMXConfigurator) { JMXConfigurator jmxConfigurator = (JMXConfigurator) lcl; if (objectName.equals(jmxConfigurator.objectName)) { return true; } } } return false; }
@Override public void begin(InterpretationContext ec, String name, Attributes attributes) throws ActionException { inError = false; String className = attributes.getValue(CLASS_ATTRIBUTE); if (OptionHelper.isEmpty(className)) { addError("Mandatory \"" + CLASS_ATTRIBUTE + "\" attribute not set for <loggerContextListener> element"); inError = true; return; } try { lcl = (LoggerContextListener) OptionHelper.instantiateByClassName( className, LoggerContextListener.class, context); if(lcl instanceof ContextAware) { ((ContextAware) lcl).setContext(context); } ec.pushObject(lcl); addInfo("Adding LoggerContextListener of type [" + className + "] to the object stack"); } catch (Exception oops) { inError = true; addError("Could not create LoggerContextListener of type " + className + "].", oops); } }
private void resetListenersExceptResetResistant() { List<LoggerContextListener> toRetain = new ArrayList<LoggerContextListener>(); for (LoggerContextListener lcl : loggerContextListenerList) { if (lcl.isResetResistant()) { toRetain.add(lcl); } } loggerContextListenerList.retainAll(toRetain); }
public List<LoggerContextListener> getCopyOfListenerList() { return new ArrayList(this.loggerContextListenerList); }
public void addListener(LoggerContextListener listener) { loggerContextListenerList.add(listener); }
public void removeListener(LoggerContextListener listener) { loggerContextListenerList.remove(listener); }
public List<LoggerContextListener> getCopyOfListenerList() { return new ArrayList<LoggerContextListener>(loggerContextListenerList); }
void fireOnLevelChange(Logger logger, Level level) { for (LoggerContextListener listener : loggerContextListenerList) { listener.onLevelChange(logger, level); } }
private void fireOnReset() { for (LoggerContextListener listener : loggerContextListenerList) { listener.onReset(this); } }
private void fireOnStart() { for (LoggerContextListener listener : loggerContextListenerList) { listener.onStart(this); } }
private void fireOnStop() { for (LoggerContextListener listener : loggerContextListenerList) { listener.onStop(this); } }