@Override protected void closeNetwork() { EndpointManager.reset(); messageThreads.set(DEFAULT_MESSAGE_THREADS); NetworkConfig.setStandard(null); super.closeNetwork(); }
/** * Close configuration of rule. * * Handles nesting of rules by removing the top rule from the stack and * setup configuration of the next rule calling * {@link #initNetwork(boolean)}, when available. When the last rule is * removed from stack and no next rule is available, calls * {@link #closeNetwork()}. */ private final void closeConfig() { int size; NetworkRule closedRule; NetworkRule activeRule; synchronized (RULES_STACK) { closedRule = RULES_STACK.pop(); activeRule = RULES_STACK.peek(); size = RULES_STACK.size(); } LOGGER.log(Level.INFO, "{0} rules active.", size); if (this != closedRule) { throw new IllegalStateException("closed rule differs!"); } if (null == activeRule) { closeNetwork(); } else { activeRule.initNetwork(false); } }