Package com.microsoft.azure.servicebus
Class ClientSettings
- java.lang.Object
-
- com.microsoft.azure.servicebus.ClientSettings
-
public class ClientSettings extends Object
Class encapsulating common client level settings like TokenProvider, RetryPolicy, OperationTimeout.- Since:
- 1.2.0
-
-
Constructor Summary
Constructors Constructor Description ClientSettings(TokenProvider tokenProvider)
Creates a new instance with the given token provider, default retry policy and default operation timeout.ClientSettings(TokenProvider tokenProvider, RetryPolicy retryPolicy, Duration operationTimeout)
Creates a new instance with the given token provider, retry policy and operation timeout.ClientSettings(TokenProvider tokenProvider, RetryPolicy retryPolicy, Duration operationTimeout, TransportType transportType)
Creates a new instance with the given token provider, retry policy and operation timeout.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Duration
getOperationTimeout()
Gets the operation timeout contained in this instance.RetryPolicy
getRetryPolicy()
Gets the retry policy contained in this instance.TokenProvider
getTokenProvider()
Gets the token provider contained in this instance.TransportType
getTransportType()
Gets the transport type for this instance
-
-
-
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
instanceretryPolicy
-RetryPolicy
instanceoperationTimeout
- 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
instanceretryPolicy
-RetryPolicy
instanceoperationTimeout
- 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
-
-