Class Controller.Builder

java.lang.Object
com.yourkit.api.controller.v2.Controller.Builder
Enclosing class:
Controller

public static final class Controller.Builder extends Object
  • Method Details

    • self

      public Controller.Builder self()
      Creates a controller for profiling the current application, i.e., the JVM running the code that invokes this method.

      The application must either be started with the profiler agent, or the profiler agent must be attached to the JVM at runtime.

    • host

      @NotNull public Controller.Builder host(@NotNull String host)
      Parameters:
      host - Host name or IP address of the host where the profiled application is running.
    • port

      @NotNull public Controller.Builder port(int port)
      Parameters:
      port - The port profiler agent listens on. Must be in range 1-65535.
    • reverseProxyPath

      @NotNull public Controller.Builder reverseProxyPath(@Nullable String path)
      Parameters:
      path - Optional reverse HTTP proxy path. If the agent runs behind the reverse HTTP proxy, and proxy passes /my_path/* requests to agent's port, then the path parameter should be /my_path/.
    • connectTimeout

      @NotNull public Controller.Builder connectTimeout(int ms)
      Parameters:
      ms - Socket connect timeout in milliseconds before SocketTimeoutException is thrown. The default value is 0, which is interpreted as an infinite timeout.
    • readTimeout

      @NotNull public Controller.Builder readTimeout(int ms)
      Parameters:
      ms - Socket read timeout in milliseconds before SocketTimeoutException is thrown. The default value is 0, which is interpreted as an infinite timeout.
    • trustAllSslCertificates

      @NotNull public Controller.Builder trustAllSslCertificates(boolean trust)
      Parameters:
      trust - Whether all SSL certificates should be trusted. The default value is TRUE. If you do not want to trust all the certificates, set FALSE and configure Java KeyStore (JKS).
    • build

      @NotNull public Controller build()
      Returns:
      New connected Controller instance.
      Throws:
      RuntimeException - If controller cannot be created.