/** * Uninstalls the endpoint. * * @param name the local name of the endpoint to be uninstalled */ public void uninstalls(String name) { //unregister localy Endpoint endpoint = endpoints.remove(name); //send notification to manager for (ServerManager manager : managers) { manager.onStarted(endpoint); } try { //TODO: lookup irrespective of endpoint usage endpoint = namingService.lookup(name, true); if (endpoint != null) { endpoint.stop(); namingService.unregister(endpoint); } } catch (Exception e) { logger.error(e); } }
namingService.register(endpoint); } catch (Exception e) { endpoint.stop(); logger.error("Could not register endpoint " + endpoint.getLocalName(), e);