Package com.webobjects.monitor._private

Examples of com.webobjects.monitor._private.MInstance.displayName()


            public int pageType() {
                return APP_PAGE;
            }

            public String question() {
                return "Are you sure you want to delete this instance (" + instance.displayName() + " running on " + instance.hostName() + ")";
            }

        });
    }
View Full Code Here


        for (int i = 0; i < numToStartPerHost; i++) {
            for (MHost host : activeHosts) {
                NSArray<MInstance> inactiveInstances = inactiveInstancesByHost.objectForKey(host);
                if (inactiveInstances != null && inactiveInstances.count() >= i) {
                    MInstance instance = inactiveInstances.objectAtIndex(i);
                    log("Starting inactive instance " + instance.displayName() + " on host " + host.addressAsString());
                    startingInstances.addObject(instance);
                } else {
                    log("Not enough inactive instances on host: " + host.addressAsString());
                }
            }
View Full Code Here

        for (int i = 0; i < numInstancesToStartPerHost; i++) {
            for (MHost host : activeHosts) {
                NSArray<MInstance> inactiveInstancesForHost = MInstance.HOST.eq(host).filtered(inactiveInstances);
                if (inactiveInstancesForHost != null && inactiveInstancesForHost.count() >= i) {
                    MInstance instance = inactiveInstancesForHost.objectAtIndex(i);
                    log("Starting inactive instance " + instance.displayName() + " on host " + host.addressAsString());
                    startingInstances.addObject(instance);
                } else {
                    log("Not enough inactive instances on host: " + host.addressAsString());
                }
            }
View Full Code Here

                                } else {
                                    try {
                                        if (command.equals("STOP")) {
                                          //we need to expect a response here
                                            if (theApplication.localMonitor().terminateInstance(anInstance) == null)
                                              throw new MonitorException("No response to STOP " + anInstance.displayName());
                                        } else if (command.equals("REFUSE")) {
                                          //we need to expect a response here
                                            if (theApplication.localMonitor().stopInstance(anInstance) == null)
                                              throw new MonitorException("No response to REFUSE " + anInstance.displayName());
                                        } else if (command.equals("ACCEPT")) {
View Full Code Here

                                            if (theApplication.localMonitor().terminateInstance(anInstance) == null)
                                              throw new MonitorException("No response to STOP " + anInstance.displayName());
                                        } else if (command.equals("REFUSE")) {
                                          //we need to expect a response here
                                            if (theApplication.localMonitor().stopInstance(anInstance) == null)
                                              throw new MonitorException("No response to REFUSE " + anInstance.displayName());
                                        } else if (command.equals("ACCEPT")) {
                                            if (theApplication.localMonitor().setAcceptInstance(anInstance) == null)
                                              throw new MonitorException("No response to ACCEPT " + anInstance.displayName());
                                            //we got a response, cancel any force quit task
                                            anInstance.cancelForceQuitTask();
View Full Code Here

                                          //we need to expect a response here
                                            if (theApplication.localMonitor().stopInstance(anInstance) == null)
                                              throw new MonitorException("No response to REFUSE " + anInstance.displayName());
                                        } else if (command.equals("ACCEPT")) {
                                            if (theApplication.localMonitor().setAcceptInstance(anInstance) == null)
                                              throw new MonitorException("No response to ACCEPT " + anInstance.displayName());
                                            //we got a response, cancel any force quit task
                                            anInstance.cancelForceQuitTask();
                                        } else if (command.equals("QUIT")) {
                                            anInstance.setShouldDie(true);
                                        }
View Full Code Here

                try {
                    instanceResponse = (NSDictionary) new _JavaMonitorDecoder().decodeRootObject(responseContent);
                } catch (WOXMLException wxe) {
                    try {
                        Object o = NSPropertyListSerialization.propertyListFromString(new String(responseContent.bytes()));
                        errorResponse.addObject(anInstance.displayName() + " is probably an older application that doesn't conform to the current Monitor Protocol. Please update and restart the instance.");
                        NSLog.err.appendln("Got old-style response from instance: " + anInstance.displayName());
                    } catch (Throwable t) {
                        NSLog.err.appendln("Wotaskd getStatisticsForInstanceArray: Error parsing: " + new String(responseContent.bytes()) + " from " + anInstance.displayName());
                    }
                    continue;
View Full Code Here

                    instanceResponse = (NSDictionary) new _JavaMonitorDecoder().decodeRootObject(responseContent);
                } catch (WOXMLException wxe) {
                    try {
                        Object o = NSPropertyListSerialization.propertyListFromString(new String(responseContent.bytes()));
                        errorResponse.addObject(anInstance.displayName() + " is probably an older application that doesn't conform to the current Monitor Protocol. Please update and restart the instance.");
                        NSLog.err.appendln("Got old-style response from instance: " + anInstance.displayName());
                    } catch (Throwable t) {
                        NSLog.err.appendln("Wotaskd getStatisticsForInstanceArray: Error parsing: " + new String(responseContent.bytes()) + " from " + anInstance.displayName());
                    }
                    continue;
                } catch (NullPointerException npe) {
View Full Code Here

                    try {
                        Object o = NSPropertyListSerialization.propertyListFromString(new String(responseContent.bytes()));
                        errorResponse.addObject(anInstance.displayName() + " is probably an older application that doesn't conform to the current Monitor Protocol. Please update and restart the instance.");
                        NSLog.err.appendln("Got old-style response from instance: " + anInstance.displayName());
                    } catch (Throwable t) {
                        NSLog.err.appendln("Wotaskd getStatisticsForInstanceArray: Error parsing: " + new String(responseContent.bytes()) + " from " + anInstance.displayName());
                    }
                    continue;
                } catch (NullPointerException npe) {
                    NSLog.err.appendln("Wotaskd getStatisticsForInstanceArray: No content returned from " + anInstance.displayName());
                    continue;
View Full Code Here

                    } catch (Throwable t) {
                        NSLog.err.appendln("Wotaskd getStatisticsForInstanceArray: Error parsing: " + new String(responseContent.bytes()) + " from " + anInstance.displayName());
                    }
                    continue;
                } catch (NullPointerException npe) {
                    NSLog.err.appendln("Wotaskd getStatisticsForInstanceArray: No content returned from " + anInstance.displayName());
                    continue;
                }

                NSArray queryInstanceError = (NSArray) instanceResponse.valueForKey("errorResponse");
                if (queryInstanceError != 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.