Class DevAppServerPortPropertyHelper
java.lang.Object
com.google.appengine.tools.development.DevAppServerPortPropertyHelper
Utility methods for managing
DevAppServer port related service
properties.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic intReturns the configured port for the specified module instance from the the provided service properties orDEFAULT_PORTif no port has been configured.static intReturns the configured port for the named module's main instance from the the provided service properties orDEFAULT_PORTif no port has been configured.static intAdds a service property to configureDevAppServerto use the the specified port for the specified module instance to the passed in service properties.static intAdds a service property to configureDevAppServerto use the the specified port for the named module's main instance to the passed in service properties.
-
Field Details
-
DEFAULT_PORT
public static final int DEFAULT_PORT- See Also:
-
SYSTEM_PROPERTY_STATIC_MODULE_PORT_NUM_PREFIX
- See Also:
-
-
Method Details
-
setPort
Adds a service property to configureDevAppServerto use the the specified port for the named module's main instance to the passed in service properties. To read the added service property usegetPort(String, Map). -
setPort
public static int setPort(String moduleName, int instance, int port, Map<String, String> serviceProperties) Adds a service property to configureDevAppServerto use the the specified port for the specified module instance to the passed in service properties. To read the added service property usegetPort(String, Map).- Parameters:
moduleName- the module name.instance- the module instance or {linkLocalEnvironment.MAIN_INSTANCEfor the main instance.port- the port for the specified module instance.serviceProperties- the service properties.
-
getPort
Returns the configured port for the named module's main instance from the the provided service properties orDEFAULT_PORTif no port has been configured. To add the service property to configure the port usesetPort(String, int, Map). -
getPort
Returns the configured port for the specified module instance from the the provided service properties orDEFAULT_PORTif no port has been configured. To add the service property to configure the port usesetPort(String, int, Map).- Parameters:
moduleName- the module name.instance- the module instance or {linkLocalEnvironment.MAIN_INSTANCEfor the main instance.serviceProperties- the service properties.
-