Package com.batch.android
Class ImageDownloadWebservice
- java.lang.Object
-
- com.batch.android.core.Webservice
-
- com.batch.android.ImageDownloadWebservice
-
public class ImageDownloadWebservice extends Webservice
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.batch.android.core.Webservice
Webservice.RequestType, Webservice.WebserviceError
-
-
Field Summary
-
Fields inherited from class com.batch.android.core.Webservice
applicationContext, headers, isDowngradedCipher
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedImageDownloadWebservice(android.content.Context context, java.lang.String imageURL, java.util.List<java.lang.Double> availableDensities)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.StringbuildImageURL(android.content.Context context, java.lang.String imageURL, java.util.List<java.lang.Double> availableDensities)Build image url based on the device density and available onesprotected java.lang.StringgetCryptorModeParameterKey()Return the parameter key for the cryptor modeprotected java.lang.StringgetCryptorTypeParameterKey()Return the type of the get cryptor wanted for this webserviceprotected java.lang.StringgetPostCryptorTypeParameterKey()Return the type of the post cryptor wanted for this webserviceprotected PostDataProvider<?>getPostDataProvider()Return the POST body you want to add to the requestprotected java.lang.StringgetReadCryptorTypeParameterKey()Return the type of the read cryptor wanted for this webserviceprotected java.lang.StringgetSpecificConnectTimeoutKey()Return theParameterskey to search specific connect timeout for this webserviceprotected java.lang.StringgetSpecificReadTimeoutKey()Return theParameterskey to search specific read timeout for this webserviceprotected java.lang.StringgetSpecificRetryCountKey()Return theParameterskey to search specific number of retry for this webserviceprotected java.lang.StringgetURLSorterPatternParameterKey()Return the parameter key to get the URL sorter patternandroid.graphics.Bitmaprun()-
Methods inherited from class com.batch.android.core.Webservice
addBatchApiKey, addDefaultHeaders, addDefaultParameters, addGetParameter, addHeaders, addParameters, addRequestSignatures, buildConnection, buildParameters, buildURL, canBypassOptOut, encode, executeRequest, formatDate, getBasicJsonResponseBody, getHeaders, getParameters, getResponseErrorCause, getSignatureBody, getStandardResponseBodyIfValid, isResponseValid, onRetry
-
-
-
-
Method Detail
-
buildImageURL
public static java.lang.String buildImageURL(android.content.Context context, java.lang.String imageURL, java.util.List<java.lang.Double> availableDensities)Build image url based on the device density and available ones- Parameters:
context-imageURL-availableDensities-- Returns:
-
run
public android.graphics.Bitmap run()
-
getPostDataProvider
protected PostDataProvider<?> getPostDataProvider()
Description copied from class:WebserviceReturn the POST body you want to add to the request- Specified by:
getPostDataProviderin classWebservice- Returns:
- the post data provider if any, null otherwise
-
getURLSorterPatternParameterKey
protected java.lang.String getURLSorterPatternParameterKey()
Description copied from class:WebserviceReturn the parameter key to get the URL sorter pattern- Specified by:
getURLSorterPatternParameterKeyin classWebservice- Returns:
- key of the parameter or null if no sortor is wanted
-
getCryptorTypeParameterKey
protected java.lang.String getCryptorTypeParameterKey()
Description copied from class:WebserviceReturn the type of the get cryptor wanted for this webservice- Specified by:
getCryptorTypeParameterKeyin classWebservice- Returns:
- type or null if no encryption is wanted
-
getCryptorModeParameterKey
protected java.lang.String getCryptorModeParameterKey()
Description copied from class:WebserviceReturn the parameter key for the cryptor mode- Specified by:
getCryptorModeParameterKeyin classWebservice- Returns:
- param key or null if no mode is provided (
URLBuilder.CryptorMode.ALLwill be used)
-
getPostCryptorTypeParameterKey
protected java.lang.String getPostCryptorTypeParameterKey()
Description copied from class:WebserviceReturn the type of the post cryptor wanted for this webservice- Specified by:
getPostCryptorTypeParameterKeyin classWebservice- Returns:
- type or null if no encryption is wanted
-
getReadCryptorTypeParameterKey
protected java.lang.String getReadCryptorTypeParameterKey()
Description copied from class:WebserviceReturn the type of the read cryptor wanted for this webservice- Specified by:
getReadCryptorTypeParameterKeyin classWebservice- Returns:
- type or null if no encryption is wanted
-
getSpecificConnectTimeoutKey
protected java.lang.String getSpecificConnectTimeoutKey()
Description copied from class:WebserviceReturn theParameterskey to search specific connect timeout for this webservice- Specified by:
getSpecificConnectTimeoutKeyin classWebservice- Returns:
- key if we need specific value, null otherwise
-
getSpecificReadTimeoutKey
protected java.lang.String getSpecificReadTimeoutKey()
Description copied from class:WebserviceReturn theParameterskey to search specific read timeout for this webservice- Specified by:
getSpecificReadTimeoutKeyin classWebservice- Returns:
- key if we need specific value, null otherwise
-
getSpecificRetryCountKey
protected java.lang.String getSpecificRetryCountKey()
Description copied from class:WebserviceReturn theParameterskey to search specific number of retry for this webservice- Specified by:
getSpecificRetryCountKeyin classWebservice- Returns:
- key if we need specific value, null otherwise
-
-