public final class PepManager
extends org.jivesoftware.smack.Manager
PepManager pepManager = PepManager.getInstanceFor(smackConnection); pepManager.addPepListener(new PepListener() { public void eventReceived(EntityBareJid from, EventElement event, Message message) { LOGGER.debug("Event received: " + event); } });
Modifier and Type | Method and Description |
---|---|
boolean |
addPepListener(PepListener pepListener)
Adds a listener to PEPs.
|
static PepManager |
getInstanceFor(org.jivesoftware.smack.XMPPConnection connection) |
PubSubManager |
getPepPubSubManager() |
boolean |
isSupported() |
void |
publish(Item item,
java.lang.String node)
Publish an event.
|
boolean |
removePepListener(PepListener pepListener)
Removes a listener from PEP events.
|
public static PepManager getInstanceFor(org.jivesoftware.smack.XMPPConnection connection)
public PubSubManager getPepPubSubManager()
public boolean addPepListener(PepListener pepListener)
pepListener
- a roster exchange listener.public boolean removePepListener(PepListener pepListener)
pepListener
- a roster exchange listener.public void publish(Item item, java.lang.String node) throws org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException, org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, PubSubException.NotAPubSubNodeException, PubSubException.NotALeafNodeException
item
- the item to publish.node
- the node to publish on.org.jivesoftware.smack.SmackException.NotConnectedException
java.lang.InterruptedException
org.jivesoftware.smack.XMPPException.XMPPErrorException
org.jivesoftware.smack.SmackException.NoResponseException
PubSubException.NotAPubSubNodeException
PubSubException.NotALeafNodeException
public boolean isSupported() throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException
org.jivesoftware.smack.SmackException.NoResponseException
org.jivesoftware.smack.XMPPException.XMPPErrorException
org.jivesoftware.smack.SmackException.NotConnectedException
java.lang.InterruptedException