Class UserAgent.UserAgentBuilder

java.lang.Object
nva.commons.core.useragent.UserAgent.UserAgentBuilder
Enclosing class:
UserAgent

public static final class UserAgent.UserAgentBuilder extends Object
Allows the building of a valid UserAgent string.
  • Field Details

  • Method Details

    • client

      public UserAgent.UserAgentBuilder client(Class<?> aClass)
      The class that is calling, typically the Handler class that initiates the call.
      Parameters:
      aClass - The root caller class that initiates the call.
      Returns:
      UserAgentBuilder
    • version

      public UserAgent.UserAgentBuilder version(String version)
      The version of Handler class that initiates the call.
      Parameters:
      version - The version string.
      Returns:
      UserAgentBuilder
    • repository

      public UserAgent.UserAgentBuilder repository(URI uri)
      The repository for the code of the calling class.
      Parameters:
      uri - The URI of the repository.
      Returns:
      UserAgentBuilder
    • email

      public UserAgent.UserAgentBuilder email(String email)
      The contact email (typically support@somewhere) that recipients can contact in case of an issue.
      Parameters:
      email - The root caller class that initiates the call.
      Returns:
      UserAgentBuilder
    • environment

      public UserAgent.UserAgentBuilder environment(String environment)
      The environment that is calling, typically dev, test, sandbox, e2e or prod.
      Parameters:
      environment - The environment.
      Returns:
      UserAgentBuilder
    • build

      public UserAgent build()
      Builds the UserAgent.
      Returns:
      UserAgent.