Package com.pubnub.api.endpoints.files
Class DownloadFile
- java.lang.Object
-
- com.pubnub.api.endpoints.Endpoint<okhttp3.ResponseBody,PNDownloadFileResult>
-
- com.pubnub.api.endpoints.files.DownloadFile
-
- All Implemented Interfaces:
RemoteAction<PNDownloadFileResult>
public class DownloadFile extends Endpoint<okhttp3.ResponseBody,PNDownloadFileResult>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDownloadFile.Builder
-
Constructor Summary
Constructors Constructor Description DownloadFile(java.lang.String channel, java.lang.String fileName, java.lang.String fileId, PubNub pubnubInstance, TelemetryManager telemetry, RetrofitManager retrofitInstance, TokenManager tokenManager)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DownloadFile.Builderbuilder(PubNub pubNub, TelemetryManager telemetryManager, RetrofitManager retrofitManager, TokenManager tokenManager)DownloadFilecipherKey(java.lang.String cipherKey)protected PNDownloadFileResultcreateResponse(retrofit2.Response<okhttp3.ResponseBody> input)protected retrofit2.Call<okhttp3.ResponseBody>doWork(java.util.Map<java.lang.String,java.lang.String> baseParams)protected java.util.List<java.lang.String>getAffectedChannelGroups()protected java.util.List<java.lang.String>getAffectedChannels()protected PNOperationTypegetOperationType()protected booleanisAuthRequired()protected voidvalidateParams()-
Methods inherited from class com.pubnub.api.endpoints.Endpoint
async, createBaseParams, encodeParams, getPubnub, getRetrofit, isError, queryParam, retry, silentCancel, sync
-
-
-
-
Constructor Detail
-
DownloadFile
public DownloadFile(java.lang.String channel, java.lang.String fileName, java.lang.String fileId, PubNub pubnubInstance, TelemetryManager telemetry, RetrofitManager retrofitInstance, TokenManager tokenManager)
-
-
Method Detail
-
getAffectedChannels
protected java.util.List<java.lang.String> getAffectedChannels()
- Specified by:
getAffectedChannelsin classEndpoint<okhttp3.ResponseBody,PNDownloadFileResult>
-
getAffectedChannelGroups
protected java.util.List<java.lang.String> getAffectedChannelGroups()
- Specified by:
getAffectedChannelGroupsin classEndpoint<okhttp3.ResponseBody,PNDownloadFileResult>
-
validateParams
protected void validateParams() throws PubNubException- Specified by:
validateParamsin classEndpoint<okhttp3.ResponseBody,PNDownloadFileResult>- Throws:
PubNubException
-
doWork
protected retrofit2.Call<okhttp3.ResponseBody> doWork(java.util.Map<java.lang.String,java.lang.String> baseParams) throws PubNubException- Specified by:
doWorkin classEndpoint<okhttp3.ResponseBody,PNDownloadFileResult>- Throws:
PubNubException
-
createResponse
protected PNDownloadFileResult createResponse(retrofit2.Response<okhttp3.ResponseBody> input) throws PubNubException
- Specified by:
createResponsein classEndpoint<okhttp3.ResponseBody,PNDownloadFileResult>- Throws:
PubNubException
-
getOperationType
protected PNOperationType getOperationType()
- Specified by:
getOperationTypein classEndpoint<okhttp3.ResponseBody,PNDownloadFileResult>
-
isAuthRequired
protected boolean isAuthRequired()
- Specified by:
isAuthRequiredin classEndpoint<okhttp3.ResponseBody,PNDownloadFileResult>
-
builder
public static DownloadFile.Builder builder(PubNub pubNub, TelemetryManager telemetryManager, RetrofitManager retrofitManager, TokenManager tokenManager)
-
cipherKey
public DownloadFile cipherKey(java.lang.String cipherKey)
- Returns:
this.
-
-