MCPcopy Index your code
hub / github.com/apache/tomcat / destroy

Method destroy

java/org/apache/coyote/AbstractProtocol.java:1083–1111  ·  view source on GitHub ↗

Destroys the protocol handler. @throws Exception if destroy fails

()

Source from the content-addressed store, hash-verified

1081 * @throws Exception if destroy fails
1082 */
1083 @Override
1084 public void destroy() throws Exception {
1085 if (getLog().isInfoEnabled()) {
1086 getLog().info(sm.getString("abstractProtocolHandler.destroy", getName()));
1087 logPortOffset();
1088 }
1089
1090 try {
1091 endpoint.destroy();
1092 } finally {
1093 if (oname != null) {
1094 if (mserver == null) {
1095 Registry.getRegistry(null).unregisterComponent(oname);
1096 } else {
1097 // Possibly registered with a different MBeanServer
1098 try {
1099 mserver.unregisterMBean(oname);
1100 } catch (MBeanRegistrationException | InstanceNotFoundException e) {
1101 getLog().info(sm.getString("abstractProtocol.mbeanDeregistrationFailed", oname, mserver));
1102 }
1103 }
1104 }
1105
1106 ObjectName rgOname = getGlobalRequestProcessorMBeanName();
1107 if (rgOname != null) {
1108 Registry.getRegistry(null).unregisterComponent(rgOname);
1109 }
1110 }
1111 }
1112
1113
1114 /**

Callers

nothing calls this directly

Calls 11

getLogMethod · 0.95
getNameMethod · 0.95
logPortOffsetMethod · 0.95
getRegistryMethod · 0.95
isInfoEnabledMethod · 0.65
infoMethod · 0.65
getStringMethod · 0.65
destroyMethod · 0.65
unregisterComponentMethod · 0.65
unregisterMBeanMethod · 0.45

Tested by

no test coverage detected