public abstract class ServiceClient extends Object
| Modifier and Type | Field and Description |
|---|---|
protected AuthenticationScheme |
authenticationScheme
Holds the AuthenticationScheme associated with this Service Client.
|
protected StorageCredentials |
credentials
Holds the StorageCredentials associated with this Service Client.
|
| Modifier | Constructor and Description |
|---|---|
protected |
ServiceClient(StorageUri storageUri,
StorageCredentials credentials)
Creates an instance of the
ServiceClient class using the specified service endpoint and account
credentials. |
| Modifier and Type | Method and Description |
|---|---|
protected StorageRequest<ServiceClient,Void,ServiceProperties> |
downloadServicePropertiesImpl(RequestOptions options,
boolean signAsTable) |
AuthenticationScheme |
getAuthenticationScheme()
Deprecated.
as of 2.0.0. In the future only SharedKeyFull will be used.
|
StorageCredentials |
getCredentials()
Returns the storage credentials associated with this service client.
|
abstract RequestOptions |
getDefaultRequestOptions()
Gets the
RequestOptions that is used for requests associated with this ServiceClient |
URI |
getEndpoint()
Returns the base URI for this service client.
|
LocationMode |
getLocationMode()
Deprecated.
use
#getDefaultRequestOptions().getLocationMode() instead. |
Integer |
getMaximumExecutionTimeInMs()
Deprecated.
use
#getDefaultRequestOptions().getMaximumExecutionTimeInMs() instead. |
RetryPolicyFactory |
getRetryPolicyFactory()
Deprecated.
use
#getDefaultRequestOptions().getRetryPolicyFactory() instead. |
protected StorageRequest<ServiceClient,Void,ServiceStats> |
getServiceStatsImpl(RequestOptions options,
boolean signAsTable) |
StorageUri |
getStorageUri()
Returns the list of URIs for all locations.
|
int |
getTimeoutInMs()
Deprecated.
use
#getDefaultRequestOptions().getTimeoutIntervalInMs() instead. |
protected boolean |
isUsePathStyleUris() |
void |
setAuthenticationScheme(AuthenticationScheme scheme)
Deprecated.
as of 2.0.0. In the future, only SharedKeyFull will be used.
|
protected void |
setCredentials(StorageCredentials credentials)
Sets the credentials to use with this service client.
|
void |
setLocationMode(LocationMode locationMode)
Deprecated.
use
#getDefaultRequestOptions().setLocationMode() instead. |
void |
setMaximumExecutionTimeInMs(Integer maximumExecutionTimeInMs)
Deprecated.
use
#getDefaultRequestOptions().setMaximumExecutionTimeInMs() instead. |
void |
setRetryPolicyFactory(RetryPolicyFactory retryPolicyFactory)
Deprecated.
use
#getDefaultRequestOptions().setRetryPolicyFactory() instead. |
protected void |
setStorageUri(StorageUri storageUri)
Sets the list of URIs for all locations.
|
void |
setTimeoutInMs(int timeoutInMs)
Deprecated.
use
#getDefaultRequestOptions().setTimeoutIntervalInMs() instead. |
protected StorageRequest<ServiceClient,Void,Void> |
uploadServicePropertiesImpl(ServiceProperties properties,
RequestOptions options,
OperationContext opContext,
boolean signAsTable) |
protected StorageCredentials credentials
protected AuthenticationScheme authenticationScheme
protected ServiceClient(StorageUri storageUri, StorageCredentials credentials)
ServiceClient class using the specified service endpoint and account
credentials.storageUri - A StorageUri object which represents the service endpoint used to create the client.credentials - A StorageCredentials object which represents the account credentials.protected StorageRequest<ServiceClient,Void,ServiceProperties> downloadServicePropertiesImpl(RequestOptions options, boolean signAsTable)
protected StorageRequest<ServiceClient,Void,ServiceStats> getServiceStatsImpl(RequestOptions options, boolean signAsTable)
public final StorageCredentials getCredentials()
StorageCredentials object which represents the storage credentials associated with this client.public final AuthenticationScheme getAuthenticationScheme()
AuthenticationScheme object which represents the authentication scheme associated with this
client.public final URI getEndpoint()
java.net.URI object which represents the base URI for the service client.public final StorageUri getStorageUri()
StorageUri object which represents the list of URIs for all locations.protected boolean isUsePathStyleUris()
true if path-style URIs are used; otherwise, false.protected final void setCredentials(StorageCredentials credentials)
credentials - A StorageCredentials object which represents the credentials being assigned for the service
client.protected final void setStorageUri(StorageUri storageUri)
storageUri - A StorageUri object which represents the list of URIs for all locations.public final void setAuthenticationScheme(AuthenticationScheme scheme)
scheme - An AuthenticationScheme object which represents the authentication scheme being assigned for
the service client.protected StorageRequest<ServiceClient,Void,Void> uploadServicePropertiesImpl(ServiceProperties properties, RequestOptions options, OperationContext opContext, boolean signAsTable) throws StorageException
StorageException@Deprecated public final LocationMode getLocationMode()
#getDefaultRequestOptions().getLocationMode() instead.LocationMode object which represents the default location mode for the service client.@Deprecated public final RetryPolicyFactory getRetryPolicyFactory()
#getDefaultRequestOptions().getRetryPolicyFactory() instead.RetryPolicyFactory object which represents the current retry policy.RetryPolicy,
RetryExponentialRetry,
RetryLinearRetry,
RetryNoRetry@Deprecated public final int getTimeoutInMs()
#getDefaultRequestOptions().getTimeoutIntervalInMs() instead.setTimeoutInMs(int).@Deprecated public Integer getMaximumExecutionTimeInMs()
#getDefaultRequestOptions().getMaximumExecutionTimeInMs() instead.setMaximumExecutionTimeInMs(Integer).@Deprecated public void setLocationMode(LocationMode locationMode)
#getDefaultRequestOptions().setLocationMode() instead.LocationMode for requests made via the service client.locationMode - the locationMode to set@Deprecated public void setRetryPolicyFactory(RetryPolicyFactory retryPolicyFactory)
#getDefaultRequestOptions().setRetryPolicyFactory() instead.retryPolicyFactory - the RetryPolicyFactory object to use when making service requests.@Deprecated public final void setTimeoutInMs(int timeoutInMs)
#getDefaultRequestOptions().setTimeoutIntervalInMs() instead.
The server timeout interval begins at the time that the complete request has been received by the service, and
the server begins processing the response. If the timeout interval elapses before the response is returned to the
client, the operation times out. The timeout interval resets with each retry, if the request is retried.
You can change this value on the service client by setting this property, so that all subsequent requests made
via the service client will use the new timeout interval. You can also change this value for an individual
request, by setting the RequestOptions.setTimeoutIntervalInMs(Integer) property.
timeoutInMs - The timeout, in milliseconds, to use when making requests to the storage service.@Deprecated public void setMaximumExecutionTimeInMs(Integer maximumExecutionTimeInMs)
#getDefaultRequestOptions().setMaximumExecutionTimeInMs() instead.
The maximum execution time interval begins at the time that the client begins building the request. The maximum
execution time is checked intermittently while uploading data, downloading data, and before executing retries.
The service will continue to upload, download, and retry until the maximum execution time is reached. At that
time, any partial uploads or downloads will be cancelled and an exception will be thrown.
The default maximum execution time is null, indicating no maximum time. You can change this value on the service
client by setting this property, so that all subsequent requests made via the service client will use the new
maximum execution time. You can also change this value for an individual request, by setting the
RequestOptions.setMaximumExecutionTimeInMs(Integer) property.
maximumExecutionTimeInMs - The maximum execution time, in milliseconds, to use when making service requests.public abstract RequestOptions getDefaultRequestOptions()
RequestOptions that is used for requests associated with this ServiceClientRequestOptions object containing the values used by this ServiceClient/**
* Copyright Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/