for (NetworkListener httpListener : httpListenerList) {
if (!Boolean.valueOf(httpListener.getEnabled())) {
continue;
}
final Protocol protocol = httpListener.findHttpProtocol();
final Http http = protocol.getHttp();
if (http.getDefaultVirtualServer().equals("__asadmin")){
continue;
}
if (Boolean.valueOf(protocol.getSecurityEnabled()) ==
securityEnabled) {
String serverName = http.getServerName();
if (serverName == null ||
serverName.trim().equals("")) {
serverName = getDefaultHostName();
}
String portStr = httpListener.getPort();
String redirPort = http.getRedirectPort();
if (redirPort != null &&
!redirPort.trim().equals("")) {
portStr = redirPort;
}
int port = Integer.parseInt(portStr);