public class PubNub
extends java.lang.Object
| Constructor and Description |
|---|
PubNub(@NotNull PNConfiguration initialConfig) |
| Modifier and Type | Method and Description |
|---|---|
@NotNull AddChannelChannelGroup |
addChannelsToChannelGroup() |
void |
addListener(@NotNull SubscribeCallback listener) |
@NotNull AddMessageAction |
addMessageAction() |
@NotNull AddChannelsToPush |
addPushNotificationsOnChannels() |
@NotNull ListPushProvisions |
auditPushChannelProvisions() |
@NotNull CreateSpace |
createSpace() |
@NotNull CreateUser |
createUser() |
@Nullable java.lang.String |
decrypt(java.lang.String inputString)
Perform Cryptographic decryption of an input string using cipher key provided by PNConfiguration
|
@Nullable java.lang.String |
decrypt(java.lang.String inputString,
java.lang.String cipherKey)
Perform Cryptographic decryption of an input string using the cipher key
|
@NotNull DeleteChannelGroup |
deleteChannelGroup() |
@NotNull DeleteMessages |
deleteMessages() |
@NotNull DeleteSpace |
deleteSpace() |
@NotNull DeleteUser |
deleteUser() |
void |
destroy()
Destroy the SDK to cancel all ongoing requests and stop heartbeat timer.
|
void |
disconnect()
Perform a disconnect from the listeners
|
@Nullable java.lang.String |
encrypt(java.lang.String inputString)
Perform Cryptographic encryption of an input string and the cipher key provided by PNConfiguration
|
@Nullable java.lang.String |
encrypt(java.lang.String inputString,
java.lang.String cipherKey)
Perform Cryptographic encryption of an input string and the cipher key.
|
@NotNull FetchMessages |
fetchMessages() |
@NotNull Publish |
fire() |
void |
forceDestroy()
Force destroy the SDK to evict the connection pools and close executors.
|
@NotNull java.lang.String |
getBaseUrl() |
@NotNull PNConfiguration |
getConfiguration() |
@NotNull java.lang.String |
getInstanceId() |
@NotNull MapperManager |
getMapper() |
@NotNull GetMembers |
getMembers() |
@NotNull GetMemberships |
getMemberships() |
@NotNull GetMessageActions |
getMessageActions() |
@NotNull GetState |
getPresenceState() |
@NotNull java.lang.String |
getRequestId() |
@NotNull GetSpace |
getSpace() |
@NotNull GetSpaces |
getSpaces() |
@NotNull java.util.List<java.lang.String> |
getSubscribedChannelGroups() |
@NotNull java.util.List<java.lang.String> |
getSubscribedChannels() |
int |
getTimestamp() |
@Nullable java.lang.String |
getToken(@NotNull java.lang.String resourceId,
@NotNull PNResourceType resourceType) |
@Nullable java.lang.String |
getToken(@NotNull TokenManagerProperties tokenManagerProperties) |
@NotNull java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.String>>> |
getTokens() |
@NotNull java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.String>> |
getTokensByResource(@NotNull PNResourceType resourceType) |
@NotNull GetUser |
getUser() |
@NotNull GetUsers |
getUsers() |
@NotNull java.lang.String |
getVersion() |
@NotNull Grant |
grant() |
@NotNull GrantToken |
grantToken() |
@NotNull HereNow |
hereNow() |
@NotNull History |
history() |
@NotNull ListAllChannelGroup |
listAllChannelGroups() |
@NotNull AllChannelsChannelGroup |
listChannelsForChannelGroup() |
@NotNull ManageMembers |
manageMembers() |
@NotNull ManageMemberships |
manageMemberships() |
@NotNull MessageCounts |
messageCounts() |
@NotNull PresenceBuilder |
presence() |
@NotNull Publish |
publish() |
void |
reconnect()
Perform a Reconnect to the network
|
@NotNull RemoveAllPushChannelsForDevice |
removeAllPushNotificationsFromDeviceWithPushToken() |
@NotNull RemoveChannelChannelGroup |
removeChannelsFromChannelGroup() |
void |
removeListener(@NotNull SubscribeCallback listener) |
@NotNull RemoveMessageAction |
removeMessageAction() |
@NotNull RemoveChannelsFromPush |
removePushNotificationsFromChannels() |
@NotNull SetState |
setPresenceState() |
void |
setToken(java.lang.String token) |
void |
setTokens(@NotNull java.util.List<java.lang.String> tokens) |
@NotNull Signal |
signal() |
void |
stop()
Deprecated.
|
@NotNull SubscribeBuilder |
subscribe() |
@NotNull Time |
time() |
@NotNull UnsubscribeBuilder |
unsubscribe() |
void |
unsubscribeAll() |
@NotNull UpdateSpace |
updateSpace() |
@NotNull UpdateUser |
updateUser() |
@NotNull WhereNow |
whereNow() |
public PubNub(@NotNull
@NotNull PNConfiguration initialConfig)
@NotNull public @NotNull java.lang.String getBaseUrl()
public void addListener(@NotNull
@NotNull SubscribeCallback listener)
public void removeListener(@NotNull
@NotNull SubscribeCallback listener)
@NotNull public @NotNull SubscribeBuilder subscribe()
@NotNull public @NotNull UnsubscribeBuilder unsubscribe()
@NotNull public @NotNull PresenceBuilder presence()
@NotNull public @NotNull AddChannelsToPush addPushNotificationsOnChannels()
@NotNull public @NotNull RemoveChannelsFromPush removePushNotificationsFromChannels()
@NotNull public @NotNull RemoveAllPushChannelsForDevice removeAllPushNotificationsFromDeviceWithPushToken()
@NotNull public @NotNull ListPushProvisions auditPushChannelProvisions()
@NotNull public @NotNull WhereNow whereNow()
@NotNull public @NotNull HereNow hereNow()
@NotNull public @NotNull Time time()
@NotNull public @NotNull History history()
@NotNull public @NotNull FetchMessages fetchMessages()
@NotNull public @NotNull DeleteMessages deleteMessages()
@NotNull public @NotNull MessageCounts messageCounts()
@NotNull public @NotNull Grant grant()
@NotNull public @NotNull GrantToken grantToken()
@NotNull public @NotNull GetState getPresenceState()
@NotNull public @NotNull SetState setPresenceState()
@NotNull public @NotNull Publish publish()
@NotNull public @NotNull Signal signal()
@NotNull public @NotNull ListAllChannelGroup listAllChannelGroups()
@NotNull public @NotNull AllChannelsChannelGroup listChannelsForChannelGroup()
@NotNull public @NotNull AddChannelChannelGroup addChannelsToChannelGroup()
@NotNull public @NotNull RemoveChannelChannelGroup removeChannelsFromChannelGroup()
@NotNull public @NotNull DeleteChannelGroup deleteChannelGroup()
@NotNull public @NotNull GetUsers getUsers()
@NotNull public @NotNull GetUser getUser()
@NotNull public @NotNull CreateUser createUser()
@NotNull public @NotNull UpdateUser updateUser()
@NotNull public @NotNull DeleteUser deleteUser()
@NotNull public @NotNull GetSpaces getSpaces()
@NotNull public @NotNull GetSpace getSpace()
@NotNull public @NotNull CreateSpace createSpace()
@NotNull public @NotNull UpdateSpace updateSpace()
@NotNull public @NotNull DeleteSpace deleteSpace()
@NotNull public @NotNull GetMemberships getMemberships()
@NotNull public @NotNull GetMembers getMembers()
@NotNull public @NotNull ManageMemberships manageMemberships()
@NotNull public @NotNull ManageMembers manageMembers()
@NotNull public @NotNull AddMessageAction addMessageAction()
@NotNull public @NotNull GetMessageActions getMessageActions()
@NotNull public @NotNull RemoveMessageAction removeMessageAction()
@Nullable
public @Nullable java.lang.String decrypt(java.lang.String inputString)
throws PubNubException
inputString - String to be encryptedPubNubException@Nullable
public @Nullable java.lang.String decrypt(java.lang.String inputString,
java.lang.String cipherKey)
throws PubNubException
inputString - String to be encryptedcipherKey - cipher key to be used for encryptionPubNubException - throws exception in case of failed encryption@Nullable
public @Nullable java.lang.String encrypt(java.lang.String inputString)
throws PubNubException
inputString - String to be encryptedPubNubException@Nullable
public @Nullable java.lang.String encrypt(java.lang.String inputString,
java.lang.String cipherKey)
throws PubNubException
inputString - String to be encryptedcipherKey - cipher key to be used for encryptionPubNubException - throws exception in case of failed encryptionpublic int getTimestamp()
@NotNull public @NotNull java.lang.String getInstanceId()
@NotNull public @NotNull java.lang.String getRequestId()
@NotNull public @NotNull java.lang.String getVersion()
@Deprecated public void stop()
public void destroy()
public void forceDestroy()
public void reconnect()
public void disconnect()
@NotNull public @NotNull Publish fire()
@NotNull public @NotNull java.util.List<java.lang.String> getSubscribedChannels()
@NotNull public @NotNull java.util.List<java.lang.String> getSubscribedChannelGroups()
public void unsubscribeAll()
public void setToken(java.lang.String token)
throws PubNubException
PubNubExceptionpublic void setTokens(@NotNull
@NotNull java.util.List<java.lang.String> tokens)
throws PubNubException
PubNubException@Nullable
public @Nullable java.lang.String getToken(@NotNull
@NotNull java.lang.String resourceId,
@NotNull
@NotNull PNResourceType resourceType)
@Nullable
public @Nullable java.lang.String getToken(@NotNull
@NotNull TokenManagerProperties tokenManagerProperties)
@NotNull public @NotNull java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.String>>> getTokens()
@NotNull
public @NotNull java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.String>> getTokensByResource(@NotNull
@NotNull PNResourceType resourceType)
@NotNull public @NotNull PNConfiguration getConfiguration()
@NotNull public @NotNull MapperManager getMapper()