Package com.pubnub.api.endpoints.access
Class GrantToken
- java.lang.Object
-
- com.pubnub.api.endpoints.Endpoint<com.google.gson.JsonObject,PNGrantTokenResult>
-
- com.pubnub.api.endpoints.access.GrantToken
-
- All Implemented Interfaces:
RemoteAction<PNGrantTokenResult>
public class GrantToken extends Endpoint<com.google.gson.JsonObject,PNGrantTokenResult>
-
-
Constructor Summary
Constructors Constructor Description GrantToken(PubNub pubnub, TelemetryManager telemetryManager, RetrofitManager retrofit, TokenManager tokenManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GrantToken
authorizedUUID(java.lang.String authorizedUUID)
GrantToken
channelGroups(java.util.List<ChannelGroupGrant> channelGroups)
GrantToken
channels(java.util.List<ChannelGrant> channels)
protected PNGrantTokenResult
createResponse(retrofit2.Response<com.google.gson.JsonObject> input)
protected retrofit2.Call<com.google.gson.JsonObject>
doWork(java.util.Map<java.lang.String,java.lang.String> queryParams)
protected java.util.List<java.lang.String>
getAffectedChannelGroups()
protected java.util.List<java.lang.String>
getAffectedChannels()
protected PNOperationType
getOperationType()
protected boolean
isAuthRequired()
GrantToken
meta(java.lang.Object meta)
GrantToken
ttl(java.lang.Integer ttl)
GrantToken
uuids(java.util.List<UUIDGrant> uuids)
protected void
validateParams()
-
Methods inherited from class com.pubnub.api.endpoints.Endpoint
async, createBaseParams, encodeParams, getPubnub, getRetrofit, isError, queryParam, retry, silentCancel, sync
-
-
-
-
Constructor Detail
-
GrantToken
public GrantToken(PubNub pubnub, TelemetryManager telemetryManager, RetrofitManager retrofit, TokenManager tokenManager)
-
-
Method Detail
-
getAffectedChannels
protected java.util.List<java.lang.String> getAffectedChannels()
- Specified by:
getAffectedChannels
in classEndpoint<com.google.gson.JsonObject,PNGrantTokenResult>
-
getAffectedChannelGroups
protected java.util.List<java.lang.String> getAffectedChannelGroups()
- Specified by:
getAffectedChannelGroups
in classEndpoint<com.google.gson.JsonObject,PNGrantTokenResult>
-
validateParams
protected void validateParams() throws PubNubException
- Specified by:
validateParams
in classEndpoint<com.google.gson.JsonObject,PNGrantTokenResult>
- Throws:
PubNubException
-
doWork
protected retrofit2.Call<com.google.gson.JsonObject> doWork(java.util.Map<java.lang.String,java.lang.String> queryParams) throws PubNubException
- Specified by:
doWork
in classEndpoint<com.google.gson.JsonObject,PNGrantTokenResult>
- Throws:
PubNubException
-
createResponse
protected PNGrantTokenResult createResponse(retrofit2.Response<com.google.gson.JsonObject> input) throws PubNubException
- Specified by:
createResponse
in classEndpoint<com.google.gson.JsonObject,PNGrantTokenResult>
- Throws:
PubNubException
-
getOperationType
protected PNOperationType getOperationType()
- Specified by:
getOperationType
in classEndpoint<com.google.gson.JsonObject,PNGrantTokenResult>
-
isAuthRequired
protected boolean isAuthRequired()
- Specified by:
isAuthRequired
in classEndpoint<com.google.gson.JsonObject,PNGrantTokenResult>
-
ttl
public GrantToken ttl(java.lang.Integer ttl)
- Returns:
this
.
-
meta
public GrantToken meta(java.lang.Object meta)
- Returns:
this
.
-
authorizedUUID
public GrantToken authorizedUUID(java.lang.String authorizedUUID)
- Returns:
this
.
-
channels
public GrantToken channels(java.util.List<ChannelGrant> channels)
- Returns:
this
.
-
channelGroups
public GrantToken channelGroups(java.util.List<ChannelGroupGrant> channelGroups)
- Returns:
this
.
-
uuids
public GrantToken uuids(java.util.List<UUIDGrant> uuids)
- Returns:
this
.
-
-