use of org.wildfly.extension.undertow.UndertowListener in project wildfly by wildfly.
the class ServerConfigImpl method getVirtualHostPort.
@Override
public Integer getVirtualHostPort(String hostname, boolean securePort) {
ServerHostInfo hostInfo = new ServerHostInfo(hostname);
Host undertowHost = getUndertowHost(hostInfo);
if (undertowHost != null && !undertowHost.getServer().getListeners().isEmpty()) {
for (UndertowListener listener : undertowHost.getServer().getListeners()) {
if (listener.isSecure() == securePort) {
return listener.getSocketBinding().getAbsolutePort();
}
}
}
return null;
}
Aggregations