org.hippoecm.hst.configuration.hosting.VirtualHost.getName()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(122)

本文整理了Java中org.hippoecm.hst.configuration.hosting.VirtualHost.getName()方法的一些代码示例,展示了VirtualHost.getName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。VirtualHost.getName()方法的具体详情如下:
包路径:org.hippoecm.hst.configuration.hosting.VirtualHost
类名称:VirtualHost
方法名:getName

VirtualHost.getName介绍

[英]Returns the name of this VirtualHost. Note, this is not the hostName, but only part of it. If the hostName is www.apache.org, then the name of this VirtualHost might be 'www' or 'apache' or 'org'. It is thus one segment of the entire hostName.
[中]返回此虚拟主机的name。注意,这不是主机名,而是主机名的一部分。如果主机名是www.apache。org,那么这个虚拟主机的名称可能是“www”或“apache”或“org”。因此,它是整个主机名的一部分。

代码示例

代码示例来源:origin: org.onehippo.cms7.hst.components/hst-core

@Override
public String getName() {
  return delegatee.getName();
}

代码示例来源:origin: org.onehippo.ecm.hst.testsuite.sandbox/hst-jaxrs

HstSiteMapMatcher parentSiteMapMatcher = parentSiteMount.getHstSiteMapMatcher();
VirtualHost virtualHost = parentSiteMount.getVirtualHost();
ResolvedVirtualHost resolvedVirtualHost = virtualHost.getVirtualHosts().matchVirtualHost(virtualHost.getName());
ResolvedSiteMount parentResolvedSiteMount = resolvedVirtualHost.matchSiteMount(servletRequest.getContextPath(), parentSiteMount.getMountPath());
ResolvedSiteMapItem parentResolvedSiteMapItem = parentSiteMapMatcher.match("/", parentResolvedSiteMount);

相关文章