public final class PushNotificationsManager extends Manager
Modifier and Type | Method and Description |
---|---|
boolean |
disable(org.jxmpp.jid.Jid pushJid,
String node)
Disable push notifications of an specific node.
|
boolean |
disableAll(org.jxmpp.jid.Jid pushJid)
Disable all push notifications.
|
boolean |
enable(org.jxmpp.jid.Jid pushJid,
String node)
Enable push notifications.
|
boolean |
enable(org.jxmpp.jid.Jid pushJid,
String node,
HashMap<String,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.
|
connection, getAuthenticatedConnectionOrThrow, schedule
public static PushNotificationsManager getInstanceFor(XMPPConnection connection)
connection
- public boolean isSupported() throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
InterruptedException
public boolean enable(org.jxmpp.jid.Jid pushJid, String node) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
pushJid
- node
- SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
InterruptedException
public boolean enable(org.jxmpp.jid.Jid pushJid, String node, HashMap<String,String> publishOptions) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
pushJid
- node
- publishOptions
- SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
InterruptedException
public boolean disableAll(org.jxmpp.jid.Jid pushJid) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
pushJid
- SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
InterruptedException
public boolean disable(org.jxmpp.jid.Jid pushJid, String node) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
pushJid
- node
- SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
InterruptedException