public void updated()

in containers-marathon/src/main/java/org/apache/aries/containers/marathon/impl/MarathonConfigManagedService.java [44:68]


    public void updated(Dictionary<String, ?> properties) throws ConfigurationException {
        Object newURL = properties.get("marathon.url");
        if (!(newURL instanceof String)) {
            LOG.error("marathon.url should be a String property {} - ignoring configuration", properties);
            return;
        }

        String marURL = (String) newURL;
        marURL = marURL.trim();
        if (marURL.equals(marathonURL)) {
            // Configuration didn't change
            return;
        }

        // The configuration has changed, unregister previous service
        if (reg != null)
            reg.unregister();

        marathonURL = marURL;
        ServiceManager cf = new MarathonServiceManager(marathonURL);

        Dictionary<String, Object> props = new Hashtable<>();
        props.put(ServiceManager.BINDING, "marathon");
        reg = bundleContext.registerService(ServiceManager.class, cf, props);
    }