Package com.webobjects.monitor._private

Examples of com.webobjects.monitor._private.MInstance


            myApplication().setDebuggingEnabled(appDefaults.debuggingEnabled());

            NSArray _instanceArray = myApplication().instanceArray();
            int instanceArrayCount = _instanceArray.count();
            for (int i = 0; i < instanceArrayCount; i++) {
                MInstance anInstance = (MInstance) _instanceArray.objectAtIndex(i);
                anInstance._takeValueFromApplication("debuggingEnabled");
            }
            _defaultsPush();
        } finally {
            handler().endReading();
        }
View Full Code Here


            myApplication().setMacOutputPath(appDefaults.macOutputPath());

            NSArray _instanceArray = myApplication().instanceArray();
            int instanceArrayCount = _instanceArray.count();
            for (int i = 0; i < instanceArrayCount; i++) {
                MInstance anInstance = (MInstance) _instanceArray.objectAtIndex(i);
                anInstance._takeOutputPathFromApplication();
            }
            _defaultsPush();
        } finally {
            handler().endReading();
        }
View Full Code Here

            myApplication().setAutoOpenInBrowser(appDefaults.autoOpenInBrowser());

            NSArray _instanceArray = myApplication().instanceArray();
            int instanceArrayCount = _instanceArray.count();
            for (int i = 0; i < instanceArrayCount; i++) {
                MInstance anInstance = (MInstance) _instanceArray.objectAtIndex(i);
                anInstance._takeValueFromApplication("autoOpenInBrowser");
            }
            _defaultsPush();
        } finally {
            handler().endReading();
        }
View Full Code Here

            myApplication().setLifebeatInterval(appDefaults.lifebeatInterval());

            NSArray _instanceArray = myApplication().instanceArray();
            int instanceArrayCount = _instanceArray.count();
            for (int i = 0; i < instanceArrayCount; i++) {
                MInstance anInstance = (MInstance) _instanceArray.objectAtIndex(i);
                anInstance._takeValueFromApplication("lifebeatInterval");
            }
            _defaultsPush();
        } finally {
            handler().endReading();
        }
View Full Code Here

            myApplication().setAdditionalArgs(appDefaults.additionalArgs());

            NSArray _instanceArray = myApplication().instanceArray();
            int instanceArrayCount = _instanceArray.count();
            for (int i = 0; i < instanceArrayCount; i++) {
                MInstance anInstance = (MInstance) _instanceArray.objectAtIndex(i);
                anInstance._takeValueFromApplication("additionalArgs");
            }
            _defaultsPush();
        } finally {
            handler().endReading();
        }
View Full Code Here

  public WOActionResults updateAction() throws Throwable {
    checkPassword();
    if (siteConfig().hostArray().count() == 0) {
      throw new IllegalStateException("You cannot update the SiteConfig before adding a host.");
    }
    MSiteConfig siteConfig = (MSiteConfig) object(ERXKeyFilter.filterWithAttributes());
        update(siteConfig, ERXKeyFilter.filterWithAttributes());
        pushValues(siteConfig);
    return response(siteConfig, ERXKeyFilter.filterWithAttributes());
  }
View Full Code Here

import er.rest.ERXRestContext;

public class MSiteConfigRestDelegate extends JavaMonitorRestDelegate {
    public Object createObjectOfEntityWithID(EOClassDescription entity, Object id, ERXRestContext context) {
    return new MSiteConfig(null);
  }
View Full Code Here

    public void updateForPage(String aName) {
        // KH - we should probably set the instance information as we get the
        // responses, to avoid waiting, then doing it in serial! (not that it's
        // _that_ slow)
        MSiteConfig siteConfig = WOTaskdHandler.siteConfig();
        startReading();
        try {
            aName = ERXStringUtilities.lastPropertyKeyInKeyPath(aName);
            if (siteConfig.hostArray().count() != 0) {
                if (ApplicationsPage.class.getName().endsWith(aName) && (siteConfig.applicationArray().count() != 0)) {

                    for (Enumeration e = siteConfig.applicationArray().objectEnumerator(); e.hasMoreElements();) {
                        MApplication anApp = (MApplication) e.nextElement();
                        anApp.setRunningInstancesCount(0);
                    }
                    NSArray<MHost> hostArray = siteConfig.hostArray();
                    getApplicationStatusForHosts(hostArray);
                } else if (AppDetailPage.class.getName().endsWith(aName)) {
                    NSArray<MHost> hostArray = siteConfig.hostArray();

                    getInstanceStatusForHosts(hostArray);
                } else if (HostsPage.class.getName().endsWith(aName)) {
                    NSArray<MHost> hostArray = siteConfig.hostArray();

                    getHostStatusForHosts(hostArray);
                }
            }
        } finally {
View Full Code Here

    if (responseContent != null) {
      byte[] responseContentBytes = responseContent.bytes();
      String responseContentString = new String(responseContentBytes);

      if (responseContentString.startsWith("ERROR")) {
        throw new MonitorException("Path " + thePath + " does not exist");
      }

      _JavaMonitorDecoder aDecoder = new _JavaMonitorDecoder();
      try {
        byte[] evilHackCombined = new byte[responseContentBytes.length + evilHack.length];
        // System.arraycopy(src, src_pos, dst, dst_pos, length);
        System.arraycopy(evilHack, 0, evilHackCombined, 0, evilHack.length);
        System.arraycopy(responseContentBytes, 0, evilHackCombined, evilHack.length,
            responseContentBytes.length);
        anArray = (NSArray) aDecoder.decodeRootObject(new NSData(evilHackCombined));
      } catch (WOXMLException wxe) {
        NSLog.err.appendln("RemoteBrowseClient _getFileListOutOfResponse Error decoding response: "
            + responseContentString);
        throw new MonitorException("Host returned bad response for path " + thePath);
      }

    } else {
      NSLog.err.appendln("RemoteBrowseClient _getFileListOutOfResponse Error decoding null response");
      throw new MonitorException("Host returned null response for path " + thePath);
    }

    String isRoots = aResponse.headerForKey("isRoots");
    String filepath = aResponse.headerForKey("filepath");
View Full Code Here

      if (requestSucceeded) {
        aResponse = anHTTPConnection.readResponse();
      }

      if ((aResponse == null) || (!requestSucceeded) || (aResponse.status() != 200)) {
        throw new MonitorException("Error requesting directory listing for " + aString + " from " + aHost.name());
      }

      try {
        aFileListDictionary = _getFileListOutOfResponse(aResponse, aString);
      } catch (MonitorException me) {
        if (NSLog
            .debugLoggingAllowedForLevelAndGroups(NSLog.DebugLevelCritical, NSLog.DebugGroupDeployment))
          NSLog.debug.appendln("caught exception: " + me);
        throw me;
      }

      aHost.isAvailable = true;
    } catch (MonitorException me) {
      aHost.isAvailable = true;
      throw me;
    } catch (Exception localException) {
      aHost.isAvailable = false;
      NSLog.err.appendln("Exception requesting directory listing: ");
      localException.printStackTrace();
      throw new MonitorException("Exception requesting directory listing for " + aString + " from "
          + aHost.name() + ": " + localException.toString());
    }
    return aFileListDictionary;
  }
View Full Code Here

TOP

Related Classes of com.webobjects.monitor._private.MInstance

Copyright © 2018 www.massapicom. 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.