Class SetState
- java.lang.Object
-
- com.pubnub.api.endpoints.Endpoint<Envelope<com.google.gson.JsonElement>,PNSetStateResult>
-
- com.pubnub.api.endpoints.presence.SetState
-
- All Implemented Interfaces:
RemoteAction<PNSetStateResult>
public class SetState extends Endpoint<Envelope<com.google.gson.JsonElement>,PNSetStateResult>
-
-
Constructor Summary
Constructors Constructor Description SetState(PubNub pubnub, SubscriptionManager subscriptionManagerInstance, TelemetryManager telemetryManager, RetrofitManager retrofit, TokenManager tokenManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SetState
channelGroups(java.util.List<java.lang.String> channelGroups)
SetState
channels(java.util.List<java.lang.String> channels)
protected PNSetStateResult
createResponse(retrofit2.Response<Envelope<com.google.gson.JsonElement>> input)
protected retrofit2.Call<Envelope<com.google.gson.JsonElement>>
doWork(java.util.Map<java.lang.String,java.lang.String> params)
protected java.util.List<java.lang.String>
getAffectedChannelGroups()
protected java.util.List<java.lang.String>
getAffectedChannels()
protected PNOperationType
getOperationType()
protected boolean
isAuthRequired()
SetState
state(java.lang.Object state)
SetState
uuid(java.lang.String uuid)
protected void
validateParams()
SetState
withHeartbeat(boolean withHeartbeat)
-
Methods inherited from class com.pubnub.api.endpoints.Endpoint
async, createBaseParams, encodeParams, getPubnub, getRetrofit, isError, queryParam, retry, silentCancel, sync
-
-
-
-
Constructor Detail
-
SetState
public SetState(PubNub pubnub, SubscriptionManager subscriptionManagerInstance, TelemetryManager telemetryManager, RetrofitManager retrofit, TokenManager tokenManager)
-
-
Method Detail
-
getAffectedChannels
protected java.util.List<java.lang.String> getAffectedChannels()
- Specified by:
getAffectedChannels
in classEndpoint<Envelope<com.google.gson.JsonElement>,PNSetStateResult>
-
getAffectedChannelGroups
protected java.util.List<java.lang.String> getAffectedChannelGroups()
- Specified by:
getAffectedChannelGroups
in classEndpoint<Envelope<com.google.gson.JsonElement>,PNSetStateResult>
-
validateParams
protected void validateParams() throws PubNubException
- Specified by:
validateParams
in classEndpoint<Envelope<com.google.gson.JsonElement>,PNSetStateResult>
- Throws:
PubNubException
-
doWork
protected retrofit2.Call<Envelope<com.google.gson.JsonElement>> doWork(java.util.Map<java.lang.String,java.lang.String> params) throws PubNubException
- Specified by:
doWork
in classEndpoint<Envelope<com.google.gson.JsonElement>,PNSetStateResult>
- Throws:
PubNubException
-
createResponse
protected PNSetStateResult createResponse(retrofit2.Response<Envelope<com.google.gson.JsonElement>> input) throws PubNubException
- Specified by:
createResponse
in classEndpoint<Envelope<com.google.gson.JsonElement>,PNSetStateResult>
- Throws:
PubNubException
-
getOperationType
protected PNOperationType getOperationType()
- Specified by:
getOperationType
in classEndpoint<Envelope<com.google.gson.JsonElement>,PNSetStateResult>
-
isAuthRequired
protected boolean isAuthRequired()
- Specified by:
isAuthRequired
in classEndpoint<Envelope<com.google.gson.JsonElement>,PNSetStateResult>
-
channels
public SetState channels(java.util.List<java.lang.String> channels)
- Returns:
this
.
-
channelGroups
public SetState channelGroups(java.util.List<java.lang.String> channelGroups)
- Returns:
this
.
-
state
public SetState state(java.lang.Object state)
- Returns:
this
.
-
uuid
public SetState uuid(java.lang.String uuid)
- Returns:
this
.
-
withHeartbeat
public SetState withHeartbeat(boolean withHeartbeat)
- Returns:
this
.
-
-