Class HTTPContextData

java.lang.Object
org.deltava.beans.system.HTTPContextData
All Implemented Interfaces:
Serializable

public class HTTPContextData extends Object implements Serializable
A bean to store data about the current HTTP request.
Since:
3.7
Version:
11.6
Author:
Luke
See Also:
  • Constructor Details

    • HTTPContextData

      public HTTPContextData(OperatingSystem os, BrowserType browser, DeviceType dev)
      Creates the context data.
      Parameters:
      os - the client OperatingSystem
      browser - the client browser type
      dev - the device type
  • Method Details

    • getOperatingSystem

      public OperatingSystem getOperatingSystem()
      Returns the client operating system.
      Returns:
      an OperatingSystem enum
    • getBrowserType

      public BrowserType getBrowserType()
      Returns the client browser type.
      Returns:
      a BrowserType enum
    • getDeviceType

      public DeviceType getDeviceType()
      Rerturns the device type.
      Returns:
      a DeviceType enum
    • 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 number
      minor - 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.