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 |
|---|---|
<E extends org.jivesoftware.smack.packet.ExtensionElement> |
addPepEventListener(java.lang.String node,
java.lang.Class<E> extensionElementType,
PepEventListener<E> pepEventListener) |
boolean |
addPepListener(PepListener pepListener)
Deprecated.
use
addPepEventListener(String, Class, PepEventListener) instead. |
static PepManager |
getInstanceFor(org.jivesoftware.smack.XMPPConnection connection) |
PubSubManager |
getPepPubSubManager() |
boolean |
isSupported() |
LeafNode |
publish(java.lang.String nodeId,
Item item)
Publish an event.
|
boolean |
removePepEventListener(PepEventListener<?> pepEventListener) |
boolean |
removePepListener(PepListener pepListener)
Deprecated.
use
removePepEventListener(PepEventListener) instead. |
public static PepManager getInstanceFor(org.jivesoftware.smack.XMPPConnection connection)
public <E extends org.jivesoftware.smack.packet.ExtensionElement> boolean addPepEventListener(java.lang.String node,
java.lang.Class<E> extensionElementType,
PepEventListener<E> pepEventListener)
public boolean removePepEventListener(PepEventListener<?> pepEventListener)
public PubSubManager getPepPubSubManager()
@Deprecated public boolean addPepListener(PepListener pepListener)
addPepEventListener(String, Class, PepEventListener) instead.pepListener - a roster exchange listener.@Deprecated public boolean removePepListener(PepListener pepListener)
removePepEventListener(PepEventListener) instead.pepListener - a roster exchange listener.public LeafNode publish(java.lang.String nodeId, Item item) throws org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException, org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, PubSubException.NotALeafNodeException
nodeId - the ID of the node to publish on.item - the item to publish.org.jivesoftware.smack.SmackException.NotConnectedException - if the XMPP connection is not connected.java.lang.InterruptedException - if the calling thread was interrupted.org.jivesoftware.smack.XMPPException.XMPPErrorException - if there was an XMPP error returned.org.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the remote entity.PubSubException.NotALeafNodeException - if a PubSub leaf node operation was attempted on a non-leaf node.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.NoResponseExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedException