Package com.webobjects.foundation

Examples of com.webobjects.foundation.NSMutableDictionary.takeValueForKey()


                    }
                } finally {
                    theApplication._lock.endReading();
                }

                queryWotaskdResponse.takeValueForKey(applicationResponse, "applicationResponse");
            } else if (queryWotaskdString.equals("INSTANCE")) {
                NSMutableArray instanceResponse = null;
                theApplication._lock.startReading();
                try {
                    NSArray instanceArray = (aConfig.localHost() != null) ? aConfig.localHost().instanceArray() : NSArray.EmptyArray;
View Full Code Here


                    }
                } finally {
                    theApplication._lock.endReading();
                }

                queryWotaskdResponse.takeValueForKey(instanceResponse, "instanceResponse");
            } else {
                errorResponse.addObject(_hostName + ": Unrecognized Query: " + queryWotaskdString);
            }
            monitorResponse.takeValueForKey(queryWotaskdResponse, "queryWotaskdResponse");
        }
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

            NSTimestamp currentTime = new NSTimestamp();
            // Don't regenerate the localhost list for random applications
            if ( WOHostUtilities.isLocalInetAddress(InetAddress.getByName(host), false) ) {
                NSMutableDictionary appDict = (NSMutableDictionary) _unknownApplications.valueForKey(name);
                if (appDict != null) {
                    appDict.takeValueForKey(currentTime, port);
                } else {
                    _unknownApplications.takeValueForKey(new NSMutableDictionary(currentTime, port), name);
                }
            }
        } catch (Exception e) {
View Full Code Here

    protected NSMutableDictionary createInstanceRequestDictionary(String commandString, String queryString, MInstance anInstance) {
        NSMutableDictionary instanceRequest = new NSMutableDictionary(2);

        if (commandString != null) {
            NSMutableDictionary commandInstance = new NSMutableDictionary(2);
            commandInstance.takeValueForKey(commandString, "command");
            if (commandString.equals("REFUSE")) {
                commandInstance.takeValueForKey(anInstance.minimumActiveSessionsCount(), "minimumActiveSessionsCount");
            }
            instanceRequest.takeValueForKey(commandInstance, "commandInstance");
        }
View Full Code Here

        if (commandString != null) {
            NSMutableDictionary commandInstance = new NSMutableDictionary(2);
            commandInstance.takeValueForKey(commandString, "command");
            if (commandString.equals("REFUSE")) {
                commandInstance.takeValueForKey(anInstance.minimumActiveSessionsCount(), "minimumActiveSessionsCount");
            }
            instanceRequest.takeValueForKey(commandInstance, "commandInstance");
        }

        if (queryString != null) {
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.