public final class PEPManager
extends org.jivesoftware.smack.Manager
PEPManager pepManager = new PEPManager(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) |
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 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
item - the item to publish.node - the node to publish on.org.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NoResponseExceptionPubSubException.NotAPubSubNodeExceptionpublic 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.NoResponseExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedException