public class Subscribe extends Endpoint<SubscribeEnvelope,SubscribeEnvelope>
| Constructor and Description |
|---|
Subscribe(PubNub pubnub,
RetrofitManager retrofit)
Create a new Subscribe instance endpoint.
|
| Modifier and Type | Method and Description |
|---|---|
Subscribe |
channelGroups(java.util.List<java.lang.String> channelGroups)
List of channel groups that will be called with subscribe.
|
Subscribe |
channels(java.util.List<java.lang.String> channels)
List of channels that will be called to subscribe.
|
protected SubscribeEnvelope |
createResponse(retrofit2.Response<SubscribeEnvelope> input) |
protected retrofit2.Call<SubscribeEnvelope> |
doWork(java.util.Map<java.lang.String,java.lang.String> params) |
Subscribe |
filterExpression(java.lang.String filterExpression)
filterExpression used as part of PubSub V2 specification to filter on message.
|
protected java.util.List<java.lang.String> |
getAffectedChannelGroups() |
protected java.util.List<java.lang.String> |
getAffectedChannels() |
protected PNOperationType |
getOperationType() |
protected boolean |
isAuthRequired() |
Subscribe |
region(java.lang.String region)
region is used as part of PubSub V2 to help the server route traffic to best data center.
|
Subscribe |
state(java.lang.Object state) |
Subscribe |
timetoken(java.lang.Long timetoken)
timetoken to subscribe with 0 for initial subscribe.
|
protected void |
validateParams() |
async, createBaseParams, encodeParams, getPubnub, getRetrofit, queryParam, retry, silentCancel, syncpublic Subscribe(PubNub pubnub, RetrofitManager retrofit)
pubnub - supplied pubnub instance.protected java.util.List<java.lang.String> getAffectedChannels()
getAffectedChannels in class Endpoint<SubscribeEnvelope,SubscribeEnvelope>protected java.util.List<java.lang.String> getAffectedChannelGroups()
getAffectedChannelGroups in class Endpoint<SubscribeEnvelope,SubscribeEnvelope>protected void validateParams()
throws PubNubException
validateParams in class Endpoint<SubscribeEnvelope,SubscribeEnvelope>PubNubExceptionprotected retrofit2.Call<SubscribeEnvelope> doWork(java.util.Map<java.lang.String,java.lang.String> params) throws PubNubException
doWork in class Endpoint<SubscribeEnvelope,SubscribeEnvelope>PubNubExceptionprotected SubscribeEnvelope createResponse(retrofit2.Response<SubscribeEnvelope> input) throws PubNubException
createResponse in class Endpoint<SubscribeEnvelope,SubscribeEnvelope>PubNubExceptionprotected PNOperationType getOperationType()
getOperationType in class Endpoint<SubscribeEnvelope,SubscribeEnvelope>protected boolean isAuthRequired()
isAuthRequired in class Endpoint<SubscribeEnvelope,SubscribeEnvelope>public Subscribe channels(java.util.List<java.lang.String> channels)
public Subscribe channelGroups(java.util.List<java.lang.String> channelGroups)
public Subscribe timetoken(java.lang.Long timetoken)
public Subscribe filterExpression(java.lang.String filterExpression)
public Subscribe region(java.lang.String region)
public Subscribe state(java.lang.Object state)