|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.soyatec.windowsazure.proxy.AbstractProxyDelegate
org.soyatec.windowsazure.blob.BlobStorageClient
public abstract class BlobStorageClient
The entry point of the blob storage API
| Field Summary | |
|---|---|
static IRetryPolicy |
DefaultRetryPolicy
The default retry policy |
static org.soyatec.windowsazure.internal.util.TimeSpan |
DefaultTimeout
The default timeout |
| Method Summary | |
|---|---|
static BlobStorageClient |
create(boolean usePathStyleUris,
java.lang.String accountName,
java.lang.String base64key)
Convenient way to create a new BlobStorageClient. |
static BlobStorageClient |
create(StorageAccountInfo accountInfo)
Factory method for BlobStorageClient |
static BlobStorageClient |
create(java.net.URI baseUri,
boolean usePathStyleUris,
java.lang.String accountName,
java.lang.String base64Key)
Factory method for BlobStorageClient |
static IBlobContents |
createBlobContents(BlobStream stream)
Create a IBlobContents from BlobStream |
static IBlobContents |
createBlobContents(byte[] value)
Create a IBlobContents from direct values |
static IBlobContents |
createBlobContents(java.io.File file)
Create a IBlobContents from File |
static IBlobContents |
createBlobContents(java.io.InputStream stream)
Create a IBlobContents from InputStream |
static IBlobProperties |
createBlobProperties(java.lang.String blobName)
Create a IBlobProperties for given Blob name |
abstract IBlobContainer |
createContainer(java.lang.String containerName)
Create the container if it does not exist. |
abstract IBlobContainer |
createContainer(java.lang.String containerName,
org.soyatec.windowsazure.internal.util.NameValueCollection metadata,
IContainerAccessControl accessControl)
Create the container with the specified metadata and access control if it does not exist. |
abstract ISharedAccessUrl |
createSharedAccessUrl(java.lang.String containerName,
java.lang.String blobName,
ResourceType resource,
int permissions,
DateTime start,
DateTime expiry,
java.lang.String identifier)
Create a SharedAccessUrl |
abstract boolean |
deleteContainer(java.lang.String name)
Deletes the container. |
java.lang.String |
getAccountName()
|
java.lang.String |
getBase64Key()
|
java.net.URI |
getBaseUri()
|
abstract IBlobContainer |
getBlobContainer(java.lang.String containerName)
Get a reference to a newly created BlobContainer object. |
abstract java.lang.String |
getLastStatus()
|
IRetryPolicy |
getRetryPolicy()
|
org.soyatec.windowsazure.internal.util.TimeSpan |
getTimeout()
|
abstract boolean |
isContainerExist(java.lang.String containerName)
Check if the blob container exists |
boolean |
isUsePathStyleUris()
Indicates whether to use/generate path-style or host-style URIs. |
abstract java.util.List<IBlobContainer> |
listBlobContainers()
Lists the containers within the account. |
void |
setBase64Key(java.lang.String base64Key)
|
void |
setRetryPolicy(IRetryPolicy retryPolicy)
|
void |
setTimeout(org.soyatec.windowsazure.internal.util.TimeSpan timeout)
|
| Methods inherited from class org.soyatec.windowsazure.proxy.AbstractProxyDelegate |
|---|
disableProxy, isProxyEnabled, setProxyConfiguration |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final org.soyatec.windowsazure.internal.util.TimeSpan DefaultTimeout
public static final IRetryPolicy DefaultRetryPolicy
| Method Detail |
|---|
public static BlobStorageClient create(java.net.URI baseUri,
boolean usePathStyleUris,
java.lang.String accountName,
java.lang.String base64Key)
baseUri - The base URI of the blob storage serviceusePathStyleUris - If true, path-style URIs
(http://baseuri/accountname/containername/objectname) are
used. If false host-style URIs
(http://accountname.baseuri/containername/objectname) are
used, where baseuri is the URI of the service. If null, the
choice is made automatically: path-style URIs if host name
part of base URI is an IP addres, host-style otherwise.accountName - The name of the storage accountbase64Key - Authentication key used for signing requests
public static BlobStorageClient create(boolean usePathStyleUris,
java.lang.String accountName,
java.lang.String base64key)
usePathStyleUris - If true, path-style URIs
(http://baseuri/accountname/containername/objectname) are
used. If false host-style URIs
(http://accountname.baseuri/containername/objectname) are
used, where baseuri is the URI of the service. If null, the
choice is made automatically: path-style URIs if host name
part of base URI is an IP addres, host-style otherwise.accountName - The name of the storage accountbase64key - Authentication key used for signing requests
public static BlobStorageClient create(StorageAccountInfo accountInfo)
accountInfo - Account information
public static IBlobProperties createBlobProperties(java.lang.String blobName)
blobName - The name of the BLOB.
public static IBlobContents createBlobContents(java.io.File file)
throws java.io.IOException
file -
java.io.IOExceptionpublic static IBlobContents createBlobContents(byte[] value)
value - A byte array.
java.io.IOException
public static IBlobContents createBlobContents(java.io.InputStream stream)
throws java.io.IOException
stream - inputStream.
java.io.IOExceptionpublic static IBlobContents createBlobContents(BlobStream stream)
stream - blobStream
java.io.IOException
public abstract boolean isContainerExist(java.lang.String containerName)
throws StorageException
containerName - of the BLOB.
StorageException
public abstract IBlobContainer createContainer(java.lang.String containerName,
org.soyatec.windowsazure.internal.util.NameValueCollection metadata,
IContainerAccessControl accessControl)
throws StorageException
containerName - The name of the containermetadata - The metadata for the container. Can be null to indicate no
metadataaccessControl - The access control (public or private) with which to create
the container
StorageException - If container already exists, it will raise exception.
public abstract IBlobContainer createContainer(java.lang.String containerName)
throws StorageException
StorageException - If container already exists, it will raise exception.public abstract IBlobContainer getBlobContainer(java.lang.String containerName)
containerName - The name of the container
public abstract java.util.List<IBlobContainer> listBlobContainers()
throws StorageServerException
java.lang.Exception
StorageServerException
public abstract ISharedAccessUrl createSharedAccessUrl(java.lang.String containerName,
java.lang.String blobName,
ResourceType resource,
int permissions,
DateTime start,
DateTime expiry,
java.lang.String identifier)
throws StorageServerException
containerName - The name of container.blobName - The name of Bolb.resource - The resource type.permissions - ONE = 0;READ = 1;WRITE = 2;DELETE = 4;LIST = 8start - The start time.expiry - The expiry time.identifier - The identifier of SharedAccessUrl.
StorageServerException
public abstract boolean deleteContainer(java.lang.String name)
throws StorageException
StorageExceptionpublic boolean isUsePathStyleUris()
public java.net.URI getBaseUri()
public java.lang.String getAccountName()
public java.lang.String getBase64Key()
public org.soyatec.windowsazure.internal.util.TimeSpan getTimeout()
public IRetryPolicy getRetryPolicy()
public void setBase64Key(java.lang.String base64Key)
base64Key - Authentication key used for signing requestspublic void setTimeout(org.soyatec.windowsazure.internal.util.TimeSpan timeout)
timeout - The time out for each request to the storage service.public void setRetryPolicy(IRetryPolicy retryPolicy)
retryPolicy - The retry policy used for retrying requests.public abstract java.lang.String getLastStatus()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||