Java Reference
In-Depth Information
{
if (this.currentHost.equalsIgnoreCase(host))
{
return this.currentHostID;
}
}
// use the database to find it
try
{
rs = this.stmtGetHostID.executeQuery(host);
if (rs.getResultSet().next())
{
return rs.getResultSet().getInt(1);
}
} finally
{
if (rs != null)
{
rs.close();
}
}
if (require)
{
StringBuilder str = new StringBuilder();
str.append("Failed to find previously visited Host,");
str.append("Host=\"");
str.append(this.url.toString());
str.append("\".");
throw (new WorkloadException(str.toString()));
} else
{
return -1;
}
}
/**
* Get the ID for the given host. The host name is
* extracted from the specified URL.
*
* @param url
* The URL that specifies the host name to
* lookup.
* @param require
* Should an exception be thrown if the host is
Search WWH ::




Custom Search