Package com.google.apphosting.api.ApiProxy

Examples of com.google.apphosting.api.ApiProxy.ApplicationException


        throws ApplicationException {
      String operation = instance == MAIN_INSTANCE ? "getHostName" : "getInstanceHostname";
      if (!versions.containsKey(moduleName)) {
        logger.warning("Operation " + operation + " could not find the requested module "
            + " Module " + moduleName);
        throw new ApplicationException(ModulesServiceError.ErrorCode.INVALID_MODULE_VALUE,
            "The specified module does not exist.");
      }
      StringBuilder sb = new StringBuilder();
      if (instance != DYNAMIC_INSTANCE_COUNT) {
        AbstractModuleVersionState moduleVersionState =
View Full Code Here


          moduleVersionStateMap.get(new ModuleVersionKey(module, version));
      if (moduleVersionState == null) {
        logger.warning("Operation " + operation + " could not find the requested module version "
            + " Module " + module
            + " version " + version);
        throw new ApplicationException(ModulesServiceError.ErrorCode.INVALID_VERSION_VALUE,
              "Could not find the given version.");
      }
      return moduleVersionState;
    }
View Full Code Here

    int getNumInstances() {
      logger.warning("Operation getNumInstances requires a manually scaling module version but "
          + " Module " + moduleVersion.getModule()
          + " version " + moduleVersion.getVersion()
          + " is not manual scaling.");
      throw new ApplicationException(ModulesServiceError.ErrorCode.INVALID_VERSION_VALUE,
          "Could not find the given version.");
    }
View Full Code Here

    void setNumInstances(@SuppressWarnings("unused") int numInstances) {
      logger.warning("Operation setNumInstances requires a manually scaling version but "
          + " Module " + moduleVersion.getModule()
          + " version " + moduleVersion.getVersion()
          + " is not manual scaling.");
      throw new ApplicationException(ModulesServiceError.ErrorCode.INVALID_VERSION_VALUE,
          "Cannot set the number of instances for a module that has automatic scaling.");
    }
View Full Code Here

    String getInstanceDot(int instance) {
      if (instance >= numInstances.get()) {
      logger.warning("Operation getInstanceHostname failed because instances value "
          + instance + " is out of range for module " + moduleVersion.getModule()
          + " version " + moduleVersion.getVersion() + " numInstances " + numInstances.get());
      throw new ApplicationException(ModulesServiceError.ErrorCode.INVALID_INSTANCES_VALUE,
          "The specified instance does not exist for this module/version.");
      }
      return instance + ".";
    }
View Full Code Here

    @Override
    String getInstanceDot(int instance) {
      logger.warning("Operation getInstanceHostname not allowed for dynamic module version "
      + " module " + moduleVersion.getModule()
      + " version " + moduleVersion.getVersion());
      throw new ApplicationException(ModulesServiceError.ErrorCode.INVALID_VERSION_VALUE,
          "The specified instance does not exist for this module/version.");
    }
View Full Code Here

      logger.warning("Automatic scaling module "
          + " module " + moduleVersion.getModule()
          + " version " + moduleVersion.getVersion()
          + " does not support "
          + operation);
      throw new ApplicationException(ModulesServiceError.ErrorCode.INVALID_VERSION_VALUE,
          "Could not find the specified version.");
    }
View Full Code Here

      if (numInstances <= 0) {
        logger.warning("Operation setNumInstances failed with invalid instances value "
            + numInstances
            + " for module " + moduleVersion.getModule()
            + " version " + moduleVersion.getVersion());
        throw new ApplicationException(ModulesServiceError.ErrorCode.INVALID_INSTANCES_VALUE,
            "The number of instances must be greater than 0.");
      }
    }
View Full Code Here

TOP

Related Classes of com.google.apphosting.api.ApiProxy.ApplicationException

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.