Esempio n. 1
0
 private static void show(Ice.PropertiesAdminPrx admin)
 {
     Dictionary<string, string> props = admin.getPropertiesForPrefix("Demo");
     Console.Out.WriteLine("Server's current settings:");
     foreach(KeyValuePair<string, string> e in props)
     {
         Console.Out.WriteLine("  " + e.Key + "=" + e.Value);
     }
 }
Esempio n. 2
0
 getClientProps(Ice.PropertiesAdminPrx 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";
     props["IceMX.Metrics.View." + map + "Accept.endpointPort"] = "12010";
     props["IceMX.Metrics.View." + map + "Reject.identity"] = ".*/admin|controller";
     return props;
 }
Esempio n. 3
0
 private static void copyProperties(string prefix, Ice.Properties from, Ice.Properties to)
 {
     foreach(var p in from.getPropertiesForPrefix(prefix))
     {
         to.setProperty(p.Key, p.Value);
     }
 }
Esempio n. 4
0
    static void clearView(Ice.PropertiesAdminPrx cprops, Ice.PropertiesAdminPrx 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();
    }