public final class PEPManager extends 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(XMPPConnection connection) |
boolean |
isSupported() |
void |
publish(Item item,
String node)
Publish an event.
|
boolean |
removePEPListener(PEPListener pepListener)
Removes a listener from PEP events.
|
connection, getAuthenticatedConnectionOrThrowpublic static PEPManager getInstanceFor(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, String node) throws SmackException.NotConnectedException, InterruptedException, SmackException.NoResponseException, XMPPException.XMPPErrorException
item - the item to publish.node - the node to publish on.SmackException.NotConnectedExceptionInterruptedExceptionXMPPException.XMPPErrorExceptionSmackException.NoResponseExceptionpublic boolean isSupported() throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException