String resourceKey = createResourceKey(vhost.serverName, vhost.hosts);
String resourceName = resourceKey;
Configuration pluginConfiguration = context.getDefaultPluginConfiguration();
Address address =
serverComponent.getAddressUtility().getVirtualHostSampleAddress(tree, firstAddress, vhost.serverName,
false);
if (address != null) {
String scheme = address.scheme;
String hostToPing = address.host;
int portToPing = address.port;
if (address.isPortWildcard() || !address.isPortDefined()) {
Address serverAddress =
serverComponent.getAddressUtility().getMainServerSampleAddress(tree, hostToPing, 0);
if (serverAddress != null) {
portToPing = serverAddress.port;
} else {
portToPing = Address.PORT_WILDCARD_VALUE;
}
}
if (address.isHostDefault() || address.isHostWildcard()) {
Address serverAddress =
serverComponent.getAddressUtility().getMainServerSampleAddress(tree, null, portToPing);
if (serverAddress != null) {
hostToPing = serverAddress.host;
} else {