org.restlet.routing.VirtualHost.setHostPort()方法的使用及代码示例

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

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

VirtualHost.setHostPort介绍

[英]Sets the hostRef host port to match. See the java.util.regex.Pattern class for details on the syntax.
[中]将hostRef主机端口设置为匹配。看看java。util。正则表达式。有关语法的详细信息,请参阅Pattern类。

代码示例

代码示例来源:origin: org.restlet.osgi/org.restlet

host.setHostPort(item.getNodeValue());

代码示例来源:origin: stackoverflow.com

try {
  VirtualHost virtualHost = getExistingVirtualHost(
          component, hostDomain, hostPort);
  if (virtualHost == null) {
    virtualHost = new VirtualHost();
    virtualHost.setHostDomain(hostDomain);
    virtualHost.setHostPort(hostPort);

    component.getHosts().add(virtualHost);
  }

  Context context = component.getContext().createChildContext();
  virtualHost.setContext(context);

  virtualHost.attachDefault(application);

  component.updateHosts();

  application.start();
} catch(Exception ex) {
  (...)
}

代码示例来源:origin: org.restlet.jee/org.restlet.ext.wadl

host.setHostPort(hostPort);
host.setHostScheme(hostScheme);
component.getHosts().add(host);

相关文章