Ejemplo n.º 1
0
    clearView(Ice.IPropertiesAdminPrx cprops, Ice.IPropertiesAdminPrx sprops, UpdateCallbackI callback)
    {
        Dictionary <string, string> dict;

        dict = cprops.GetPropertiesForPrefix("IceMX.Metrics");
        dict["IceMX.Metrics.View.Disabled"] = "1";
        cprops.SetProperties(dict);

        dict = sprops.GetPropertiesForPrefix("IceMX.Metrics");
        dict["IceMX.Metrics.View.Disabled"] = "1";
        sprops.SetProperties(dict);

        callback.waitForUpdate();

        dict = cprops.GetPropertiesForPrefix("IceMX.Metrics");
        dict["IceMX.Metrics.View.Disabled"] = "";
        cprops.SetProperties(dict);

        dict = sprops.GetPropertiesForPrefix("IceMX.Metrics");
        dict["IceMX.Metrics.View.Disabled"] = "";
        sprops.SetProperties(dict);

        callback.waitForUpdate();
    }
Ejemplo n.º 2
0
    getServerProps(Ice.IPropertiesAdminPrx p, Dictionary <string, string> orig, string m)
    {
        Dictionary <string, string> props = p.GetPropertiesForPrefix("IceMX.Metrics");

        foreach (string e in new List <string>(props.Keys))
        {
            props[e] = "";
        }
        foreach (KeyValuePair <string, string> e in orig)
        {
            props[e.Key] = e.Value;
        }
        string map = "";

        if (m.Length > 0)
        {
            map += "Map." + m + '.';
        }
        props["IceMX.Metrics.View." + map + "Reject.parent"]       = "Ice\\.Admin|Controller";
        props["IceMX.Metrics.View." + map + "Accept.endpointPort"] = getPort(p);
        return(props);
    }