os.write(HmuxRequest.HMUX_CHANNEL);
os.write(channel >> 8);
os.write(channel);
Host host = _server.getHost(hostName, 80);
if (host == null) {
HostController controller = _server.getHostController(hostName, 80);
if (controller != null) {
writeString(os, HMUX_UNAVAILABLE, "");
}
else {
writeString(os, HmuxRequest.HMUX_HEADER, "check-interval");
writeString(os, HmuxRequest.HMUX_STRING,
String.valueOf(_server.getDependencyCheckInterval() / 1000));
}
if (isLoggable)
log.fine(dbgId() + "host '" + hostName + "' not configured");
return;
}
else if (! host.getState().isActive()) {
writeString(os, HMUX_UNAVAILABLE, "");
if (isLoggable)
log.fine(dbgId() + "host '" + host + "' not active");
return;
}
if (host.getConfigETag() == null)
sendQuery(null, host, hostName, url);
if (etag == null) {
}
else if (etag.equals(host.getConfigETag())) {
if (isLoggable)
log.fine(dbgId() + "host '" + host + "' no change");
writeString(os, HMUX_NO_CHANGE, "");
return;
}
else if (etag.equals("h-" + host.getName())) {
if (isLoggable) {
log.fine(dbgId() + "host alias '" + hostName + " -> '"
+ host + "' no change");
}