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 class
DownloadFile.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.Builder
builder(PubNub pubNub, TelemetryManager telemetryManager, RetrofitManager retrofitManager, TokenManager tokenManager)
DownloadFile
cipherKey(java.lang.String cipherKey)
protected PNDownloadFileResult
createResponse(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 PNOperationType
getOperationType()
protected boolean
isAuthRequired()
protected void
validateParams()
-
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:
getAffectedChannels
in classEndpoint<okhttp3.ResponseBody,PNDownloadFileResult>
-
getAffectedChannelGroups
protected java.util.List<java.lang.String> getAffectedChannelGroups()
- Specified by:
getAffectedChannelGroups
in classEndpoint<okhttp3.ResponseBody,PNDownloadFileResult>
-
validateParams
protected void validateParams() throws PubNubException
- Specified by:
validateParams
in 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:
doWork
in classEndpoint<okhttp3.ResponseBody,PNDownloadFileResult>
- Throws:
PubNubException
-
createResponse
protected PNDownloadFileResult createResponse(retrofit2.Response<okhttp3.ResponseBody> input) throws PubNubException
- Specified by:
createResponse
in classEndpoint<okhttp3.ResponseBody,PNDownloadFileResult>
- Throws:
PubNubException
-
getOperationType
protected PNOperationType getOperationType()
- Specified by:
getOperationType
in classEndpoint<okhttp3.ResponseBody,PNDownloadFileResult>
-
isAuthRequired
protected boolean isAuthRequired()
- Specified by:
isAuthRequired
in 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
.
-
-