StorageRequest<C,P,R> Class
- java.
lang. Object - com.
microsoft. azure. storage. core. StorageRequest<C,P,R>
- com.
Type Parameters
- C
The service client type
- P
The type of the parent object, i.e. CloudBlobContainer for downloadAttributes etc.
- R
The type of the expected result
public class StorageRequest<C,P,R>
RESERVED FOR INTERNAL USE. A class which encapsulate the execution of a given storage operation.
Constructor Summary
Constructor | Description |
---|---|
StorageRequest() |
Default Ctor. |
StorageRequest(final RequestOptions options, StorageUri storageUri) |
Initializes a new instance of the StorageRequest class. |
Method Summary
Constructor Details
StorageRequest
protected StorageRequest()
Default Ctor.
StorageRequest
public StorageRequest(final RequestOptions options, StorageUri storageUri)
Initializes a new instance of the StorageRequest class.
Parameters:
Method Details
applyLocationModeToRequest
public void applyLocationModeToRequest()
buildRequest
public abstract HttpURLConnection buildRequest(C client, P parentObject, OperationContext context)
Function to construct the request.
Parameters:
Returns:
Throws:
getArePropertiesPopulated
public boolean getArePropertiesPopulated()
Returns:
getConnection
public final HttpURLConnection getConnection()
Returns:
getContentMD5
public final String getContentMD5()
Returns:
getCurrentDescriptor
protected StreamMd5AndLength getCurrentDescriptor()
Returns:
getCurrentLocation
public StorageLocation getCurrentLocation()
Returns:
getCurrentRequestByteCount
public long getCurrentRequestByteCount()
Returns:
getETagLockCondition
public AccessCondition getETagLockCondition()
Returns:
getException
public final StorageException getException()
Returns:
getLength
public Long getLength()
Returns:
getLocationMode
public LocationMode getLocationMode()
Returns:
getLockedETag
public final String getLockedETag()
Returns:
getOffset
public Long getOffset()
Returns:
getRequestLocationMode
public RequestLocationMode getRequestLocationMode()
Returns:
getRequestOptions
public final RequestOptions getRequestOptions()
Returns:
getResult
public final RequestResult getResult()
Returns:
getSendStream
public final InputStream getSendStream()
Returns:
getStorageUri
public StorageUri getStorageUri()
Returns:
initialize
protected final void initialize(OperationContext opContext)
Resets the operation status flags between operations.
Parameters:
initializeLocation
public void initializeLocation()
isNonExceptionedRetryableFailure
public final boolean isNonExceptionedRetryableFailure()
Returns:
isSent
protected boolean isSent()
Returns:
materializeException
protected final StorageException materializeException(final OperationContext opContext)
Returns either the held exception from the operation if it is set, otherwise the translated exception.
Parameters:
Returns:
parseErrorDetails
public StorageExtendedErrorInformation parseErrorDetails()
Returns extended error information for this request.
Returns:
postProcessResponse
public R postProcessResponse(HttpURLConnection connection, P parentObject, C client, OperationContext context, R storageObject)
Post-Stream Retrieval function.
Parameters:
Returns:
Throws:
preProcessResponse
public abstract R preProcessResponse(P parentObject, C client, OperationContext context)
Pre-Stream Retrieval function.
Parameters:
Returns:
Throws:
recoveryAction
public void recoveryAction(OperationContext context)
Recovery action for retries.
Parameters:
Throws:
setArePropertiesPopulated
public void setArePropertiesPopulated(boolean arePropertiesPopulated)
Parameters:
setConnection
public final void setConnection(final HttpURLConnection connection)
Parameters:
setContentMD5
public void setContentMD5(String contentMD5)
Parameters:
setCurrentDescriptor
protected void setCurrentDescriptor(StreamMd5AndLength currentDescriptor)
Parameters:
setCurrentLocation
public void setCurrentLocation(StorageLocation currentLocation)
Parameters:
setCurrentRequestByteCount
public void setCurrentRequestByteCount(long currentRequestByteCount)
Parameters:
setETagLockCondition
public void setETagLockCondition(AccessCondition etagLockCondition)
Parameters:
setException
protected final void setException(final StorageException exceptionReference)
Parameters:
setHeaders
public void setHeaders(HttpURLConnection connection, P parentObject, OperationContext context)
Function to set custom headers.
Parameters:
setIsSent
protected void setIsSent(boolean isSent)
Parameters:
setLength
public void setLength(Long length)
Parameters:
setLocationMode
public void setLocationMode(LocationMode locationMode)
Parameters:
setLockedETag
public void setLockedETag(String lockedETag)
Parameters:
setNonExceptionedRetryableFailure
public final void setNonExceptionedRetryableFailure(final boolean nonExceptionedRetryableFailure)
Parameters:
setOffset
public void setOffset(Long offset)
Parameters:
setRequestLocationMode
public void setRequestLocationMode()
Function to apply the location mode to the request.
setRequestLocationMode
public void setRequestLocationMode(RequestLocationMode requestLocationMode)
Parameters:
setRequestOptions
protected final void setRequestOptions(final RequestOptions requestOptions)
Parameters:
setResult
public final void setResult(final RequestResult result)
Parameters:
setSendStream
public void setSendStream(InputStream sendStream)
Parameters:
setStorageUri
public void setStorageUri(StorageUri storageUri)
Parameters:
signBlobQueueAndFileRequest
public static final String signBlobQueueAndFileRequest(HttpURLConnection request, ServiceClient client, long contentLength, OperationContext context)
Parameters:
signRequest
public abstract void signRequest(HttpURLConnection connection, C client, OperationContext context)
Function to Sign headers.
Parameters:
Throws:
signTableRequest
public static final void signTableRequest(HttpURLConnection request, ServiceClient client, long contentLength, OperationContext context)
Parameters:
validateLocation
public void validateLocation()
validateStreamWrite
public void validateStreamWrite(StreamMd5AndLength descriptor)
Validate the written stream length when length is provided.
Parameters:
Throws:
Applies to
Azure SDK for Java