Class ClientSettings


  • public class ClientSettings
    extends Object
    Class encapsulating common client level settings like TokenProvider, RetryPolicy, OperationTimeout.
    Since:
    1.2.0
    • Constructor Detail

      • ClientSettings

        public ClientSettings​(TokenProvider tokenProvider)
        Creates a new instance with the given token provider, default retry policy and default operation timeout.
        Parameters:
        tokenProvider - TokenProvider instance
        See Also:
        RetryPolicy.getDefault()
      • ClientSettings

        public ClientSettings​(TokenProvider tokenProvider,
                              RetryPolicy retryPolicy,
                              Duration operationTimeout)
        Creates a new instance with the given token provider, retry policy and operation timeout.
        Parameters:
        tokenProvider - TokenProvider instance
        retryPolicy - RetryPolicy instance
        operationTimeout - default operation timeout to be used for all client operations. Client can override this value by explicitly specifying a timeout in the operation.
      • ClientSettings

        public ClientSettings​(TokenProvider tokenProvider,
                              RetryPolicy retryPolicy,
                              Duration operationTimeout,
                              TransportType transportType)
        Creates a new instance with the given token provider, retry policy and operation timeout.
        Parameters:
        tokenProvider - TokenProvider instance
        retryPolicy - RetryPolicy instance
        operationTimeout - default operation timeout to be used for all client operations. Client can override this value by explicitly specifying a timeout in the operation.
        transportType - TransportType instance
    • Method Detail

      • getTokenProvider

        public TokenProvider getTokenProvider()
        Gets the token provider contained in this instance.
        Returns:
        TokenProvider contained in this instance
      • getRetryPolicy

        public RetryPolicy getRetryPolicy()
        Gets the retry policy contained in this instance.
        Returns:
        RetryPolicy contained in this instance
      • getOperationTimeout

        public Duration getOperationTimeout()
        Gets the operation timeout contained in this instance.
        Returns:
        operation timeout contained in this instance
      • getTransportType

        public TransportType getTransportType()
        Gets the transport type for this instance
        Returns:
        transport type for the instance