if (findListener(networkListeners, report)) {
final Protocol httpProtocol = listenerToBeRemoved.findHttpProtocol();
final VirtualServer virtualServer = config.getHttpService().getVirtualServerByName(
httpProtocol.getHttp().getDefaultVirtualServer());
ConfigSupport.apply(new ConfigCode() {
public Object run(ConfigBeanProxy... params) throws PropertyVetoException {
final NetworkListeners listeners = (NetworkListeners) params[0];
final VirtualServer server = (VirtualServer) params[1];
listeners.getNetworkListener().remove(listenerToBeRemoved);
server.removeNetworkListener(listenerToBeRemoved.getName());