code: public static String hostNameOfDeployment(final WarMetaData metaData, final String defaultHost) {
  		Collection<String> hostNames = null;
  		if (metaData.getMergedJBossWebMetaData() != null) {
  			hostNames = metaData.getMergedJBossWebMetaData().getVirtualHosts();
  		}
  		if (hostNames == null || hostNames.isEmpty()) {
  			hostNames = Collections.singleton(defaultHost);
  		}
  		String hostName = hostNames.iterator().next();
  		if (hostName == null) {
  			throw ROOT_LOGGER.nullHostName();
  		}
  		return hostName;
  	}
docs: UndertowDeploymentProcessor.hostNameOfDeployment()