Class SenderConfiguration.SenderConfigurationBuilder

  • Enclosing class:
    SenderConfiguration

    public static class SenderConfiguration.SenderConfigurationBuilder
    extends java.lang.Object
    • Constructor Detail

      • SenderConfigurationBuilder

        public SenderConfigurationBuilder​(java.lang.String defaultUrl,
                                          java.lang.String basePath)
    • Method Detail

      • endpointWithPath

        public SenderConfiguration.SenderConfigurationBuilder endpointWithPath​(java.net.URL endpointUrl)
        Configure the *full* endpoint URL for data to be sent to, including the path.
        Parameters:
        endpointUrl - A full URL, including the path.
        Returns:
        this builder.
      • endpoint

        public SenderConfiguration.SenderConfigurationBuilder endpoint​(java.lang.String scheme,
                                                                       java.lang.String host,
                                                                       int port)
                                                                throws java.net.MalformedURLException
        Configure the endpoint for data to be sent to. The default path will be used.
        Parameters:
        scheme - A valid URL scheme, such as "https"
        host - The host portion of the URL.
        port - The port portion of the URL.
        Returns:
        this builder.
        Throws:
        java.net.MalformedURLException - If a valid URL cannot be constructed from the pieces provided.
      • auditLoggingEnabled

        public SenderConfiguration.SenderConfigurationBuilder auditLoggingEnabled​(boolean auditLoggingEnabled)
        Configure whether audit logging is enabled. Note: audit logging will log all data payloads sent to New Relic at DEBUG level, in plain text.
        Returns:
        this builder.
      • secondaryUserAgent

        public SenderConfiguration.SenderConfigurationBuilder secondaryUserAgent​(java.lang.String secondaryUserAgent)
        Configure a secondary User-Agent value to use when sending data. This will be appended to the default User-Agent that the SDK sends, and is useful for monitoring various sources of data coming into the New Relic systems.
        Returns:
        this builder.
      • constructUrlWithHost

        public java.net.URL constructUrlWithHost​(java.net.URI hostUri)
                                          throws java.net.MalformedURLException
        Throws:
        java.net.MalformedURLException