Class DevAppServerPortPropertyHelper

java.lang.Object
com.google.appengine.tools.development.DevAppServerPortPropertyHelper

public class DevAppServerPortPropertyHelper extends Object
Utility methods for managing DevAppServer port related service properties.
  • Field Details

  • Method Details

    • setPort

      public static int setPort(String moduleName, int port, Map<String,String> serviceProperties)
      Adds a service property to configure DevAppServer to use the the specified port for the named module's main instance to the passed in service properties. To read the added service property use getPort(String, Map).
    • setPort

      public static int setPort(String moduleName, int instance, int port, Map<String,String> serviceProperties)
      Adds a service property to configure DevAppServer to use the the specified port for the specified module instance to the passed in service properties. To read the added service property use getPort(String, Map).
      Parameters:
      moduleName - the module name.
      instance - the module instance or {link LocalEnvironment.MAIN_INSTANCE for the main instance.
      port - the port for the specified module instance.
      serviceProperties - the service properties.
    • getPort

      public static int getPort(String moduleName, Map<String,String> serviceProperties)
      Returns the configured port for the named module's main instance from the the provided service properties or DEFAULT_PORT if no port has been configured. To add the service property to configure the port use setPort(String, int, Map).
    • getPort

      public static int getPort(String moduleName, int instance, Map<String,String> serviceProperties)
      Returns the configured port for the specified module instance from the the provided service properties or DEFAULT_PORT if no port has been configured. To add the service property to configure the port use setPort(String, int, Map).
      Parameters:
      moduleName - the module name.
      instance - the module instance or {link LocalEnvironment.MAIN_INSTANCE for the main instance.
      serviceProperties - the service properties.