java.lang.Objectcom.cyscape.browserhawk.BrowserHawk
public class BrowserHawk
Class to locate and return appropriate BrowserInfo instances. Uses the factory pattern.
| Constructor Summary | |
|---|---|
BrowserHawk()
|
|
| Method Summary | |
|---|---|
static int |
compareVersions(java.lang.String first,
java.lang.String second)
Compares two version strings. |
static BrowserInfo |
getBrowserInfo(javax.servlet.http.HttpServletRequest req)
Gets information on the capabilities of a browser, based on the browser's HttpServletRequest. |
static BrowserInfo |
getBrowserInfo(java.lang.String userAgent)
Gets information on the capabilities of a browser, based on the browser's User-Agent HTTP header. |
static DashCacheStats |
getDashCacheStats()
Returns a DashCacheStats instance which can view the DashCache statistics including current and peak size, hit and miss counts, last clean time and total clean count, and more. |
static ExtendedBrowserInfo |
getExtendedBrowserInfo(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
ExtendedOptions options)
Returns information on browser properties which are determined through interaction with the client, or returns null if properties can't yet be determined and it has to send a page to test the client, in which case the calling servlet should end the response immediately. |
static ExtendedBrowserInfo |
getExtendedBrowserInfo(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
ExtendedOptions options,
PLTOptions pltOptions)
Returns information on browser properties which are determined through interaction with the client, or returns null if properties can't yet be determined and it has to send a page to test the client, in which case the calling servlet should end the response immediately. |
static ExtendedBrowserInfo |
getExtendedBrowserInfo(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
long pluginTypes)
Returns information on browser properties which are determined through interaction with the client, or returns null if properties can't yet be determined and it has to send a page to test the client, in which case the calling servlet should end the response immediately. |
static ExtendedBrowserInfo |
getExtendedBrowserInfo(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
long pluginTypes,
boolean keepReferer)
Returns information on browser properties which are determined through interaction with the client, or returns null if properties can't yet be determined and it has to send a page to test the client, in which case the calling servlet should end the response immediately. |
static ExtendedBrowserInfo |
getExtendedBrowserInfo(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
long pluginTypes,
boolean keepReferer,
java.lang.String bodyTag,
java.lang.String pageTitle,
java.lang.String pageMessage)
Returns information on browser properties which are determined through interaction with the client, or returns null if properties can't yet be determined and it has to send a page to test the client, in which case the calling servlet should end the response immediately. |
static java.lang.String |
getVersion()
Returns the BrowserHawk version and license version. |
static java.lang.String |
logData(BrowserInfo info,
ExtendedBrowserInfo einfo)
Creates and returns an IMG tag that when sent to the client will cause the client to access a logging server for the purpose of logging statistics to a database. |
static java.lang.String |
logData(BrowserInfo info,
ExtendedBrowserInfo einfo,
LogOptions logOptions,
javax.servlet.http.HttpServletRequest req)
|
static java.lang.String |
logData(BrowserInfo info,
ExtendedBrowserInfo einfo,
java.lang.String propertiesToLog)
Creates and returns an IMG tag that when sent to the client will cause the client to access a logging server for the purpose of logging statistics to a database. |
static java.lang.String |
logData(BrowserInfo info,
ExtendedBrowserInfo einfo,
java.lang.String propertiesToLog,
java.lang.String bhud,
java.lang.String bhu2,
java.lang.String bhu3)
Creates and returns an IMG tag that when sent to the client will cause the client to access a logging server for the purpose of logging statistics to a database. |
static java.lang.String |
logData(BrowserInfo info,
ExtendedBrowserInfo einfo,
java.lang.String propertiesToLog,
java.lang.String bhud,
java.lang.String bhu2,
java.lang.String bhu3,
java.lang.String bhu4,
java.lang.String bhu5)
Creates and returns an IMG tag that when sent to the client will cause the client to access a logging server for the purpose of logging statistics to a database. |
static java.lang.String |
pltHead(javax.servlet.http.HttpServletRequest req,
PLTOptions pltOptions)
Returns a JavaScript block (which should be inserted in the page's head section) in order to perform page load time detection. |
static java.lang.String |
toXML(BrowserInfo info,
ExtendedBrowserInfo einfo)
Returns an XML representation of all the BrowserInfo properties and their associated values, plus all the tested extended properties and their associated values for the ExtendedBrowserInfo. |
static java.lang.String |
toXML(BrowserInfo info,
ExtendedBrowserInfo einfo,
java.util.Properties props)
Returns an XML representation of all the BrowserInfo properties and their associated values, plus all the tested extended properties and their associated values for the ExtendedBrowserInfo. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BrowserHawk()
| Method Detail |
|---|
public static java.lang.String getVersion()
public static BrowserInfo getBrowserInfo(javax.servlet.http.HttpServletRequest req)
throws BrowserHawkException
req - The servlet request made by the browser
BrowserHawkException
public static BrowserInfo getBrowserInfo(java.lang.String userAgent)
throws BrowserHawkException
userAgent - A browser's User-Agent HTTP header
BrowserHawkException
public static ExtendedBrowserInfo getExtendedBrowserInfo(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
long pluginTypes)
Requires BrowserHawk Professional or Enterprise Edition.
req - The servlet request made by the browserres - The servlet response going to the browserpluginTypes - Which plugins to detect, based on constants in
ExtendedBrowserInfo
public static ExtendedBrowserInfo getExtendedBrowserInfo(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
long pluginTypes,
boolean keepReferer)
Requires BrowserHawk Professional or Enterprise Edition.
req - The servlet request made by the browserres - The servlet response going to the browserpluginTypes - Which plugins to detect, based on constants in
ExtendedBrowserInfokeepReferer - Whether to make the original referer available as a
bhref parameter
public static ExtendedBrowserInfo getExtendedBrowserInfo(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
long pluginTypes,
boolean keepReferer,
java.lang.String bodyTag,
java.lang.String pageTitle,
java.lang.String pageMessage)
Requires BrowserHawk Professional or Enterprise Edition.
req - The servlet request made by the browserres - The servlet response going to the browserpluginTypes - Which plugins to detect, based on constants in
ExtendedBrowserInfokeepReferer - Whether to make the original referer available as a
bhref parameterbodyTag - HTML to put in the JavaScript test page bodypageTitle - Title of the JavaScript test pagepageMessage - Text for the user to see in the JavaScript test page
public static ExtendedBrowserInfo getExtendedBrowserInfo(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
ExtendedOptions options)
Requires BrowserHawk Professional or Enterprise Edition.
req - The servlet request made by the browserres - The servlet response going to the browseroptions - The options on which properties to examine and other
settings
public static ExtendedBrowserInfo getExtendedBrowserInfo(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
ExtendedOptions options,
PLTOptions pltOptions)
Requires BrowserHawk Professional or Enterprise Edition.
req - The servlet request made by the browserres - The servlet response going to the browseroptions - The options on which properties to examine and other
settingspltOptions - The PLTOptions containing the preferences and options
to be used for the page load time test
public static java.lang.String logData(BrowserInfo info,
ExtendedBrowserInfo einfo)
Requires BrowserHawk Enterprise Edition.
info - The BrowserInfo data, requiredeinfo - The ExtendedBrowserInfo data, if any
public static java.lang.String logData(BrowserInfo info,
ExtendedBrowserInfo einfo,
java.lang.String propertiesToLog)
Requires BrowserHawk Enterprise Edition.
info - The BrowserInfo data, requiredeinfo - The ExtendedBrowserInfo data, if anypropertiesToLog - The properties to be logged; if null the default
from browserhawk.properties is used
public static java.lang.String logData(BrowserInfo info,
ExtendedBrowserInfo einfo,
java.lang.String propertiesToLog,
java.lang.String bhud,
java.lang.String bhu2,
java.lang.String bhu3)
Requires BrowserHawk Enterprise Edition.
info - The BrowserInfo data, requiredeinfo - The ExtendedBrowserInfo data, if anypropertiesToLog - The properties to be logged; if null the default
from browserhawk.properties is usedbhud - A user-defined value to be stored as the "bhud" property;
if null then no value is enteredbhu2 - A user-defined value to be stored as the "bhu2" property;
if null then no value is enteredbhu3 - A user-defined value to be stored as the "bhu3" property;
if null then no value is entered
public static java.lang.String logData(BrowserInfo info,
ExtendedBrowserInfo einfo,
java.lang.String propertiesToLog,
java.lang.String bhud,
java.lang.String bhu2,
java.lang.String bhu3,
java.lang.String bhu4,
java.lang.String bhu5)
Requires BrowserHawk Enterprise Edition.
info - The BrowserInfo data, requiredeinfo - The ExtendedBrowserInfo data, if anypropertiesToLog - The properties to be logged; if null the default
from browserhawk.properties is usedbhud - A user-defined value to be stored as the "bhud" property;
if null then no value is enteredbhu2 - A user-defined value to be stored as the "bhu2" property;
if null then no value is enteredbhu3 - A user-defined value to be stored as the "bhu3" property;
if null then no value is enteredbhu4 - A user-defined value to be stored as the "bhu4" property;
if null then no value is enteredbhu5 - A user-defined value to be stored as the "bhu5" property;
if null then no value is entered
public static java.lang.String logData(BrowserInfo info,
ExtendedBrowserInfo einfo,
LogOptions logOptions,
javax.servlet.http.HttpServletRequest req)
public static DashCacheStats getDashCacheStats()
The DashCache feature is available only in BrowserHawk Professional and Enterprise Editions.
public static int compareVersions(java.lang.String first,
java.lang.String second)
public static java.lang.String toXML(BrowserInfo info,
ExtendedBrowserInfo einfo)
BrowserInfo.toXML(), ExtendedBrowserInfo.toXML(),
and toXML(BrowserInfo, ExtendedBrowserInfo, Properties).)
public static java.lang.String toXML(BrowserInfo info,
ExtendedBrowserInfo einfo,
java.util.Properties props)
BrowserInfo.toXML(), ExtendedBrowserInfo.toXML(),
and toXML(BrowserInfo, ExtendedBrowserInfo, Properties).)
public static java.lang.String pltHead(javax.servlet.http.HttpServletRequest req,
PLTOptions pltOptions)
Requires BrowserHawk Enterprise Edition.
req - The servlet request made by the browserpltOptions - The PLTOptions containing the preferences and options
to be used for the page load time test