Class HTTPContextData
java.lang.Object
org.deltava.beans.system.HTTPContextData
- All Implemented Interfaces:
Serializable
A bean to store data about the current HTTP request.
- Since:
- 3.7
- Version:
- 11.6
- Author:
- Luke
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionHTTPContextData(OperatingSystem os, BrowserType browser, DeviceType dev) Creates the context data. -
Method Summary
Modifier and TypeMethodDescriptionvoidOverrides whether the browser is a Spider.Returns the client browser type.Rerturns the device type.intgetMajor()Returns the browser major version number.intgetMinor()Returns the browser minor version number.Returns the client operating system.booleanisHTML5()Returns whether the client browser has sufficient HTML5 support.booleanisHTTP2()Returns whether the request was made using HTTP/2.booleanisIPv6()Returns whether the request was made using IPv6.voidsetHTML5(boolean hasHTML5) Sets whether the client browser has sufficient HTML5 support.voidsetHTTP2(boolean isHTTP2) Sets whether this request is served via HTTP/2.voidsetIPv6(boolean isIPv6) Sets whether the request is made using IPv6.voidsetVersion(int major, int minor) Sets the browser version.
-
Constructor Details
-
HTTPContextData
Creates the context data.- Parameters:
os- the client OperatingSystembrowser- the client browser typedev- the device type
-
-
Method Details
-
getOperatingSystem
Returns the client operating system.- Returns:
- an OperatingSystem enum
-
getBrowserType
-
getDeviceType
-
getMajor
public int getMajor()Returns the browser major version number.- Returns:
- the major version
-
getMinor
public int getMinor()Returns the browser minor version number.- Returns:
- the minor version
-
isHTML5
public boolean isHTML5()Returns whether the client browser has sufficient HTML5 support.- Returns:
- TRUE if full HTML5 support, otherwise FALSE
-
isIPv6
public boolean isIPv6()Returns whether the request was made using IPv6.- Returns:
- TRUE if using IPv6, otherwise FALSE
-
isHTTP2
public boolean isHTTP2()Returns whether the request was made using HTTP/2.- Returns:
- TRUE if using HTTP/2, otherwise FALSE
-
setHTML5
public void setHTML5(boolean hasHTML5) Sets whether the client browser has sufficient HTML5 support.- Parameters:
hasHTML5- TRUE if full HTML5 support, otherwise FALSE
-
setIPv6
public void setIPv6(boolean isIPv6) Sets whether the request is made using IPv6.- Parameters:
isIPv6- TRUE if using IPv6, otherwise FALSE
-
setVersion
public void setVersion(int major, int minor) Sets the browser version.- Parameters:
major- the major version numberminor- the minor version number
-
setHTTP2
public void setHTTP2(boolean isHTTP2) Sets whether this request is served via HTTP/2.- Parameters:
isHTTP2- TRUE if using HTTP/2, otherwise FALSE
-
forceSpider
public void forceSpider()Overrides whether the browser is a Spider.
-