MCPcopy Create free account
hub / github.com/apache/tomcat / removeValve

Method removeValve

java/org/apache/catalina/mbeans/MBeanFactory.java:847–864  ·  view source on GitHub ↗

Remove an existing Valve. @param name MBean Name of the component to remove @exception Exception if a component cannot be removed

(String name)

Source from the content-addressed store, hash-verified

845 * @exception Exception if a component cannot be removed
846 */
847 public void removeValve(String name) throws Exception {
848
849 // Acquire a reference to the component to be removed
850 ObjectName oname = new ObjectName(name);
851 Container container = getParentContainerFromChild(oname);
852 if (container == null) {
853 return;
854 }
855 Valve[] valves = container.getPipeline().getValves();
856 for (Valve valve : valves) {
857 if (valve instanceof JmxEnabled) {
858 ObjectName voname = ((JmxEnabled) valve).getObjectName();
859 if (voname.equals(oname)) {
860 container.getPipeline().removeValve(valve);
861 }
862 }
863 }
864 }
865
866}
867

Callers

nothing calls this directly

Calls 6

getPipelineMethod · 0.95
getValvesMethod · 0.65
getObjectNameMethod · 0.65
equalsMethod · 0.65
removeValveMethod · 0.65

Tested by

no test coverage detected