Package org.jivesoftware.smackx.usertune
Class UserTuneManager
- java.lang.Object
-
- org.jivesoftware.smack.Manager
-
- org.jivesoftware.smackx.usertune.UserTuneManager
-
public final class UserTuneManager extends Manager
Entry point for Smacks API for XEP-0118: User Tune.
To publish a UserTune, please usepublishUserTune(UserTuneElement)method. This will publish the node.
To stop publishing a UserTune, please useclearUserTune()method. This will send a disabling publish signal.
To add a UserTune listener in order to remain updated with other users UserTune, useaddUserTuneListener(PepEventListener)method.
To link a UserTuneElement withMessage, use 'message.addExtension(userTuneElement)'.
An example to illustrate is provided inside UserTuneElementTest inside the test package.- See Also:
- XEP-0118: User Tune
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringUSERTUNE_NODE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddUserTuneListener(PepEventListener<UserTuneElement> listener)voidclearUserTune()static UserTuneManagergetInstanceFor(XMPPConnection connection)voidpublishUserTune(UserTuneElement userTuneElement)booleanremoveUserTuneListener(PepEventListener<UserTuneElement> listener)-
Methods inherited from class org.jivesoftware.smack.Manager
connection, getAuthenticatedConnectionOrThrow, schedule, schedule, scheduleBlocking
-
-
-
-
Field Detail
-
USERTUNE_NODE
public static final java.lang.String USERTUNE_NODE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstanceFor
public static UserTuneManager getInstanceFor(XMPPConnection connection) throws SmackException.NotLoggedInException
-
clearUserTune
public void clearUserTune() throws SmackException.NotLoggedInException, PubSubException.NotALeafNodeException, SmackException.NoResponseException, SmackException.NotConnectedException, XMPPException.XMPPErrorException, java.lang.InterruptedException
-
publishUserTune
public void publishUserTune(UserTuneElement userTuneElement) throws SmackException.NotLoggedInException, PubSubException.NotALeafNodeException, SmackException.NoResponseException, SmackException.NotConnectedException, XMPPException.XMPPErrorException, java.lang.InterruptedException
-
addUserTuneListener
public boolean addUserTuneListener(PepEventListener<UserTuneElement> listener)
-
removeUserTuneListener
public boolean removeUserTuneListener(PepEventListener<UserTuneElement> listener)
-
-