Class HttpClientSender.Builder

  • Enclosing class:
    HttpClientSender

    public static class HttpClientSender.Builder
    extends java.lang.Object
    Constructs the HttpClientSender.
    • Constructor Detail

      • Builder

        public Builder​(io.micronaut.http.client.HttpClientConfiguration clientConfiguration)
        Parameters:
        clientConfiguration - the HTTP client configuration
    • Method Detail

      • getServers

        public java.util.List<java.net.URI> getServers()
        Returns:
        the configured Zipkin servers
      • encoding

        public HttpClientSender.Builder encoding​(zipkin2.codec.Encoding encoding)
        The encoding to use. Defaults to Encoding.JSON
        Parameters:
        encoding - the encoding
        Returns:
        this
      • messageMaxBytes

        public HttpClientSender.Builder messageMaxBytes​(int messageMaxBytes)
        The message max bytes.
        Parameters:
        messageMaxBytes - the max bytes
        Returns:
        this
      • compressionEnabled

        public HttpClientSender.Builder compressionEnabled​(boolean compressionEnabled)
        Whether compression is enabled (defaults to true).
        Parameters:
        compressionEnabled - true if compression is enabled
        Returns:
        this
      • server

        public HttpClientSender.Builder server​(java.net.URI endpoint)
        The endpoint to use.
        Parameters:
        endpoint - the fully qualified URI of the Zipkin endpoint
        Returns:
        this
      • url

        public HttpClientSender.Builder url​(java.net.URI endpoint)
        The endpoint to use.
        Parameters:
        endpoint - the fully qualified URI of the Zipkin endpoint
        Returns:
        this
      • urls

        public HttpClientSender.Builder urls​(java.util.List<java.net.URI> urls)
        The endpoint to use.
        Parameters:
        urls - the Zipkin server URLs
        Returns:
        this
      • path

        public HttpClientSender.Builder path​(java.lang.String path)
        The path to use.
        Parameters:
        path - the path of the Zipkin endpoint
        Returns:
        this
      • invocationInstrumenterFactories

        public HttpClientSender.Builder invocationInstrumenterFactories​(java.util.List<io.micronaut.scheduling.instrument.InvocationInstrumenterFactory> factories)
        The invocation instrumenter factories to use.
        Parameters:
        factories - the factories to instrument HTTP client Netty handlers execution with
        Returns:
        this
      • build

        public HttpClientSender build​(jakarta.inject.Provider<io.micronaut.http.client.LoadBalancerResolver> loadBalancerResolver)
        Constructs a HttpClientSender.
        Parameters:
        loadBalancerResolver - resolver capable of resolving references to services into a concrete load-balancer
        Returns:
        the sender