共用方式為


ServiceClient Class

  • java.lang.Object
    • com.microsoft.azure.storage.ServiceClient

public class ServiceClient

Provides a client for accessing the Microsoft Azure Storage service.

Field Summary

Modifier and Type Field and Description
StorageCredentials credentials

Holds the StorageCredentials associated with this Service Client.

Constructor Summary

Constructor Description
ServiceClient(final StorageUri storageUri, final StorageCredentials credentials)

Creates an instance of the class using the specified service endpoint and account credentials.

Method Summary

Modifier and Type Method and Description
StorageRequest<ServiceClient, Void, ServiceProperties> downloadServicePropertiesImpl(final RequestOptions options, final boolean signAsTable)
final 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

final URI getEndpoint()

Returns the base URI for this service client.

StorageRequest<ServiceClient, Void, ServiceStats> getServiceStatsImpl(final RequestOptions options, final boolean signAsTable)
final StorageUri getStorageUri()

Returns the list of URIs for all locations.

boolean isUsePathStyleUris()
final void setCredentials(final StorageCredentials credentials)

Sets the credentials to use with this service client.

final void setStorageUri(final StorageUri storageUri)

Sets the list of URIs for all locations.

StorageRequest<ServiceClient, Void, Void> uploadServicePropertiesImpl(final ServiceProperties properties, final RequestOptions options, final OperationContext opContext, final boolean signAsTable)

Field Details

credentials

protected StorageCredentials credentials

Holds the StorageCredentials associated with this Service Client.

Constructor Details

ServiceClient

protected ServiceClient(final StorageUri storageUri, final StorageCredentials credentials)

Creates an instance of the class using the specified service endpoint and account credentials.

Parameters:

storageUri - A StorageUri object which represents the service endpoint used to create the client.
credentials - A StorageCredentials object which represents the account credentials.

Method Details

downloadServicePropertiesImpl

protected StorageRequest downloadServicePropertiesImpl(final RequestOptions options, final boolean signAsTable)

Parameters:

options
signAsTable

getCredentials

public final StorageCredentials getCredentials()

Returns the storage credentials associated with this service client.

Returns:

A StorageCredentials object which represents the storage credentials associated with this client.

getDefaultRequestOptions

public abstract RequestOptions getDefaultRequestOptions()

Gets the RequestOptions that is used for requests associated with this

Returns:

The RequestOptions object containing the values used by this ServiceClient

getEndpoint

public final URI getEndpoint()

Returns the base URI for this service client.

Returns:

A java.net.URI object which represents the base URI for the service client.

getServiceStatsImpl

protected StorageRequest getServiceStatsImpl(final RequestOptions options, final boolean signAsTable)

Parameters:

options
signAsTable

getStorageUri

public final StorageUri getStorageUri()

Returns the list of URIs for all locations.

Returns:

A StorageUri object which represents the list of URIs for all locations.

isUsePathStyleUris

protected boolean isUsePathStyleUris()

Returns:

true if path-style URIs are used; otherwise, false.

setCredentials

protected final void setCredentials(final StorageCredentials credentials)

Sets the credentials to use with this service client.

Parameters:

credentials - A StorageCredentials object which represents the credentials being assigned for the service client.

setStorageUri

protected final void setStorageUri(final StorageUri storageUri)

Sets the list of URIs for all locations.

Parameters:

storageUri - A StorageUri object which represents the list of URIs for all locations.

uploadServicePropertiesImpl

protected StorageRequest uploadServicePropertiesImpl(final ServiceProperties properties, final RequestOptions options, final OperationContext opContext, final boolean signAsTable)

Parameters:

properties
options
opContext
signAsTable

Applies to