Module bus.http

Class Engine

java.lang.Object
org.miaixz.bus.http.metric.anget.UserAgent
org.miaixz.bus.http.metric.anget.Engine

public class Engine extends UserAgent
Represents a browser rendering engine, such as Trident, WebKit, or Gecko.
Since:
Java 17+
Author:
Kimi Liu
  • Field Details

    • UNKNOWN

      public static final Engine UNKNOWN
      Constant for an unknown engine.
    • ENGINES

      public static final List<Engine> ENGINES
      A list of supported engine types.
  • Constructor Details

    • Engine

      public Engine(String name, String rule)
      Constructs a new Engine instance.
      Parameters:
      name - The name of the engine.
      rule - The keyword or expression to match in the User-Agent string.
  • Method Details

    • getVersion

      public String getVersion(String userAgentString)
      Gets the version of the browser engine from a User-Agent string.
      Parameters:
      userAgentString - The User-Agent string.
      Returns:
      The version string, or null if not found.