Wowza Community

Understand expandEnvironmentVariables(String, java.util.Map)


I readed the document but still not well understand about the com.wowza.util.SystemUtilsexpandEnvironmentVariables(String, java.util.Map)


                        envMap.put("com.wowza.wms.context.VHost", vhost.getName());
			envMap.put("com.wowza.wms.context.VHostConfigHome", vhost.getHomePath());
			envMap.put("com.wowza.wms.context.Application", appInstance.getApplication().getName());
			envMap.put("com.wowza.wms.context.ApplicationInstance", appInstance.getName());
			passwordFileStr = SystemUtils.expandEnvironmentVariables(passwordFileStr, envMap);

passwordFileStr seems never be changed, not sure how would happen on the environment variables. Can someone help to explain that? thank you.


Answer by myself, the envMap content would be used in the decode result of expandEnvironmentVariables(passwordFileStr, envMap),

the reason to use expandEnvironmentVariables(String, java.util.Map) rather than the expandEnvironmentVariables(String) maybe the same as the

post : some environment variables can NOT be decoded so programmer have to assign them first.