Custom pipelines (unlikely but possible) would not trigger the event. The javadocs for Pipeline will be updated to note that they should in a following commit.
Part of removing the Pipeline interface from ContainerBase
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@906680
13f79535-47bb-0310-9956-
ffa450edef68
public void removePropertyChangeListener(PropertyChangeListener listener);
+ /**
+ * Notify all container event listeners that a particular event has
+ * occurred for this Container. The default implementation performs
+ * this notification synchronously using the calling thread.
+ *
+ * @param type Event type
+ * @param data Event data
+ */
+ public void fireContainerEvent(String type, Object data);
}
public synchronized void addValve(Valve valve) {
pipeline.addValve(valve);
- fireContainerEvent(ADD_VALVE_EVENT, valve);
}
public ObjectName[] getValveObjectNames() {
public synchronized void removeValve(Valve valve) {
pipeline.removeValve(valve);
- fireContainerEvent(REMOVE_VALVE_EVENT, valve);
}
current = current.getNext();
}
}
-
+
+ container.fireContainerEvent(Container.ADD_VALVE_EVENT, valve);
}
unregisterValve(valve);
}
+ container.fireContainerEvent(Container.REMOVE_VALVE_EVENT, valve);
}
public Valve getFirst() {
if (first != null) {
return first;
- } else {
- return basic;
}
+
+ return basic;
}
}