Package org.jivesoftware.smackx.usertune
Class UserTuneManager
- java.lang.Object
-
- org.jivesoftware.smack.Manager
-
- org.jivesoftware.smackx.usertune.UserTuneManager
-
public final class UserTuneManager extends org.jivesoftware.smack.ManagerEntry 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(org.jivesoftware.smack.XMPPConnection connection)voidpublishUserTune(UserTuneElement userTuneElement)booleanremoveUserTuneListener(PepEventListener<UserTuneElement> listener)
-
-
-
Field Detail
-
USERTUNE_NODE
public static final java.lang.String USERTUNE_NODE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstanceFor
public static UserTuneManager getInstanceFor(org.jivesoftware.smack.XMPPConnection connection) throws org.jivesoftware.smack.SmackException.NotLoggedInException
- Throws:
org.jivesoftware.smack.SmackException.NotLoggedInException
-
clearUserTune
public void clearUserTune() throws org.jivesoftware.smack.SmackException.NotLoggedInException, PubSubException.NotALeafNodeException, org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.SmackException.NotConnectedException, org.jivesoftware.smack.XMPPException.XMPPErrorException, java.lang.InterruptedException- Throws:
org.jivesoftware.smack.SmackException.NotLoggedInExceptionPubSubException.NotALeafNodeExceptionorg.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionjava.lang.InterruptedException
-
publishUserTune
public void publishUserTune(UserTuneElement userTuneElement) throws org.jivesoftware.smack.SmackException.NotLoggedInException, PubSubException.NotALeafNodeException, org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.SmackException.NotConnectedException, org.jivesoftware.smack.XMPPException.XMPPErrorException, java.lang.InterruptedException
- Throws:
org.jivesoftware.smack.SmackException.NotLoggedInExceptionPubSubException.NotALeafNodeExceptionorg.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionjava.lang.InterruptedException
-
addUserTuneListener
public boolean addUserTuneListener(PepEventListener<UserTuneElement> listener)
-
removeUserTuneListener
public boolean removeUserTuneListener(PepEventListener<UserTuneElement> listener)
-
-