Package com.webobjects.foundation

Examples of com.webobjects.foundation.NSDictionary.valueForKey()


                } catch (NullPointerException npe) {
                    NSLog.err.appendln("Wotaskd getStatisticsForInstanceArray: No content returned from " + anInstance.displayName());
                    continue;
                }

                NSArray queryInstanceError = (NSArray) instanceResponse.valueForKey("errorResponse");
                if (queryInstanceError != null) {
                    anInstance.setStatisticsError(queryInstanceError.componentsJoinedByString(", "));
                    continue;
                }
View Full Code Here


                if (queryInstanceError != null) {
                    anInstance.setStatisticsError(queryInstanceError.componentsJoinedByString(", "));
                    continue;
                }

                String queryInstanceResponse = (String) instanceResponse.valueForKey("queryInstanceResponse");
                if (queryInstanceResponse == null) continue;

                try {
                    NSDictionary statistics = (NSDictionary) NSPropertyListSerialization.propertyListFromString(queryInstanceResponse);
View Full Code Here

                try {
                    NSDictionary statistics = (NSDictionary) NSPropertyListSerialization.propertyListFromString(queryInstanceResponse);

                    NSMutableDictionary newStats = new NSMutableDictionary(5);

                    newStats.takeValueForKey(statistics.valueForKey("StartedAt"), "startedAt");

                    NSDictionary tempDict = (NSDictionary) statistics.valueForKey("Transactions");
                    newStats.takeValueForKey(tempDict.valueForKey("Transactions"), "transactions");
                    newStats.takeValueForKey(tempDict.valueForKey("Avg. Transaction Time"), "avgTransactionTime");
                    newStats.takeValueForKey(tempDict.valueForKey("Avg. Idle Time"), "averageIdlePeriod");
View Full Code Here

                    NSMutableDictionary newStats = new NSMutableDictionary(5);

                    newStats.takeValueForKey(statistics.valueForKey("StartedAt"), "startedAt");

                    NSDictionary tempDict = (NSDictionary) statistics.valueForKey("Transactions");
                    newStats.takeValueForKey(tempDict.valueForKey("Transactions"), "transactions");
                    newStats.takeValueForKey(tempDict.valueForKey("Avg. Transaction Time"), "avgTransactionTime");
                    newStats.takeValueForKey(tempDict.valueForKey("Avg. Idle Time"), "averageIdlePeriod");

                    tempDict = (NSDictionary) statistics.valueForKey("Sessions");
                    newStats.takeValueForKey(tempDict.valueForKey("Current Active Sessions"), "activeSessions");
View Full Code Here

                    newStats.takeValueForKey(statistics.valueForKey("StartedAt"), "startedAt");

                    NSDictionary tempDict = (NSDictionary) statistics.valueForKey("Transactions");
                    newStats.takeValueForKey(tempDict.valueForKey("Transactions"), "transactions");
                    newStats.takeValueForKey(tempDict.valueForKey("Avg. Transaction Time"), "avgTransactionTime");
                    newStats.takeValueForKey(tempDict.valueForKey("Avg. Idle Time"), "averageIdlePeriod");

                    tempDict = (NSDictionary) statistics.valueForKey("Sessions");
                    newStats.takeValueForKey(tempDict.valueForKey("Current Active Sessions"), "activeSessions");
View Full Code Here

                    newStats.takeValueForKey(statistics.valueForKey("StartedAt"), "startedAt");

                    NSDictionary tempDict = (NSDictionary) statistics.valueForKey("Transactions");
                    newStats.takeValueForKey(tempDict.valueForKey("Transactions"), "transactions");
                    newStats.takeValueForKey(tempDict.valueForKey("Avg. Transaction Time"), "avgTransactionTime");
                    newStats.takeValueForKey(tempDict.valueForKey("Avg. Idle Time"), "averageIdlePeriod");

                    tempDict = (NSDictionary) statistics.valueForKey("Sessions");
                    newStats.takeValueForKey(tempDict.valueForKey("Current Active Sessions"), "activeSessions");

                    anInstance.setStatistics(newStats);
View Full Code Here

                    newStats.takeValueForKey(tempDict.valueForKey("Transactions"), "transactions");
                    newStats.takeValueForKey(tempDict.valueForKey("Avg. Transaction Time"), "avgTransactionTime");
                    newStats.takeValueForKey(tempDict.valueForKey("Avg. Idle Time"), "averageIdlePeriod");

                    tempDict = (NSDictionary) statistics.valueForKey("Sessions");
                    newStats.takeValueForKey(tempDict.valueForKey("Current Active Sessions"), "activeSessions");

                    anInstance.setStatistics(newStats);
                } catch (Exception e) {
                    // Do nothing - assume we died trying to parse the plist
                    NSLog.err.appendln("Wotaskd getStatisticsForInstanceArray: Error parsing PList: " + queryInstanceResponse + " from " + anInstance.displayName());
View Full Code Here

        // Look through the array of hosts, and see if we need to add/remove any - configure the rest
        NSMutableArray currentHosts = new NSMutableArray(aConfig.hostArray());
        if (hostArray != null) {
            for (Enumeration e = hostArray.objectEnumerator(); e.hasMoreElements(); ) {
                NSDictionary aHost = (NSDictionary) e.nextElement();
                String name = (String) aHost.valueForKey("name");
                MHost anMHost = aConfig.hostWithName(name);
                if (anMHost == null) {
                    // we have to add it
                    aConfig.addHost_W(new MHost(aHost, aConfig));
                } else {
View Full Code Here

        // Look through the array of applications, and see if we need to add/remove any - configure the rest
        NSMutableArray currentApplications = new NSMutableArray(aConfig.applicationArray());
        if (applicationArray != null) {
            for (Enumeration e = applicationArray.objectEnumerator(); e.hasMoreElements(); ) {
                NSDictionary anApp = (NSDictionary) e.nextElement();
                String name = (String) anApp.valueForKey("name");
                MApplication anMApplication = aConfig.applicationWithName(name);
                // if I can't find the application, I might be updating the name - in that case, look under the oldname.
                if (anMApplication == null) {
                    name = (String) anApp.valueForKey("oldname");
                    anMApplication = aConfig.applicationWithName(name);
View Full Code Here

                NSDictionary anApp = (NSDictionary) e.nextElement();
                String name = (String) anApp.valueForKey("name");
                MApplication anMApplication = aConfig.applicationWithName(name);
                // if I can't find the application, I might be updating the name - in that case, look under the oldname.
                if (anMApplication == null) {
                    name = (String) anApp.valueForKey("oldname");
                    anMApplication = aConfig.applicationWithName(name);
                }
                if (anMApplication == null) {
                    // we have to add it
                    aConfig.addApplication_W(new MApplication(anApp, aConfig));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.