org.wildfly.extension.undertow.Host.getName()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(5.7k)|赞(0)|评价(0)|浏览(164)

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

Host.getName介绍

暂无

代码示例

代码示例来源:origin: wildfly/wildfly

protected void unregisterHost(Host host) {
  for (String hostName : host.getAllAliases()) {
    virtualHostHandler.removeHost(hostName);
    hosts.remove(host);
  }
  if (host.getName().equals(getDefaultHost())) {
    virtualHostHandler.setDefaultHandler(ResponseCodeHandler.HANDLE_404);
  }
}

代码示例来源:origin: wildfly/wildfly

@Override
public void stop(final StopContext stopContext) {
  final Host host = hostInjector.getValue();
  UndertowLogger.ROOT_LOGGER.debugf("Stopping console redirect for %s", host.getName());
  host.unregisterHandler(CONSOLE_PATH);
}

代码示例来源:origin: wildfly/wildfly

protected void registerHost(final Host host) {
  hosts.add(host);
  for (String hostName : host.getAllAliases()) {
    virtualHostHandler.addHost(hostName, host.getRootHandler());
  }
  if (host.getName().equals(getDefaultHost())) {
    virtualHostHandler.setDefaultHandler(host.getRootHandler());
  }
}

代码示例来源:origin: wildfly/wildfly

@Override
public void start(StartContext context) throws StartException {
  RequestController rq = requestControllerInjectedValue.getOptionalValue();
  if(rq != null) {
    controlPoint = rq.getControlPoint("", "org.wildfly.undertow.webhost." + server.getValue().getName() + "." + host.getValue().getName());
  }
}

代码示例来源:origin: wildfly/wildfly

@Override
public void start(final StartContext startContext) throws StartException {
  final Host host = hostInjector.getValue();
  UndertowLogger.ROOT_LOGGER.debugf("Starting console redirect for %s", host.getName());
  final HttpManagement httpManagement = httpManagementInjector.getOptionalValue();
  if (httpManagement != null) {
    if (httpManagement.hasConsole()) {
      host.registerHandler(CONSOLE_PATH, new ConsoleRedirectHandler(httpManagement));
    } else {
      host.registerHandler(CONSOLE_PATH, new RedirectHandler(NO_CONSOLE));
    }
  } else {
    host.registerHandler(CONSOLE_PATH, new RedirectHandler(NO_CONSOLE));
  }
}

代码示例来源:origin: wildfly/wildfly

d.setHostName(host.getValue().getName());

代码示例来源:origin: org.jboss.eap/wildfly-mod_cluster-undertow

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

代码示例来源:origin: org.jboss.eap/wildfly-mod_cluster-undertow

@Override
  public String toString() {
    return this.host.getName();
  }
}

代码示例来源:origin: org.jboss.eap/wildfly-mod_cluster-undertow

@Override
public int hashCode() {
  return this.host.getName().hashCode();
}

代码示例来源:origin: org.jboss.eap/wildfly-clustering-web-undertow

@Override
public void onDeploymentStart(Deployment deployment, Host host) {
  if (this.host.get().getName().equals(host.getName())) {
    this.addDeployment(deployment);
  }
}

代码示例来源:origin: org.jboss.eap/wildfly-clustering-web-undertow

@Override
public void onDeploymentStop(Deployment deployment, Host host) {
  if (this.host.get().getName().equals(host.getName())) {
    this.removeDeployment(deployment);
  }
}

代码示例来源:origin: org.jboss.eap/wildfly-undertow

protected void unregisterHost(Host host) {
  for (String hostName : host.getAllAliases()) {
    virtualHostHandler.removeHost(hostName);
    hosts.remove(host);
  }
  if (host.getName().equals(getDefaultHost())) {
    virtualHostHandler.setDefaultHandler(ResponseCodeHandler.HANDLE_404);
  }
}

代码示例来源:origin: org.wildfly/wildfly-undertow

protected void unregisterHost(Host host) {
  for (String hostName : host.getAllAliases()) {
    virtualHostHandler.removeHost(hostName);
    hosts.remove(host);
  }
  if (host.getName().equals(getDefaultHost())) {
    virtualHostHandler.setDefaultHandler(ResponseCodeHandler.HANDLE_404);
  }
}

代码示例来源:origin: org.jboss.eap/wildfly-webservices-server-integration

@Override
public String getHostAlias(String hostname) {
  ServerHostInfo hostInfo = new ServerHostInfo(hostname);
  Host undertowHost = getUndertowHost(hostInfo);
  if (undertowHost!= null && !undertowHost.getAllAliases().isEmpty()) {
    for (String alias : undertowHost.getAllAliases()) {
      if (undertowHost.getAllAliases().size() == 1 || !alias.equals(undertowHost.getName())) {
        return alias;
      }
    }
  }
  return null;
}

代码示例来源:origin: org.jboss.eap/wildfly-undertow

@Override
public void stop(final StopContext stopContext) {
  final Host host = hostInjector.getValue();
  UndertowLogger.ROOT_LOGGER.debugf("Stopping console redirect for %s", host.getName());
  host.unregisterHandler(CONSOLE_PATH);
}

代码示例来源:origin: org.wildfly/wildfly-undertow

@Override
public void stop(final StopContext stopContext) {
  final Host host = hostInjector.getValue();
  UndertowLogger.ROOT_LOGGER.debugf("Stopping console redirect for %s", host.getName());
  host.unregisterHandler(CONSOLE_PATH);
}

代码示例来源:origin: org.wildfly/wildfly-undertow

protected void registerHost(final Host host) {
  hosts.add(host);
  for (String hostName : host.getAllAliases()) {
    virtualHostHandler.addHost(hostName, host.getRootHandler());
  }
  if (host.getName().equals(getDefaultHost())) {
    virtualHostHandler.setDefaultHandler(host.getRootHandler());
  }
}

代码示例来源:origin: org.jboss.eap/wildfly-undertow

protected void registerHost(final Host host) {
  hosts.add(host);
  for (String hostName : host.getAllAliases()) {
    virtualHostHandler.addHost(hostName, host.getRootHandler());
  }
  if (host.getName().equals(getDefaultHost())) {
    virtualHostHandler.setDefaultHandler(host.getRootHandler());
  }
}

代码示例来源:origin: org.jboss.eap/wildfly-undertow

@Override
public void start(StartContext context) throws StartException {
  RequestController rq = requestControllerInjectedValue.getOptionalValue();
  if(rq != null) {
    controlPoint = rq.getControlPoint("", "org.wildfly.undertow.webhost." + server.getValue().getName() + "." + host.getValue().getName());
  }
}

代码示例来源:origin: org.wildfly/wildfly-undertow

@Override
public void start(StartContext context) throws StartException {
  RequestController rq = requestControllerInjectedValue.getOptionalValue();
  if(rq != null) {
    controlPoint = rq.getControlPoint("", "org.wildfly.undertow.webhost." + server.getValue().getName() + "." + host.getValue().getName());
  }
}

相关文章