public final class PushNotificationsManager extends Manager
Modifier and Type | Method and Description |
---|---|
boolean |
disable(Jid pushJid,
java.lang.String node)
Disable push notifications of an specific node.
|
boolean |
disableAll(Jid pushJid)
Disable all push notifications.
|
boolean |
enable(Jid pushJid,
java.lang.String node)
Enable push notifications.
|
boolean |
enable(Jid pushJid,
java.lang.String node,
java.util.HashMap<java.lang.String,java.lang.String> publishOptions)
Enable push notifications.
|
static PushNotificationsManager |
getInstanceFor(XMPPConnection connection)
Get the singleton instance of PushNotificationsManager.
|
boolean |
isSupported()
Returns true if Push Notifications are supported by this account.
|
boolean |
isSupportedByServer()
Deprecated.
Use
isSupported() instead. |
connection, getAuthenticatedConnectionOrThrow
public static PushNotificationsManager getInstanceFor(XMPPConnection connection)
connection
- @Deprecated public boolean isSupportedByServer() throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
isSupported()
instead.SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
java.lang.InterruptedException
public boolean isSupported() throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
java.lang.InterruptedException
public boolean enable(Jid pushJid, java.lang.String node) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
pushJid
- node
- SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
java.lang.InterruptedException
public boolean enable(Jid pushJid, java.lang.String node, java.util.HashMap<java.lang.String,java.lang.String> publishOptions) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
pushJid
- node
- publishOptions
- SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
java.lang.InterruptedException
public boolean disableAll(Jid pushJid) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
pushJid
- SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
java.lang.InterruptedException
public boolean disable(Jid pushJid, java.lang.String node) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
pushJid
- node
- SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
java.lang.InterruptedException